Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
568c3285
Commit
568c3285
authored
Sep 29, 2004
by
Stephen Hemminger
Committed by
Linus Torvalds
Sep 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] limit max jiffy of msecs_to_jiffies
parent
43403bb3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
include/linux/time.h
include/linux/time.h
+2
-0
No files found.
include/linux/time.h
View file @
568c3285
...
@@ -208,6 +208,8 @@ static inline unsigned int jiffies_to_usecs(const unsigned long j)
...
@@ -208,6 +208,8 @@ static inline unsigned int jiffies_to_usecs(const unsigned long j)
static
inline
unsigned
long
msecs_to_jiffies
(
const
unsigned
int
m
)
static
inline
unsigned
long
msecs_to_jiffies
(
const
unsigned
int
m
)
{
{
if
(
m
>
jiffies_to_msecs
(
MAX_JIFFY_OFFSET
))
return
MAX_JIFFY_OFFSET
;
#if HZ <= 1000 && !(1000 % HZ)
#if HZ <= 1000 && !(1000 % HZ)
return
(
m
+
(
1000
/
HZ
)
-
1
)
/
(
1000
/
HZ
);
return
(
m
+
(
1000
/
HZ
)
-
1
)
/
(
1000
/
HZ
);
#elif HZ > 1000 && !(HZ % 1000)
#elif HZ > 1000 && !(HZ % 1000)
...
...
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