summaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_time.c
diff options
context:
space:
mode:
authorPaul Irofti <pirofti@cvs.openbsd.org>2011-04-05 22:15:51 +0000
committerPaul Irofti <pirofti@cvs.openbsd.org>2011-04-05 22:15:51 +0000
commitc89c95c2ef3b259833283423d143c17f841cce4c (patch)
treeb2cb2055ed3386e7174df0c5cc3156b034771508 /sys/compat/linux/linux_time.c
parent2ba76fec80a3a3d9f58f763d13b99fffbeebdbe3 (diff)
Move timespec utility functions to a header file.
Iinitially I wanted to just lose the static for ddb, but then I realised they will be needed for the futex implementation as well so its better to have them in a separate header file.
Diffstat (limited to 'sys/compat/linux/linux_time.c')
-rw-r--r--sys/compat/linux/linux_time.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/compat/linux/linux_time.c b/sys/compat/linux/linux_time.c
index abb6aae0012..f9e4871b78f 100644
--- a/sys/compat/linux/linux_time.c
+++ b/sys/compat/linux/linux_time.c
@@ -1,6 +1,6 @@
-/* $OpenBSD: linux_time.c,v 1.1 2011/02/10 11:58:43 pirofti Exp $ */
+/* $OpenBSD: linux_time.c,v 1.2 2011/04/05 22:15:50 pirofti Exp $ */
/*
- * Copyright (c) 2010 Paul Irofti <pirofti@openbsd.org>
+ * Copyright (c) 2010, 2011 Paul Irofti <pirofti@openbsd.org>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -37,6 +37,8 @@
#include <compat/linux/linux_dirent.h>
#include <compat/linux/linux_emuldata.h>
+#include <compat/linux/linux_time.h>
+
#define LINUX_CLOCK_REALTIME 0
#define LINUX_CLOCK_MONOTONIC 1
#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2
@@ -44,17 +46,14 @@
#define LINUX_CLOCK_REALTIME_HR 4
#define LINUX_CLOCK_MONOTONIC_HR 5
-static void native_to_linux_timespec(struct l_timespec *, struct timespec *);
-static int linux_to_native_clockid(clockid_t *, clockid_t);
-
-static void
+void
native_to_linux_timespec(struct l_timespec *ltp, struct timespec *ntp)
{
ltp->tv_sec = ntp->tv_sec;
ltp->tv_nsec = ntp->tv_nsec;
}
-static int
+int
linux_to_native_clockid(clockid_t *n, clockid_t l)
{
switch (l) {