Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc expose __lwp_park60
details: https://anonhg.NetBSD.org/src/rev/26faa8a77c6f
branches: trunk
changeset: 326511:26faa8a77c6f
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 31 20:45:48 2014 +0000
description:
expose __lwp_park60
diffstat:
lib/libc/compat/include/lwp.h | 4 ++--
lib/libc/compat/sys/compat___lwp_park50.c | 13 ++-----------
lib/libc/shlib_version | 4 ++--
lib/libc/sys/Makefile.inc | 4 ++--
lib/libc/sys/_lwp_park.2 | 28 +++++++++++++++++++++-------
5 files changed, 29 insertions(+), 24 deletions(-)
diffs (161 lines):
diff -r 1cdaf5d3794a -r 26faa8a77c6f lib/libc/compat/include/lwp.h
--- a/lib/libc/compat/include/lwp.h Fri Jan 31 20:44:17 2014 +0000
+++ b/lib/libc/compat/include/lwp.h Fri Jan 31 20:45:48 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwp.h,v 1.3 2013/03/29 02:09:58 christos Exp $ */
+/* $NetBSD: lwp.h,v 1.4 2014/01/31 20:45:49 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
struct timespec50;
int _lwp_park(const struct timespec50 *, lwpid_t, const void *, const void *);
int ___lwp_park50(const struct timespec *, lwpid_t, const void *, const void *);
-int ___lwp_park60(clockid_t , int, const struct timespec *, lwpid_t,
+int ___lwp_park60(clockid_t, int, const struct timespec *, lwpid_t,
const void *, const void *);
__END_DECLS
diff -r 1cdaf5d3794a -r 26faa8a77c6f lib/libc/compat/sys/compat___lwp_park50.c
--- a/lib/libc/compat/sys/compat___lwp_park50.c Fri Jan 31 20:44:17 2014 +0000
+++ b/lib/libc/compat/sys/compat___lwp_park50.c Fri Jan 31 20:45:48 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat___lwp_park50.c,v 1.1 2013/03/29 02:09:58 christos Exp $ */
+/* $NetBSD: compat___lwp_park50.c,v 1.2 2014/01/31 20:45:49 christos Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: compat___lwp_park50.c,v 1.1 2013/03/29 02:09:58 christos Exp $");
+__RCSID("$NetBSD: compat___lwp_park50.c,v 1.2 2014/01/31 20:45:49 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#define __LIBC12_SOURCE__
@@ -43,11 +43,6 @@
#include <compat/sys/mount.h>
#include <compat/include/lwp.h>
-#ifndef notyet
-#include <unistd.h>
-#include <sys/syscall.h>
-#endif
-
__warn_references(fhstat,
"warning: reference to compatibility ___lwp_park50(); include <lwp.h> to generate correct reference")
@@ -58,10 +53,6 @@
___lwp_park50(const struct timespec *ts, lwpid_t unpark, const void *hint,
const void *unparkhint)
{
-#ifdef notyet
return ___lwp_park60(CLOCK_REALTIME, TIMER_ABSTIME, ts, unpark,
hint, unparkhint);
-#else
- return syscall(SYS_compat_60__lwp_park, ts, unpark, hint, unparkhint);
-#endif
}
diff -r 1cdaf5d3794a -r 26faa8a77c6f lib/libc/shlib_version
--- a/lib/libc/shlib_version Fri Jan 31 20:44:17 2014 +0000
+++ b/lib/libc/shlib_version Fri Jan 31 20:45:48 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shlib_version,v 1.248 2014/01/16 17:21:38 christos Exp $
+# $NetBSD: shlib_version,v 1.249 2014/01/31 20:45:48 christos Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
# things we wish to do on next major version bump:
@@ -40,4 +40,4 @@
# - consolidate ownership with crt0.o and avoid common symbols
# - redo stdin/stdout/stderr to not require copy relocations
major=12
-minor=189
+minor=190
diff -r 1cdaf5d3794a -r 26faa8a77c6f lib/libc/sys/Makefile.inc
--- a/lib/libc/sys/Makefile.inc Fri Jan 31 20:44:17 2014 +0000
+++ b/lib/libc/sys/Makefile.inc Fri Jan 31 20:45:48 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.222 2014/01/16 20:31:43 christos Exp $
+# $NetBSD: Makefile.inc,v 1.223 2014/01/31 20:45:49 christos Exp $
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
# sys sources
@@ -100,7 +100,7 @@
lchflags.S lchmod.S lchown.S lfs_bmapv.S lfs_markv.S lfs_segclean.S \
__lfs_segwait50.S link.S linkat.S listen.S __lstat50.S \
__lutimes50.S _lwp_create.S _lwp_exit.S _lwp_kill.S \
- _lwp_self.S _lwp_wait.S _lwp_unpark.S \
+ ___lwp_park60.S _lwp_self.S _lwp_wait.S _lwp_unpark.S \
_lwp_unpark_all.S _lwp_suspend.S _lwp_continue.S \
_lwp_wakeup.S _lwp_detach.S _lwp_setprivate.S \
_lwp_setname.S _lwp_getname.S _lwp_ctl.S \
diff -r 1cdaf5d3794a -r 26faa8a77c6f lib/libc/sys/_lwp_park.2
--- a/lib/libc/sys/_lwp_park.2 Fri Jan 31 20:44:17 2014 +0000
+++ b/lib/libc/sys/_lwp_park.2 Fri Jan 31 20:45:48 2014 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: _lwp_park.2,v 1.7 2008/04/30 13:10:51 martin Exp $
+.\" $NetBSD: _lwp_park.2,v 1.8 2014/01/31 20:45:49 christos Exp $
.\"
.\" Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd September 25, 2007
+.Dd March 28, 2013
.Dt _LWP_PARK 2
.Os
.Sh NAME
@@ -38,7 +38,7 @@
.Sh SYNOPSIS
.In lwp.h
.Ft int
-.Fn _lwp_park "const struct timespec *abstime" "lwpid_t unpark" "const void *hint" "const void *unparkhint"
+.Fn _lwp_park "clockid_t clock_id, int flags, const struct timespec *ts" "lwpid_t unpark" "const void *hint" "const void *unparkhint"
.Sh DESCRIPTION
.Fn _lwp_park
can be used to synchronize access to resources among multiple light-weight
@@ -48,8 +48,22 @@
.Bl -bullet
.It
The
-.Fa abstime
-argument is non-NULL, and the absolute UTC time it specifies has passed.
+.Fa ts
+argument is non-NULL, and the time it specifies has passed.
+The
+.Fa ts
+time can be an relative interval to wait if the
+.Ar flags
+argument does not contain
+.Dv TIMER_ABSTIME
+or it can be an absolute time compared to
+.Dv CLOCK_REALTIME
+or
+.Dv CLOCK_MONOTONIC
+depending on the value
+of the
+.Ar clock_id
+argument.
.It
The LWP receives a directed signal posted using
.Fn _lwp_kill ,
@@ -125,14 +139,14 @@
.Fn _lwp_wakeup .
.It Bq Er EINVAL
The time value specified by
-.Fa abstime
+.Fa ts
is invalid.
.It Bq Er ESRCH
No LWP can be found in the current process corresponding to
.Fa unpark .
.It Bq Er ETIMEDOUT
The UTC time specified by
-.Fa abstime
+.Fa ts
has passed.
.El
.Sh SEE ALSO
Home |
Main Index |
Thread Index |
Old Index