diff options
Diffstat (limited to 'lib/librthread')
-rw-r--r-- | lib/librthread/rthread_sig.c | 10 | ||||
-rw-r--r-- | lib/librthread/rthread_sync.c | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/librthread/rthread_sig.c b/lib/librthread/rthread_sig.c index 5fcb9002e86..18d1e4a8a87 100644 --- a/lib/librthread/rthread_sig.c +++ b/lib/librthread/rthread_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_sig.c,v 1.1 2005/12/03 18:16:19 tedu Exp $ */ +/* $OpenBSD: rthread_sig.c,v 1.2 2005/12/13 06:04:53 tedu Exp $ */ /* * Copyright (c) 2004 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -36,8 +36,8 @@ #include "rthread.h" -int thrwakeup(long); -int thrsleep(long, int, void *); +int thrwakeup(void *); +int thrsleep(void *, int, void *); int thrsigdivert(const sigset_t *); int @@ -60,7 +60,7 @@ sigwait_handler(int sig) { pthread_t self = pthread_self(); self->sigpend = sig; - thrwakeup((long)&self->sigpend); + thrwakeup(&self->sigpend); } typedef void (*sigfn)(int); @@ -79,7 +79,7 @@ sigwait(const sigset_t *set, int *sig) } thrsigdivert(set); - thrsleep((long)&self->sigpend, 0, NULL); + thrsleep(&self->sigpend, 0, NULL); for (i = 0; i < NSIG; i++) { if (mask & (1 << i)) diff --git a/lib/librthread/rthread_sync.c b/lib/librthread/rthread_sync.c index 3cc11a8a8ec..56b7fcda0d9 100644 --- a/lib/librthread/rthread_sync.c +++ b/lib/librthread/rthread_sync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_sync.c,v 1.4 2005/12/13 05:56:55 tedu Exp $ */ +/* $OpenBSD: rthread_sync.c,v 1.5 2005/12/13 06:04:53 tedu Exp $ */ /* * Copyright (c) 2004 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -38,8 +38,8 @@ #include "rthread.h" -int thrsleep(long, int, void *); -int thrwakeup(long); +int thrsleep(void *, int, void *); +int thrwakeup(void *); /* * Internal implementation of semaphores @@ -64,7 +64,7 @@ again: } if (do_sleep) { - if (thrsleep((long)sem, timo, &sem->lock) == EWOULDBLOCK) + if (thrsleep(sem, timo, &sem->lock) == EWOULDBLOCK) return (0); _spinlock(&sem->lock); sem->waitcount--; @@ -83,7 +83,7 @@ _sem_post(sem_t sem) _spinlock(&sem->lock); sem->value++; if (sem->waitcount) { - thrwakeup((long)sem); + thrwakeup(sem); rv = 1; } _spinunlock(&sem->lock); @@ -99,7 +99,7 @@ _sem_wakeup(sem_t sem) _spinlock(&sem->lock); if (sem->waitcount) { sem->value++; - thrwakeup((long)sem); + thrwakeup(sem); rv = 1; } _spinunlock(&sem->lock); @@ -115,7 +115,7 @@ _sem_wakeall(sem_t sem) _spinlock(&sem->lock); rv = sem->waitcount; sem->value += rv; - thrwakeup((long)sem); + thrwakeup(sem); _spinunlock(&sem->lock); return (rv); |