diff options
Diffstat (limited to 'sys/vm/vm_glue.c')
| -rw-r--r-- | sys/vm/vm_glue.c | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index d3f818dcba8..83d253b6353 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_glue.c,v 1.15 1996/05/22 12:03:13 deraadt Exp $ */ +/* $OpenBSD: vm_glue.c,v 1.16 1996/05/28 12:16:32 deraadt Exp $ */ /* $NetBSD: vm_glue.c,v 1.55 1996/05/19 10:00:38 ragge Exp $ */ /* @@ -548,6 +548,59 @@ swapout(p) } /* + * The rest of these routines fake thread handling + */ + +void +assert_wait(event, ruptible) + void *event; + boolean_t ruptible; +{ +#ifdef lint + ruptible++; +#endif + curproc->p_thread = event; +} + +void +thread_block() +{ + int s = splhigh(); + + if (curproc->p_thread) + tsleep(curproc->p_thread, PVM, "thrd_block", 0); + splx(s); +} + +void +thread_sleep(event, lock, ruptible) + void *event; + simple_lock_t lock; + boolean_t ruptible; +{ + int s = splhigh(); + +#ifdef lint + ruptible++; +#endif + curproc->p_thread = event; + simple_unlock(lock); + if (curproc->p_thread) + tsleep(event, PVM, "thrd_sleep", 0); + splx(s); +} + +void +thread_wakeup(event) + void *event; +{ + int s = splhigh(); + + wakeup(event); + splx(s); +} + +/* * DEBUG stuff */ |
