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
Kirill Smelkov
linux
Commits
9fb41ec2
Commit
9fb41ec2
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] parisc: fix do_settimeofday() for new API
parent
51fe6a2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
arch/parisc/kernel/time.c
arch/parisc/kernel/time.c
+10
-6
No files found.
arch/parisc/kernel/time.c
View file @
9fb41ec2
...
...
@@ -185,9 +185,12 @@ do_gettimeofday (struct timeval *tv)
tv
->
tv_usec
=
usec
;
}
void
int
do_settimeofday
(
struct
timeval
*
tv
)
{
if
((
unsigned
long
)
tv
->
tv_nsec
>=
NSEC_PER_SEC
)
return
-
EINVAL
;
write_seqlock_irq
(
&
xtime_lock
);
{
/*
...
...
@@ -197,22 +200,23 @@ do_settimeofday (struct timeval *tv)
* Discover what correction gettimeofday would have
* done, and then undo it!
*/
tv
->
tv_
usec
-=
gettimeoffset
()
;
tv
->
tv_
usec
-=
(
jiffies
-
wall_jiffies
)
*
(
1000000
/
HZ
);
tv
->
tv_
nsec
-=
gettimeoffset
()
*
1000
;
tv
->
tv_
nsec
-=
(
jiffies
-
wall_jiffies
)
*
(
NSEC_PER_SEC
/
HZ
);
while
(
tv
->
tv_
u
sec
<
0
)
{
tv
->
tv_
usec
+=
1000000
;
while
(
tv
->
tv_
n
sec
<
0
)
{
tv
->
tv_
nsec
+=
NSEC_PER_SEC
;
tv
->
tv_sec
--
;
}
xtime
.
tv_sec
=
tv
->
tv_sec
;
xtime
.
tv_nsec
=
(
tv
->
tv_usec
*
1000
)
;
xtime
.
tv_nsec
=
tv
->
tv_nsec
;
time_adjust
=
0
;
/* stop active adjtime() */
time_status
|=
STA_UNSYNC
;
time_maxerror
=
NTP_PHASE_LIMIT
;
time_esterror
=
NTP_PHASE_LIMIT
;
}
write_sequnlock_irq
(
&
xtime_lock
);
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