Make _umtx_op() as more general interface, the final parameter needn't be
timespec pointer, every parameter will be interpreted by its opcode.
This commit is contained in:
parent
8b37fbabb4
commit
c180db2bce
@ -3,7 +3,7 @@
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* $FreeBSD$
|
||||
* created from FreeBSD: src/sys/kern/syscalls.master,v 1.180 2004/11/25 12:07:28 phk Exp
|
||||
* created from FreeBSD: src/sys/kern/syscalls.master,v 1.181 2004/12/18 12:52:44 davidxu Exp
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
|
@ -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 ||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* $FreeBSD$
|
||||
* created from FreeBSD: src/sys/kern/syscalls.master,v 1.180 2004/11/25 12:07:28 phk Exp
|
||||
* created from FreeBSD: src/sys/kern/syscalls.master,v 1.181 2004/12/18 12:52:44 davidxu Exp
|
||||
*/
|
||||
|
||||
const char *syscallnames[] = {
|
||||
|
@ -644,6 +644,6 @@
|
||||
*auditinfo_addr, u_int length); }
|
||||
453 MNOSTD { int auditctl(int cmd, char *path); }
|
||||
454 MSTD { int _umtx_op(struct umtx *umtx, int op, long id, void *uaddr,\
|
||||
struct timespec *abstime); }
|
||||
void *uaddr2); }
|
||||
; Please copy any additions and changes to the following compatability tables:
|
||||
; sys/compat/freebsd32/syscalls.master
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* $FreeBSD$
|
||||
* created from FreeBSD: src/sys/kern/syscalls.master,v 1.180 2004/11/25 12:07:28 phk Exp
|
||||
* created from FreeBSD: src/sys/kern/syscalls.master,v 1.181 2004/12/18 12:52:44 davidxu Exp
|
||||
*/
|
||||
|
||||
#define SYS_syscall 0
|
||||
|
@ -1,7 +1,7 @@
|
||||
# FreeBSD system call names.
|
||||
# DO NOT EDIT-- this file is automatically generated.
|
||||
# $FreeBSD$
|
||||
# created from FreeBSD: src/sys/kern/syscalls.master,v 1.180 2004/11/25 12:07:28 phk Exp
|
||||
# created from FreeBSD: src/sys/kern/syscalls.master,v 1.181 2004/12/18 12:52:44 davidxu Exp
|
||||
MIASM = \
|
||||
syscall.o \
|
||||
exit.o \
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* $FreeBSD$
|
||||
* created from FreeBSD: src/sys/kern/syscalls.master,v 1.180 2004/11/25 12:07:28 phk Exp
|
||||
* created from FreeBSD: src/sys/kern/syscalls.master,v 1.181 2004/12/18 12:52:44 davidxu Exp
|
||||
*/
|
||||
|
||||
#ifndef _SYS_SYSPROTO_H_
|
||||
@ -1347,7 +1347,7 @@ struct _umtx_op_args {
|
||||
char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)];
|
||||
char id_l_[PADL_(long)]; long id; char id_r_[PADR_(long)];
|
||||
char uaddr_l_[PADL_(void *)]; void * uaddr; char uaddr_r_[PADR_(void *)];
|
||||
char abstime_l_[PADL_(struct timespec *)]; struct timespec * abstime; char abstime_r_[PADR_(struct timespec *)];
|
||||
char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)];
|
||||
};
|
||||
int nosys(struct thread *, struct nosys_args *);
|
||||
void sys_exit(struct thread *, struct sys_exit_args *);
|
||||
|
@ -58,8 +58,7 @@ struct umtx {
|
||||
int _umtx_lock(struct umtx *mtx);
|
||||
/* deprecated becaues it can only use thread id */
|
||||
int _umtx_unlock(struct umtx *mtx);
|
||||
int _umtx_op(struct umtx *umtx, int op, long id, void *uaddr,
|
||||
struct timespec *abstime);
|
||||
int _umtx_op(struct umtx *umtx, int op, long id, void *uaddr, void *uaddr2);
|
||||
|
||||
/*
|
||||
* Standard api. Try uncontested acquire/release and asks the
|
||||
|
Loading…
x
Reference in New Issue
Block a user