PERFORCE change 101922 for review
Roman Divacky
rdivacky at FreeBSD.org
Wed Jul 19 12:11:09 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101922
Change 101922 by rdivacky at rdivacky_witten on 2006/07/19 12:10:17
Add implementations of clock_settime, clock_gettime, clock_getres and clock_nanosleep.
This was obtained from NetBSD but differs significantly from their code.
Obtained from: NetBSD (Emmanuel Dreyfus)
Affected files ...
.. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_time.c#1 add
.. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux.h#9 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_dummy.c#6 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/modules/linux/Makefile#5 edit
Differences ...
==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux.h#9 (text+ko) ====
@@ -803,4 +803,17 @@
#define EMUL_LOCKED 1
#define EMUL_UNLOCKED 0
+typedef long linux_time_t;
+struct linux_timespec {
+ linux_time_t tv_sec; /* seconds */
+ long tv_nsec; /* nanoseconds */
+};
+
+#define LINUX_CLOCK_REALTIME 0
+#define LINUX_CLOCK_MONOTONIC 1
+#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2
+#define LINUX_CLOCK_THREAD_CPUTIME_ID 3
+#define LINUX_CLOCK_REALTIME_HR 4
+#define LINUX_CLOCK_MONOTONIC_HR 5
+
#endif /* !_I386_LINUX_LINUX_H_ */
==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_dummy.c#6 (text+ko) ====
@@ -78,10 +78,6 @@
DUMMY(timer_gettime);
DUMMY(timer_getoverrun);
DUMMY(timer_delete);
-DUMMY(clock_settime);
-DUMMY(clock_gettime);
-DUMMY(clock_getres);
-DUMMY(clock_nanosleep);
DUMMY(statfs64);
DUMMY(fstatfs64);
DUMMY(tgkill);
==== //depot/projects/soc2006/rdivacky_linuxolator/modules/linux/Makefile#5 (text+ko) ====
@@ -11,7 +11,7 @@
SRCS= linux${SFX}_dummy.c linux_file.c linux_futex.c linux_getcwd.c linux_ioctl.c \
linux_ipc.c linux${SFX}_machdep.c linux_mib.c linux_misc.c linux_signal.c \
linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c linux${SFX}_sysvec.c \
- linux_uid16.c linux_util.c opt_inet6.h opt_mac.h opt_compat.h \
+ linux_uid16.c linux_util.c linux_time.c opt_inet6.h opt_mac.h opt_compat.h \
vnode_if.h device_if.h bus_if.h
OBJS= linux${SFX}_locore.o
More information about the p4-projects
mailing list