Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
timeout.c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
timeout.c
Commits
6af4d7dd
Commit
6af4d7dd
authored
Dec 14, 2013
by
william
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix remaining internal spelling from timer to timeout
parent
e71fad93
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
26 deletions
+26
-26
Makefile
Makefile
+9
-9
debug.h
debug.h
+7
-7
timeout.c
timeout.c
+6
-6
timeout.h
timeout.h
+4
-4
No files found.
Makefile
View file @
6af4d7dd
all
:
time
r timer8 timer16 timer32 timer
64
all
:
time
out timeout8 timeout16 timeout32 timeout
64
WHEEL_BIT
=
6
WHEEL_NUM
=
4
CPPFLAGS
=
-DTIME
R_DEBUG
-DTIMER
_MAIN
CPPFLAGS
=
-DTIME
OUT_DEBUG
-DTIMEOUT
_MAIN
CFLAGS
=
-O2
-g
-Wall
-Wextra
time
r
:
CPPFLAGS+=-DWHEEL_BIT=$(WHEEL_BIT) -DWHEEL_NUM=$(WHEEL_NUM)
time
out
:
CPPFLAGS+=-DWHEEL_BIT=$(WHEEL_BIT) -DWHEEL_NUM=$(WHEEL_NUM)
time
r
8
:
CPPFLAGS+=-DWHEEL_BIT=3 -DWHEEL_NUM=$(WHEEL_NUM)
time
out
8
:
CPPFLAGS+=-DWHEEL_BIT=3 -DWHEEL_NUM=$(WHEEL_NUM)
time
r
16
:
CPPFLAGS+=-DWHEEL_BIT=4 -DWHEEL_NUM=$(WHEEL_NUM)
time
out
16
:
CPPFLAGS+=-DWHEEL_BIT=4 -DWHEEL_NUM=$(WHEEL_NUM)
time
r
32
:
CPPFLAGS+=-DWHEEL_BIT=5 -DWHEEL_NUM=$(WHEEL_NUM)
time
out
32
:
CPPFLAGS+=-DWHEEL_BIT=5 -DWHEEL_NUM=$(WHEEL_NUM)
time
r
64
:
CPPFLAGS+=-DWHEEL_BIT=6 -DWHEEL_NUM=$(WHEEL_NUM)
time
out
64
:
CPPFLAGS+=-DWHEEL_BIT=6 -DWHEEL_NUM=$(WHEEL_NUM)
time
r64 timer32 timer16 timer8 timer
:
timer
.c
time
out64 timeout32 timeout16 timeout8 timeout
:
timeout
.c
$(CC)
$(CFLAGS)
-o
$@
$^
$(CPPFLAGS)
...
...
@@ -25,7 +25,7 @@ timer64 timer32 timer16 timer8 timer: timer.c
.PHONY
:
clean clean!
clean
:
$(RM)
-r
time
r timer8 timer16 timer32 timer
64
*
.dSYM
$(RM)
-r
time
out
timeout8 timeout16 timeout32 timeout
64
*
.dSYM
clean~
:
clean
$(RM)
*
~
debug.h
View file @
6af4d7dd
...
...
@@ -3,15 +3,15 @@
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#if TIME
R_DEBUG - 0 || TIMER
_MAIN - 0
#if TIME
OUT_DEBUG - 0 || TIMEOUT
_MAIN - 0
#include <stdlib.h>
#include <stdio.h>
#undef TIME
R
_DEBUG
#define TIME
R
_DEBUG 1
#define DEBUG_LEVEL time
r
_debug
#undef TIME
OUT
_DEBUG
#define TIME
OUT
_DEBUG 1
#define DEBUG_LEVEL time
out
_debug
static
int
time
r
_debug
;
static
int
time
out
_debug
;
#define SAYit_(lvl, fmt, ...) do { \
if (DEBUG_LEVEL >= (lvl)) \
...
...
@@ -25,8 +25,8 @@ static int timer_debug;
_Exit(EXIT_FAILURE); \
} while (0)
#else
#undef TIME
R
_DEBUG
#define TIME
R
_DEBUG 0
#undef TIME
OUT
_DEBUG
#define TIME
OUT
_DEBUG 0
#define DEBUG_LEVEL 0
#define SAYit(...) (void)0
...
...
timeout.c
View file @
6af4d7dd
/* ==========================================================================
* time
r
.c - Tickless hierarchical timing wheel.
* time
out
.c - Tickless hierarchical timing wheel.
* --------------------------------------------------------------------------
* Copyright (c) 2013 William Ahern
*
...
...
@@ -32,9 +32,9 @@
#include <sys/queue.h>
#include "time
r
.h"
#include "time
out
.h"
#if TIME
R_DEBUG - 0 || TIMER
_MAIN - 0
#if TIME
OUT_DEBUG - 0 || TIMEOUT
_MAIN - 0
#include "debug.h"
#endif
...
...
@@ -572,7 +572,7 @@ void timeout_del(struct timeout *to) {
}
/* timeout_del() */
#if TIME
R
_MAIN - 0
#if TIME
OUT
_MAIN - 0
#include <stdio.h>
#include <stdlib.h>
...
...
@@ -615,7 +615,7 @@ int main(int argc, char **argv) {
break
;
case
'v'
:
time
r
_debug
++
;
time
out
_debug
++
;
break
;
}
...
...
@@ -656,4 +656,4 @@ int main(int argc, char **argv) {
return
0
;
}
/* main() */
#endif
/* TIME
R
_MAIN */
#endif
/* TIME
OUT
_MAIN */
timeout.h
View file @
6af4d7dd
/* ==========================================================================
* time
r
.h - Tickless hierarchical timing wheel.
* time
out
.h - Tickless hierarchical timing wheel.
* --------------------------------------------------------------------------
* Copyright (c) 2013 William Ahern
*
...
...
@@ -23,8 +23,8 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
* ==========================================================================
*/
#ifndef TIME
R
_H
#define TIME
R
_H
#ifndef TIME
OUT
_H
#define TIME
OUT
_H
#include <stdbool.h>
/* bool */
#include <stdio.h>
/* FILE */
...
...
@@ -153,4 +153,4 @@ bool timeouts_check(struct timeouts *, FILE *);
/* return true if invariants hold. describes failures to optional file handle. */
#endif
/* TIME
R
_H */
#endif
/* TIME
OUT
_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment