Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136584184
D7302.id18804.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
883 B
Referenced Files
None
Subscribers
None
D7302.id18804.diff
View Options
Index: head/sys/kern/kern_time.c
===================================================================
--- head/sys/kern/kern_time.c
+++ head/sys/kern/kern_time.c
@@ -120,9 +120,7 @@
struct timeval delta, tv1, tv2;
static struct timeval maxtime, laststep;
struct timespec ts;
- int s;
- s = splclock();
microtime(&tv1);
delta = *tv;
timevalsub(&delta, &tv1);
@@ -152,10 +150,8 @@
printf("Time adjustment clamped to -1 second\n");
}
} else {
- if (tv1.tv_sec == laststep.tv_sec) {
- splx(s);
+ if (tv1.tv_sec == laststep.tv_sec)
return (EPERM);
- }
if (delta.tv_sec > 1) {
tv->tv_sec = tv1.tv_sec + 1;
printf("Time adjustment clamped to +1 second\n");
@@ -166,10 +162,8 @@
ts.tv_sec = tv->tv_sec;
ts.tv_nsec = tv->tv_usec * 1000;
- mtx_lock(&Giant);
tc_setclock(&ts);
resettodr();
- mtx_unlock(&Giant);
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 19, 11:18 AM (1 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25624221
Default Alt Text
D7302.id18804.diff (883 B)
Attached To
Mode
D7302: Further locking changes to timekeeping code.
Attached
Detach File
Event Timeline
Log In to Comment