Implement 32bit umtx_lock and umtx_unlock system calls, these two system

calls are not used by libthr in RELENG_6 and HEAD, it is only used by
the libthr in RELENG-5, the _umtx_op system call can do more incremental
dirty works than these two system calls without having to introduce new
system calls or throw away old system calls when things are going on.
This commit is contained in:
David Xu 2006-10-06 08:22:08 +00:00
parent d3fbc8d9c0
commit ae7d8a6766
2 changed files with 16 additions and 2 deletions

View File

@ -721,8 +721,8 @@
431 AUE_NULL NOPROTO { void thr_exit(long *state); }
432 AUE_NULL NOPROTO { int thr_self(long *id); }
433 AUE_NULL NOPROTO { int thr_kill(long id, int sig); }
434 AUE_NULL NOPROTO { int _umtx_lock(struct umtx *umtx); }
435 AUE_NULL NOPROTO { int _umtx_unlock(struct umtx *umtx); }
434 AUE_NULL STD { int freebsd32_umtx_lock(struct umtx *umtx); }
435 AUE_NULL STD { int freebsd32_umtx_unlock(struct umtx *umtx); }
436 AUE_NULL NOPROTO { int jail_attach(int jid); }
437 AUE_EXTATTR_LIST_FD UNIMPL extattr_list_fd
438 AUE_EXTATTR_LIST_FILE UNIMPL extattr_list_file

View File

@ -2303,6 +2303,20 @@ _umtx_op(struct thread *td, struct _umtx_op_args *uap)
#ifdef COMPAT_IA32
int
freebsd32_umtx_lock(struct thread *td, struct freebsd32_umtx_lock_args *uap)
/* struct umtx *umtx */
{
return (do_lock_umtx32(td, (uint32_t *)uap->umtx, td->td_tid, NULL));
}
int
freebsd32_umtx_unlock(struct thread *td, struct freebsd32_umtx_unlock_args *uap)
/* struct umtx *umtx */
{
return (do_unlock_umtx32(td, (uint32_t *)uap->umtx, td->td_tid));
}
struct timespec32 {
u_int32_t tv_sec;
u_int32_t tv_nsec;