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
13c02447
Commit
13c02447
authored
Jan 03, 2014
by
william
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweak header includes
parent
410b2d88
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
timeout.c
timeout.c
+9
-5
timeout.h
timeout.h
+1
-1
No files found.
timeout.c
View file @
13c02447
/* ==========================================================================
/* ==========================================================================
* timeout.c - Tickless hierarchical timing wheel.
* timeout.c - Tickless hierarchical timing wheel.
* --------------------------------------------------------------------------
* --------------------------------------------------------------------------
* Copyright (c) 2013 William Ahern
* Copyright (c) 2013
, 2014
William Ahern
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* copy of this software and associated documentation files (the
...
@@ -23,14 +23,18 @@
...
@@ -23,14 +23,18 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
* USE OR OTHER DEALINGS IN THE SOFTWARE.
* ==========================================================================
* ==========================================================================
*/
*/
#include <limits.h>
/* CHAR_BIT */
#include <limits.h>
/* CHAR_BIT */
#include <stddef.h>
/* NULL */
#include <stddef.h>
/* NULL */
#include <stdio.h>
/* FILE fprintf(3) */
#include <inttypes.h>
/* UINT64_C uint64_t */
#include <inttypes.h>
/* UINT64_C uint64_t */
#include <string.h>
#include <math.h>
/* ceil(3) */
#include <string.h>
/* memset(3) */
#include <sys/queue.h>
#include <sys/queue.h>
/* TAILQ(3) */
#include "timeout.h"
#include "timeout.h"
...
@@ -314,7 +318,7 @@ TIMEOUT_PUBLIC void timeouts_add(struct timeouts *T, struct timeout *to, timeout
...
@@ -314,7 +318,7 @@ TIMEOUT_PUBLIC void timeouts_add(struct timeouts *T, struct timeout *to, timeout
TIMEOUT_PUBLIC
void
timeouts_addf
(
struct
timeouts
*
T
,
struct
timeout
*
to
,
double
timeout
)
{
TIMEOUT_PUBLIC
void
timeouts_addf
(
struct
timeouts
*
T
,
struct
timeout
*
to
,
double
timeout
)
{
timeouts_add
(
T
,
to
,
timeout
*
T
->
hertz
);
timeouts_add
(
T
,
to
,
ceil
(
timeout
*
T
->
hertz
)
);
}
/* timeouts_addf() */
}
/* timeouts_addf() */
...
...
timeout.h
View file @
13c02447
/* ==========================================================================
/* ==========================================================================
* timeout.h - Tickless hierarchical timing wheel.
* timeout.h - Tickless hierarchical timing wheel.
* --------------------------------------------------------------------------
* --------------------------------------------------------------------------
* Copyright (c) 2013 William Ahern
* Copyright (c) 2013
, 2014
William Ahern
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* copy of this software and associated documentation files (the
...
...
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