diff options
author | 2011-07-05 18:56:40 +0000 | |
---|---|---|
committer | 2011-07-05 18:56:40 +0000 | |
commit | 001fa934718093d6ca07bef3db03f5b3cb8b2659 (patch) | |
tree | 61d8cf78bbb0c926665f4bb8154e64a24ca7df94 | |
parent | sort (diff) | |
download | wireguard-openbsd-001fa934718093d6ca07bef3db03f5b3cb8b2659.tar.xz wireguard-openbsd-001fa934718093d6ca07bef3db03f5b3cb8b2659.zip |
Add linux_to_native_timespec() for future futex use. Okay tedu@.
-rw-r--r-- | sys/compat/linux/linux_time.c | 9 | ||||
-rw-r--r-- | sys/compat/linux/linux_time.h | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_time.c b/sys/compat/linux/linux_time.c index f9e4871b78f..bbc52c05624 100644 --- a/sys/compat/linux/linux_time.c +++ b/sys/compat/linux/linux_time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_time.c,v 1.2 2011/04/05 22:15:50 pirofti Exp $ */ +/* $OpenBSD: linux_time.c,v 1.3 2011/07/05 18:56:40 pirofti Exp $ */ /* * Copyright (c) 2010, 2011 Paul Irofti <pirofti@openbsd.org> * @@ -53,6 +53,13 @@ native_to_linux_timespec(struct l_timespec *ltp, struct timespec *ntp) ltp->tv_nsec = ntp->tv_nsec; } +void +linux_to_native_timespec(struct timespec *ntp, struct l_timespec *ltp) +{ + ntp->tv_sec = ltp->tv_sec; + ntp->tv_nsec = ltp->tv_nsec; +} + int linux_to_native_clockid(clockid_t *n, clockid_t l) { diff --git a/sys/compat/linux/linux_time.h b/sys/compat/linux/linux_time.h index e766ea45d07..6293cc4b219 100644 --- a/sys/compat/linux/linux_time.h +++ b/sys/compat/linux/linux_time.h @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_time.h,v 1.1 2011/04/05 22:15:50 pirofti Exp $ */ +/* $OpenBSD: linux_time.h,v 1.2 2011/07/05 18:56:40 pirofti Exp $ */ /* * Copyright (c) 2011 Paul Irofti <pirofti@openbsd.org> * @@ -19,6 +19,7 @@ #define _LINUX_TIME_H_ void native_to_linux_timespec(struct l_timespec *, struct timespec *); +void linux_to_native_timespec(struct timespec *, struct l_timespec *); int linux_to_native_clockid(clockid_t *, clockid_t); #endif |