@@ -1,4 +1,5 @@
bsd_user_ss.add(files(
'os-sys.c',
'os-syscall.c',
+ 'os-time.c',
))
@@ -46,6 +46,8 @@
#include "bsd-file.h"
#include "bsd-proc.h"
+/* *BSD dependent syscall shims */
+#include "os-time.h"
/* I/O */
safe_syscall3(int, open, const char *, path, int, flags, mode_t, mode);
@@ -507,6 +509,24 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1,
case TARGET_FREEBSD_NR_sysarch: /* sysarch(2) */
ret = do_freebsd_sysarch(cpu_env, arg1, arg2);
break;
+ /*
+ * time related system calls.
+ */
+ case TARGET_FREEBSD_NR_nanosleep: /* nanosleep(2) */
+ ret = do_freebsd_nanosleep(arg1, arg2);
+ break;
+
+ case TARGET_FREEBSD_NR_clock_nanosleep: /* clock_nanosleep(2) */
+ ret = do_freebsd_clock_nanosleep(arg1, arg2, arg3, arg4);
+ break;
+
+ case TARGET_FREEBSD_NR_clock_gettime: /* clock_gettime(2) */
+ ret = do_freebsd_clock_gettime(arg1, arg2);
+ break;
+
+ case TARGET_FREEBSD_NR_clock_getres: /* clock_getres(2) */
+ ret = do_freebsd_clock_getres(arg1, arg2);
+ break;
default:
qemu_log_mask(LOG_UNIMP, "Unsupported syscall: %d\n", num);