From da5fb9ef5952a2e8b0595e74b52640ce80880d08 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 14 Jan 2005 02:20:27 +0000 Subject: [PATCH] Add syscall primitives for generic userland accessible sleep/wakeup functions. These functions are capable of sleeping and waking up based on a generic user VM address. Programs capable of sharing memory are also capable of interaction through these functions. Also regenerate our system calls. umtx_sleep(ptr, matchvalue, timeout) If *(int *)ptr (userland pointer) does not match the matchvalue, sleep for timeout microseconds. Access to the contents of *ptr plus entering the sleep is interlocked against calls to umtx_wakeup(). Various error codes are turned depending on what causes the function to return. Note that the timeout may not exceed 1 second. utmx_wakeup(ptr, count) Wakeup at least count processes waiting on the specified userland address. A count of 0 wakes all waiting processes up. This function interlocks against umtx_sleep(). The typical race case showing resolution between two userland processes is shown below. A process releasing a contested mutex may adjust the contents of the pointer after the kernel has tested *ptr in umtx_sleep(), but this does not matter because the first process will see that the mutex is set to a contested state and will call wakeup after changing the contents of the pointer. Thus, the kernel itself does not have to execute any compare-and-exchange operations in order to support userland mutexes. PROCESS 1 PROCESS 2 ******** RACE#1 ****** cmp_exg(ptr, FREE, HELD) . cmp_exg(ptr, HELD, CONTESTED) . umtx_sleep(ptr, CONTESTED, 0) . [kernel tests *ptr] <<<< COMPARE vs cmp_exg(CONTESTED, FREE) . <<<< CHANGE . tsleep(....) umtx_wakeup(ptr, 1) . . . . . PROCESS 1 PROCESS 2 ******** RACE#2 ****** cmp_exg(ptr, FREE, HELD) cmp_exg(ptr, HELD, CONTESTED) umtx_sleep(ptr, CONTESTED, 0) cmp_exg(CONTESTED, FREE) <<<< CHANGE vs umtx_wakeup(ptr, 1) [kernel tests *ptr] <<<< COMPARE [MISMATCH, DO NOT TSLEEP] These functions are very loosely based on Jeff Roberson's umtx work in FreeBSD. These functions are greatly simplified relative to that work in order to provide a more generic mechanism. This is precursor work for a port of David Xu's 1:1 userland threading library. --- include/unistd.h | 4 +- sys/kern/init_sysent.c | 6 +- sys/kern/kern_synch.c | 23 ++++-- sys/kern/kern_umtx.c | 149 +++++++++++++++++++++++++++++++++++++++ sys/kern/syscalls.master | 4 +- sys/sys/param.h | 10 +-- sys/sys/syscall-args | 8 ++- sys/sys/syscall-hide.h | 6 +- sys/sys/syscall.h | 8 ++- sys/sys/syscall.mk | 8 ++- sys/sys/sysproto.h | 25 ++++++- sys/sys/systm.h | 4 +- sys/sys/sysunion.h | 6 +- sys/sys/thread.h | 5 +- 14 files changed, 233 insertions(+), 33 deletions(-) create mode 100644 sys/kern/kern_umtx.c diff --git a/include/unistd.h b/include/unistd.h index 19b4e3d5fa..97f08b2c36 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -32,7 +32,7 @@ * * @(#)unistd.h 8.12 (Berkeley) 4/27/95 * $FreeBSD: src/include/unistd.h,v 1.35.2.10 2002/04/15 12:52:28 nectar Exp $ - * $DragonFly: src/include/unistd.h,v 1.9 2004/11/07 21:38:01 liamfoy Exp $ + * $DragonFly: src/include/unistd.h,v 1.10 2005/01/14 02:20:27 dillon Exp $ */ #ifndef _UNISTD_H_ @@ -215,6 +215,8 @@ int truncate(const char *, off_t); #endif int ttyslot(void); unsigned int ualarm(unsigned int, unsigned int); +int umtx_sleep(const int *, int , int); +int umtx_wakeup(const void *, int); int undelete(const char *); int unwhiteout(const char *); int usleep(unsigned int); diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 4a2f716230..8abc1540bb 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/kern/init_sysent.c,v 1.20 2004/12/29 02:40:02 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.14 2004/12/24 05:00:17 dillon Exp + * $DragonFly: src/sys/kern/init_sysent.c,v 1.21 2005/01/14 02:20:22 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.15 2004/12/29 02:40:02 dillon Exp */ #include "opt_compat.h" @@ -491,4 +491,6 @@ struct sysent sysent[] = { { AS(exec_sys_unregister_args), (sy_call_t *)exec_sys_unregister }, /* 466 = exec_sys_unregister */ { AS(sys_checkpoint_args), (sy_call_t *)sys_checkpoint }, /* 467 = sys_checkpoint */ { AS(mountctl_args), (sy_call_t *)mountctl }, /* 468 = mountctl */ + { AS(umtx_sleep_args), (sy_call_t *)umtx_sleep }, /* 469 = umtx_sleep */ + { AS(umtx_wakeup_args), (sy_call_t *)umtx_wakeup }, /* 470 = umtx_wakeup */ }; diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 07e12d619e..75e0efa530 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -37,7 +37,7 @@ * * @(#)kern_synch.c 8.9 (Berkeley) 5/19/95 * $FreeBSD: src/sys/kern/kern_synch.c,v 1.87.2.6 2002/10/13 07:29:53 kbyanc Exp $ - * $DragonFly: src/sys/kern/kern_synch.c,v 1.40 2005/01/13 23:08:03 dillon Exp $ + * $DragonFly: src/sys/kern/kern_synch.c,v 1.41 2005/01/14 02:20:22 dillon Exp $ */ #include "opt_ktrace.h" @@ -371,6 +371,7 @@ tsleep(void *ident, int flags, const char *wmesg, int timo) td->td_wchan = ident; td->td_wmesg = wmesg; + td->td_wdomain = flags & PDOMAIN_MASK; if (p) { if (flags & PNORESCHED) td->td_flags |= TDF_NORESCHED; @@ -543,7 +544,7 @@ xwakeup(struct xwait *w) * Make all processes sleeping on the specified identifier runnable. */ static void -_wakeup(void *ident, int count) +_wakeup(void *ident, int domain, int count) { struct slpquehead *qp; struct thread *td; @@ -556,7 +557,7 @@ _wakeup(void *ident, int count) restart: for (td = TAILQ_FIRST(qp); td != NULL; td = ntd) { ntd = TAILQ_NEXT(td, td_threadq); - if (td->td_wchan == ident) { + if (td->td_wchan == ident && td->td_wdomain == domain) { TAILQ_REMOVE(qp, td, td_threadq); td->td_wchan = NULL; if ((p = td->td_proc) != NULL && p->p_stat == SSLEEP) { @@ -594,13 +595,25 @@ restart: void wakeup(void *ident) { - _wakeup(ident, 0); + _wakeup(ident, 0, 0); } void wakeup_one(void *ident) { - _wakeup(ident, 1); + _wakeup(ident, 0, 1); +} + +void +wakeup_domain(void *ident, int domain) +{ + _wakeup(ident, domain, 0); +} + +void +wakeup_domain_one(void *ident, int domain) +{ + _wakeup(ident, domain, 1); } /* diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c new file mode 100644 index 0000000000..e7caeccbcf --- /dev/null +++ b/sys/kern/kern_umtx.c @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2003,2004 The DragonFly Project. All rights reserved. + * + * This code is derived from software contributed to The DragonFly Project + * by Matthew Dillon and David Xu + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name of The DragonFly Project nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific, prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $DragonFly: src/sys/kern/kern_umtx.c,v 1.1 2005/01/14 02:20:21 dillon Exp $ + */ + +/* + * This module implements userland mutex helper functions. umtx_sleep() + * handling blocking and umtx_wakeup() handles wakeups. The sleep/wakeup + * functions operate on user addresses. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * If the contents of the userland-supplied pointer matches the specified + * value enter an interruptable sleep for up to microseconds. + * If the contents does not match then return immediately. + * + * The specified timeout may not exceed 1 second. + * + * Returns 0 if we slept and were woken up, -1 and ETIMEDOUT if we slept + * and timed out, and EBUSY if the contents of the pointer did not match + * the specified value. A timeout of 0 indicates an unlimited sleep. + * EINTR is returned if the call was interrupted by a signal. + * + * This function interlocks against call to umtx_wakeup. It does NOT interlock + * against changes in *ptr. However, it does not have to. The standard use + * of *ptr is to differentiate between an uncontested and a contested mutex + * and call umtx_wakeup when releasing a contested mutex. Therefore we can + * safely race against changes in *ptr as long as we are properly interlocked + * against the umtx_wakeup() call. + * + * The VM page associated with the mutex is held to prevent reuse in order + * to guarentee that the physical address remains consistent. + * + * umtx_sleep { const int *ptr, int value, int timeout } + */ +int +umtx_sleep(struct umtx_sleep_args *uap) +{ + int error = EBUSY; + vm_paddr_t pa; + vm_page_t m; + void *waddr; + int timeout; + + if ((unsigned int)uap->timeout > 1000000) + return (EINVAL); + if (vm_fault_quick((caddr_t)__DECONST(char *, uap->ptr), VM_PROT_READ) < 0) + return (EFAULT); + + if (fuword(uap->ptr) == uap->value) { + if ((pa = pmap_kextract((vm_offset_t)uap->ptr)) == 0) + return (EFAULT); + m = PHYS_TO_VM_PAGE(pa); + vm_page_hold(m); + + if ((timeout = uap->timeout) != 0) + timeout = (timeout * hz + 999999) / 1000000; + waddr = (void *)((intptr_t)pa + ((intptr_t)uap->ptr & PAGE_MASK)); + error = tsleep(waddr, PCATCH|PDOMAIN_UMTX, "umtxsl", timeout); + vm_page_unhold(m); + } else { + error = EBUSY; + } + return(error); +} + +/* + * umtx_wakeup { const int *ptr, int count } + * + * Wakeup the specified number of processes held in umtx_sleep() on the + * specified user address. A count of 0 wakes up all waiting processes. + * + * XXX assumes that the physical address space does not exceed the virtual + * address space. + */ +int +umtx_wakeup(struct umtx_wakeup_args *uap) +{ + vm_paddr_t pa; + void *waddr; + + cpu_mb2(); + if (vm_fault_quick((caddr_t)__DECONST(char *, uap->ptr), VM_PROT_READ) < 0) + return (EFAULT); + if ((pa = pmap_kextract((vm_offset_t)uap->ptr)) == 0) + return (EFAULT); + waddr = (void *)((intptr_t)pa + ((intptr_t)uap->ptr & PAGE_MASK)); + if (uap->count == 1) { + wakeup_domain_one(waddr, PDOMAIN_UMTX); + } else { + /* XXX wakes them all up for now */ + wakeup_domain(waddr, PDOMAIN_UMTX); + } + return(0); +} + diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 1591cbc226..c3e015cf56 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ - $DragonFly: src/sys/kern/syscalls.master,v 1.15 2004/12/29 02:40:02 dillon Exp $ + $DragonFly: src/sys/kern/syscalls.master,v 1.16 2005/01/14 02:20:22 dillon Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; $FreeBSD: src/sys/kern/syscalls.master,v 1.72.2.10 2002/07/12 08:22:46 alfred Exp $ @@ -631,3 +631,5 @@ 466 STD BSD { int exec_sys_unregister(int id); } 467 STD BSD { int sys_checkpoint(int type, int fd, pid_t pid, int retval); } 468 STD BSD { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); } +469 STD BSD { int umtx_sleep(const int *ptr, int value, int timeout); } +470 STD BSD { int umtx_wakeup(const void *ptr, int count); } diff --git a/sys/sys/param.h b/sys/sys/param.h index be5b9ef7b4..0a0241d570 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -37,7 +37,7 @@ * * @(#)param.h 8.3 (Berkeley) 4/4/95 * $FreeBSD: src/sys/sys/param.h,v 1.61.2.38 2003/05/22 17:12:01 fjoe Exp $ - * $DragonFly: src/sys/sys/param.h,v 1.19 2004/10/07 01:33:31 dillon Exp $ + * $DragonFly: src/sys/sys/param.h,v 1.20 2005/01/14 02:20:24 dillon Exp $ */ #ifndef _SYS_PARAM_H_ @@ -128,9 +128,11 @@ #define PRIBASE_THREAD 384 /* huh? */ #define PRIBASE_NULL 512 -#define PCATCH 0x0100 /* OR'd with pri for tsleep to check signals */ -#define PUSRFLAG1 0x0200 /* Subsystem specific flag */ -#define PNORESCHED 0x0400 /* Do not force a reschedule on wakeup */ +#define PCATCH 0x00000100 /* tsleep checks signals */ +#define PUSRFLAG1 0x00000200 /* Subsystem specific flag */ +#define PNORESCHED 0x00000400 /* No reschedule on wakeup */ +#define PDOMAIN_MASK 0xFFFF0000 /* address domains for wakeup */ +#define PDOMAIN_UMTX 0x00010000 /* independant domain for UMTX */ #define NZERO 0 /* default "nice" */ diff --git a/sys/sys/syscall-args b/sys/sys/syscall-args index 72506406cb..64a8b9b9db 100644 --- a/sys/sys/syscall-args +++ b/sys/sys/syscall-args @@ -1,8 +1,8 @@ # System call argument table. # DO NOT EDIT-- this file is automatically generated. -# $DragonFly: src/sys/sys/Attic/syscall-args,v 1.4 2004/12/29 02:40:03 dillon Exp $ +# $DragonFly: src/sys/sys/Attic/syscall-args,v 1.5 2005/01/14 02:20:24 dillon Exp $ -# Created from DragonFly: src/sys/kern/syscalls.master,v 1.14 2004/12/24 05:00:17 dillon Exp +# Created from DragonFly: src/sys/kern/syscalls.master,v 1.15 2004/12/29 02:40:02 dillon Exp int syscall nosys nosys_args void exit sys_exit sys_exit_args int rval @@ -255,4 +255,6 @@ int caps_sys_setgen caps_sys_setgen caps_sys_setgen_args int portid off_t gen int exec_sys_register exec_sys_register exec_sys_register_args void * entry int exec_sys_unregister exec_sys_unregister exec_sys_unregister_args int id int sys_checkpoint sys_checkpoint sys_checkpoint_args int type int fd pid_t pid int retval -int mountctl mountctl mountctl_args char * path int op int fd const void * ctl int ctllen void * buf int buflen +int mountctl mountctl mountctl_args const char * path int op int fd const void * ctl int ctllen void * buf int buflen +int umtx_sleep umtx_sleep umtx_sleep_args const int * ptr int value int timeout +int umtx_wakeup umtx_wakeup umtx_wakeup_args const void * ptr int count diff --git a/sys/sys/syscall-hide.h b/sys/sys/syscall-hide.h index ccdc232ad3..414c394c83 100644 --- a/sys/sys/syscall-hide.h +++ b/sys/sys/syscall-hide.h @@ -2,8 +2,8 @@ * System call hiders. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/syscall-hide.h,v 1.21 2004/12/29 02:40:03 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.14 2004/12/24 05:00:17 dillon Exp + * $DragonFly: src/sys/sys/syscall-hide.h,v 1.22 2005/01/14 02:20:24 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.15 2004/12/29 02:40:02 dillon Exp */ HIDE_POSIX(fork) @@ -294,3 +294,5 @@ HIDE_BSD(exec_sys_register) HIDE_BSD(exec_sys_unregister) HIDE_BSD(sys_checkpoint) HIDE_BSD(mountctl) +HIDE_BSD(umtx_sleep) +HIDE_BSD(umtx_wakeup) diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 52cb4c9498..553ecd9d64 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/syscall.h,v 1.21 2004/12/29 02:40:03 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.14 2004/12/24 05:00:17 dillon Exp + * $DragonFly: src/sys/sys/syscall.h,v 1.22 2005/01/14 02:20:24 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.15 2004/12/29 02:40:02 dillon Exp */ #define SYS_syscall 0 @@ -305,4 +305,6 @@ #define SYS_exec_sys_unregister 466 #define SYS_sys_checkpoint 467 #define SYS_mountctl 468 -#define SYS_MAXSYSCALL 469 +#define SYS_umtx_sleep 469 +#define SYS_umtx_wakeup 470 +#define SYS_MAXSYSCALL 471 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 0ead23388b..9cbb1e33a1 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -1,7 +1,7 @@ # DragonFly system call names. # DO NOT EDIT-- this file is automatically generated. -# $DragonFly: src/sys/sys/syscall.mk,v 1.21 2004/12/29 02:40:03 dillon Exp $ -# created from DragonFly: src/sys/kern/syscalls.master,v 1.14 2004/12/24 05:00:17 dillon Exp +# $DragonFly: src/sys/sys/syscall.mk,v 1.22 2005/01/14 02:20:24 dillon Exp $ +# created from DragonFly: src/sys/kern/syscalls.master,v 1.15 2004/12/29 02:40:02 dillon Exp MIASM = \ syscall.o \ exit.o \ @@ -254,4 +254,6 @@ MIASM = \ exec_sys_register.o \ exec_sys_unregister.o \ sys_checkpoint.o \ - mountctl.o + mountctl.o \ + umtx_sleep.o \ + umtx_wakeup.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 84c3a618df..c92b84b6ca 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/sysproto.h,v 1.21 2004/12/29 02:40:03 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.14 2004/12/24 05:00:17 dillon Exp + * $DragonFly: src/sys/sys/sysproto.h,v 1.22 2005/01/14 02:20:24 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.15 2004/12/29 02:40:02 dillon Exp */ #ifndef _SYS_SYSPROTO_H_ @@ -2127,7 +2127,7 @@ struct mountctl_args { struct sysmsg sysmsg; #endif union usrmsg usrmsg; - char * path; char path_[PAD_(char *)]; + const char * path; char path_[PAD_(const char *)]; int op; char op_[PAD_(int)]; int fd; char fd_[PAD_(int)]; const void * ctl; char ctl_[PAD_(const void *)]; @@ -2135,6 +2135,23 @@ struct mountctl_args { void * buf; char buf_[PAD_(void *)]; int buflen; char buflen_[PAD_(int)]; }; +struct umtx_sleep_args { +#ifdef _KERNEL + struct sysmsg sysmsg; +#endif + union usrmsg usrmsg; + const int * ptr; char ptr_[PAD_(const int *)]; + int value; char value_[PAD_(int)]; + int timeout; char timeout_[PAD_(int)]; +}; +struct umtx_wakeup_args { +#ifdef _KERNEL + struct sysmsg sysmsg; +#endif + union usrmsg usrmsg; + const void * ptr; char ptr_[PAD_(const void *)]; + int count; char count_[PAD_(int)]; +}; #ifdef _KERNEL @@ -2388,6 +2405,8 @@ int exec_sys_register (struct exec_sys_register_args *); int exec_sys_unregister (struct exec_sys_unregister_args *); int sys_checkpoint (struct sys_checkpoint_args *); int mountctl (struct mountctl_args *); +int umtx_sleep (struct umtx_sleep_args *); +int umtx_wakeup (struct umtx_wakeup_args *); #endif /* _KERNEL */ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index cc68f5f5c0..00a60b8d2a 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -37,7 +37,7 @@ * * @(#)systm.h 8.7 (Berkeley) 3/29/95 * $FreeBSD: src/sys/sys/systm.h,v 1.111.2.18 2002/12/17 18:04:02 sam Exp $ - * $DragonFly: src/sys/sys/systm.h,v 1.25 2004/12/30 07:01:52 cpressey Exp $ + * $DragonFly: src/sys/sys/systm.h,v 1.26 2005/01/14 02:20:24 dillon Exp $ */ #ifndef _SYS_SYSTM_H_ @@ -366,6 +366,8 @@ extern watchdog_tickle_fn wdog_tickler; int tsleep (void *chan, int slpflags, const char *wmesg, int timo); void wakeup (void *chan); void wakeup_one (void *chan); +void wakeup_domain (void *chan, int domain); +void wakeup_domain_one (void *chan, int domain); /* * Common `dev_t' stuff are declared here to avoid #include poisoning diff --git a/sys/sys/sysunion.h b/sys/sys/sysunion.h index b22b709f80..6f5ab981ff 100644 --- a/sys/sys/sysunion.h +++ b/sys/sys/sysunion.h @@ -2,8 +2,8 @@ * Union of syscall args for messaging. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/sysunion.h,v 1.18 2004/12/29 02:40:03 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.14 2004/12/24 05:00:17 dillon Exp + * $DragonFly: src/sys/sys/sysunion.h,v 1.19 2005/01/14 02:20:24 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.15 2004/12/29 02:40:02 dillon Exp */ union sysunion { @@ -339,4 +339,6 @@ union sysunion { struct exec_sys_unregister_args exec_sys_unregister; struct sys_checkpoint_args sys_checkpoint; struct mountctl_args mountctl; + struct umtx_sleep_args umtx_sleep; + struct umtx_wakeup_args umtx_wakeup; }; diff --git a/sys/sys/thread.h b/sys/sys/thread.h index a52b436acc..793aa6596e 100644 --- a/sys/sys/thread.h +++ b/sys/sys/thread.h @@ -7,7 +7,7 @@ * Types which must already be defined when this header is included by * userland: struct md_thread * - * $DragonFly: src/sys/sys/thread.h,v 1.59 2004/10/13 19:51:31 dillon Exp $ + * $DragonFly: src/sys/sys/thread.h,v 1.60 2005/01/14 02:20:24 dillon Exp $ */ #ifndef _SYS_THREAD_H_ @@ -213,8 +213,7 @@ struct thread { void *td_wchan; /* waiting on channel */ int td_pri; /* 0-31, 31=highest priority (note 1) */ int td_flags; /* TDF flags */ - int td_gen; /* wait queue chasing generation number */ - /* maybe preempt */ + int td_wdomain; /* domain for wchan address (typ 0) */ void (*td_preemptable)(struct thread *td, int critpri); void (*td_release)(struct thread *td); union { -- 2.41.0