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
d475d5a9
Commit
d475d5a9
authored
Jun 27, 2003
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ALPHA] Set wall_to_monotonic on timer_init and settimeofday.
parent
424544a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
arch/alpha/kernel/time.c
arch/alpha/kernel/time.c
+13
-0
No files found.
arch/alpha/kernel/time.c
View file @
d475d5a9
...
...
@@ -371,6 +371,9 @@ time_init(void)
xtime
.
tv_sec
=
mktime
(
year
,
mon
,
day
,
hour
,
min
,
sec
);
xtime
.
tv_nsec
=
0
;
wall_to_monotonic
.
tv_sec
-=
xtime
.
tv_sec
;
wall_to_monotonic
.
tv_nsec
=
0
;
if
(
HZ
>
(
1
<<
16
))
{
extern
void
__you_loose
(
void
);
__you_loose
();
...
...
@@ -486,6 +489,16 @@ do_settimeofday(struct timespec *tv)
time_maxerror
=
NTP_PHASE_LIMIT
;
time_esterror
=
NTP_PHASE_LIMIT
;
wall_to_monotonic
.
tv_sec
+=
xtime
.
tv_sec
-
tv
->
tv_sec
;
wall_to_monotonic
.
tv_nsec
+=
xtime
.
tv_nsec
-
tv
->
tv_nsec
;
if
(
wall_to_monotonic
.
tv_nsec
>
NSEC_PER_SEC
)
{
wall_to_monotonic
.
tv_nsec
-=
NSEC_PER_SEC
;
wall_to_monotonic
.
tv_sec
++
;
}
else
if
(
wall_to_monotonic
.
tv_nsec
<
0
)
{
wall_to_monotonic
.
tv_nsec
+=
NSEC_PER_SEC
;
wall_to_monotonic
.
tv_sec
--
;
}
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