summaryrefslogtreecommitdiff
path: root/lib/libpthread/uthread
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-01-10 23:13:25 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-01-10 23:13:25 +0000
commitf22563e53bced2029700de769e280f710dff43ad (patch)
tree0c3aa4f5036cf066a1ee09fb1a36a39d4a4aec1d /lib/libpthread/uthread
parent2bac709a82004fa9918b2ea5051d59e8e5ed1720 (diff)
no need to cast any more
Diffstat (limited to 'lib/libpthread/uthread')
-rw-r--r--lib/libpthread/uthread/uthread_spinlock.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libpthread/uthread/uthread_spinlock.c b/lib/libpthread/uthread/uthread_spinlock.c
index d06946face3..a7284cd0139 100644
--- a/lib/libpthread/uthread/uthread_spinlock.c
+++ b/lib/libpthread/uthread/uthread_spinlock.c
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* $FreeBSD: uthread_spinlock.c,v 1.4 1998/06/09 23:13:10 jb Exp $
- * $OpenBSD: uthread_spinlock.c,v 1.3 1998/12/23 22:49:47 d Exp $
+ * $OpenBSD: uthread_spinlock.c,v 1.4 1999/01/10 23:13:24 d Exp $
*
*/
@@ -61,12 +61,12 @@ _spinlock(spinlock_t *lck)
sched_yield();
/* Check if already locked by the running thread: */
- if (lck->lock_owner == (long) _thread_run)
+ if (lck->lock_owner == _thread_run)
return;
}
/* The running thread now owns the lock: */
- lck->lock_owner = (long) _thread_run;
+ lck->lock_owner = _thread_run;
}
/*
@@ -91,7 +91,7 @@ _spinlock_debug(spinlock_t *lck, const char *fname, int lineno)
sched_yield();
/* Check if already locked by the running thread: */
- if (lck->lock_owner == (long) _thread_run) {
+ if (lck->lock_owner == _thread_run) {
char str[256];
snprintf(str, sizeof(str), "%s - Warning: Thread %p attempted to lock %p from %s (%d) which it had already locked in %s (%d)\n", __progname, _thread_run, lck, fname, lineno, lck->fname, lck->lineno);
_thread_sys_write(2,str,strlen(str));
@@ -103,7 +103,7 @@ _spinlock_debug(spinlock_t *lck, const char *fname, int lineno)
}
/* The running thread now owns the lock: */
- lck->lock_owner = (long) _thread_run;
+ lck->lock_owner = _thread_run;
lck->fname = fname;
lck->lineno = lineno;
}