summaryrefslogtreecommitdiff
path: root/lib/librthread/rthread_sync.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2005-12-13 06:04:54 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2005-12-13 06:04:54 +0000
commitfabba4b0fc511c15d3ea033f62337e56398b0a1a (patch)
treed0e1b770c5ad8c5be3eac0198f3d1e3d75d0451d /lib/librthread/rthread_sync.c
parent1e92ae8cd984bc9ad364492493deaf80356133b2 (diff)
update thrsleep and thrwakeup - first arg changed from long to void *
Diffstat (limited to 'lib/librthread/rthread_sync.c')
-rw-r--r--lib/librthread/rthread_sync.c14
1 files changed, 7 insertions, 7 deletions
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);