summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_umtx.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2004-12-25 13:02:50 +0000
committerdavidxu <davidxu@FreeBSD.org>2004-12-25 13:02:50 +0000
commit9476ffbed8df3ebc72f2548f9db81306e46e27e5 (patch)
tree2eeba36fb1ca4e8e0a8e9c76f7a214b11c07a3a2 /sys/kern/kern_umtx.c
parent7b03c7ecc4225f3c91f0ca8226a08c5f578c1baa (diff)
downloadFreeBSD-src-9476ffbed8df3ebc72f2548f9db81306e46e27e5.zip
FreeBSD-src-9476ffbed8df3ebc72f2548f9db81306e46e27e5.tar.gz
Make _umtx_op() as more general interface, the final parameter needn't be
timespec pointer, every parameter will be interpreted by its opcode.
Diffstat (limited to 'sys/kern/kern_umtx.c')
-rw-r--r--sys/kern/kern_umtx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
index e00b9a6..e0502b8 100644
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -736,10 +736,10 @@ _umtx_op(struct thread *td, struct _umtx_op_args *uap)
switch(uap->op) {
case UMTX_OP_LOCK:
/* Allow a null timespec (wait forever). */
- if (uap->abstime == NULL)
+ if (uap->uaddr2 == NULL)
ts = NULL;
else {
- error = copyin(uap->abstime, &abstime, sizeof(abstime));
+ error = copyin(uap->uaddr2, &abstime, sizeof(abstime));
if (error != 0)
return (error);
if (abstime.tv_nsec >= 1000000000 ||
@@ -752,10 +752,10 @@ _umtx_op(struct thread *td, struct _umtx_op_args *uap)
return do_unlock(td, uap->umtx, uap->id);
case UMTX_OP_UNLOCK_AND_WAIT:
/* Allow a null timespec (wait forever). */
- if (uap->abstime == NULL)
+ if (uap->uaddr2 == NULL)
ts = NULL;
else {
- error = copyin(uap->abstime, &abstime, sizeof(abstime));
+ error = copyin(uap->uaddr2, &abstime, sizeof(abstime));
if (error != 0)
return (error);
if (abstime.tv_nsec >= 1000000000 ||
OpenPOWER on IntegriCloud