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
4dc04b05
Commit
4dc04b05
authored
Jun 14, 2003
by
Andrew Morton
Committed by
Linus Torvalds
Jun 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] cris: fix do_settimeofday() for new API
parent
3fa27a54
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
arch/cris/kernel/time.c
arch/cris/kernel/time.c
+8
-4
No files found.
arch/cris/kernel/time.c
View file @
4dc04b05
...
...
@@ -134,8 +134,11 @@ void do_gettimeofday(struct timeval *tv)
restore_flags
(
flags
);
}
void
do_settimeofday
(
struct
timeval
*
tv
)
int
do_settimeofday
(
struct
timespec
*
tv
)
{
if
((
unsigned
long
)
tv
->
tv_nsec
>=
NSEC_PER_SEC
)
return
-
EINVAL
;
cli
();
/* This is revolting. We need to set the xtime.tv_usec
* correctly. However, the value in this location is
...
...
@@ -143,10 +146,10 @@ void do_settimeofday(struct timeval *tv)
* Discover what correction gettimeofday
* would have done, and then undo it!
*/
tv
->
tv_
usec
-=
do_gettimeoffset
()
;
tv
->
tv_
nsec
-=
do_gettimeoffset
()
*
1000
;
if
(
tv
->
tv_
u
sec
<
0
)
{
tv
->
tv_
usec
+=
1000000
;
if
(
tv
->
tv_
n
sec
<
0
)
{
tv
->
tv_
nsec
+=
NSEC_PER_SEC
;
tv
->
tv_sec
--
;
}
...
...
@@ -157,6 +160,7 @@ void do_settimeofday(struct timeval *tv)
time_maxerror
=
NTP_PHASE_LIMIT
;
time_esterror
=
NTP_PHASE_LIMIT
;
sti
();
return
0
;
}
...
...
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