diff options
| author | David Xu <davidxu@FreeBSD.org> | 2006-09-06 04:04:10 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2006-09-06 04:04:10 +0000 |
| commit | bddd24cd9c3e6144282ff7eaa92a3ad032e5be7b (patch) | |
| tree | 7044b040d8f18506b5f3294848fd18b67eaf0bd2 /lib/libthr/thread/thr_umtx.c | |
| parent | b2d24734cd9e4cf85ca2015468e1b29f8468bfb7 (diff) | |
Notes
Diffstat (limited to 'lib/libthr/thread/thr_umtx.c')
| -rw-r--r-- | lib/libthr/thread/thr_umtx.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/libthr/thread/thr_umtx.c b/lib/libthr/thread/thr_umtx.c index a42091b74b30..ec19ae92b57f 100644 --- a/lib/libthr/thread/thr_umtx.c +++ b/lib/libthr/thread/thr_umtx.c @@ -31,37 +31,6 @@ #include "thr_umtx.h" int -__thr_umtx_lock(volatile umtx_t *mtx, long id) -{ - while (_umtx_op(__DEVOLATILE(struct umtx *, mtx), - UMTX_OP_LOCK, id, 0, 0)) - ; - return (0); -} - -int -__thr_umtx_timedlock(volatile umtx_t *mtx, long id, - const struct timespec *timeout) -{ - if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 && - timeout->tv_nsec <= 0))) - return (ETIMEDOUT); - if (_umtx_op(__DEVOLATILE(struct umtx *, mtx), UMTX_OP_LOCK, id, 0, - __DECONST(void *, timeout)) == 0) - return (0); - return (errno); -} - -int -__thr_umtx_unlock(volatile umtx_t *mtx, long id) -{ - if (_umtx_op(__DEVOLATILE(struct umtx *, mtx), UMTX_OP_UNLOCK, - id, 0, 0) == 0) - return (0); - return (errno); -} - -int __thr_umutex_lock(struct umutex *mtx, uint32_t id) { if (_umtx_op(mtx, UMTX_OP_MUTEX_LOCK, 0, 0, 0) == 0) |
