]> Zhao Yanbai Git Server - minix.git/commit
libc: add clock_settime() system call. 69/469/1
authorThomas Cort <tcort@minix3.org>
Sat, 30 Mar 2013 16:59:21 +0000 (16:59 +0000)
committerBen Gras <ben@minix3.org>
Thu, 4 Apr 2013 13:04:54 +0000 (15:04 +0200)
commit516fec97d9ae7fad5a095a927cb2187e15b2daf3
treed43a864a2f25cc5930c0045ea5017298c7cb1c5e
parent18ad4c0799b43a6eb719431583e7e4229aa74c44
libc: add clock_settime() system call.

This also adds the sys_settime() kernel call which allows for the adjusting
of the clock named realtime in the kernel. The existing sys_stime()
function is still needed for a separate job (setting the boottime). The
boottime is set in the readclock driver. The sys_settime() interface is
meant to be flexible and will support both clock_settime() and adjtime()
when adjtime() is implemented later.

settimeofday() was adjusted to use the clock_settime() interface.

One side note discovered during testing: uptime(1) (part of the last(1)),
uses wtmp to determine boottime (not Minix's times(2)). This leads `uptime`
to report odd results when you set the time to a time prior to boottime.
This isn't a new bug introduced by my changes. It's been there for a while.
24 files changed:
include/minix/callnr.h
include/minix/com.h
include/minix/syslib.h
include/time.h
kernel/clock.c
kernel/proto.h
kernel/system.c
kernel/system.h
kernel/system/Makefile.inc
kernel/system/do_settime.c [new file with mode: 0644]
lib/libc/sys-minix/MISSING_SYSCALLS
lib/libc/sys-minix/Makefile.inc
lib/libc/sys-minix/clock_getres.c
lib/libc/sys-minix/clock_gettime.c
lib/libc/sys-minix/clock_settime.c [new file with mode: 0644]
lib/libc/sys-minix/settimeofday.c
lib/libsys/Makefile
lib/libsys/sys_settime.c [new file with mode: 0644]
servers/pm/param.h
servers/pm/proto.h
servers/pm/table.c
servers/pm/time.c
servers/vfs/table.c
test/test69.c