diff options
author | davidxu <davidxu@FreeBSD.org> | 2007-11-21 05:21:58 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2007-11-21 05:21:58 +0000 |
commit | c63688968a333b863524a975289bc95c25685608 (patch) | |
tree | bd92b4c6d4241b908fcaf1640e5cc6e419dc109b /lib/libthr/thread/thr_umtx.h | |
parent | 648833c9531994ca86ff55eaabdde1c3f8b9e6d0 (diff) | |
download | FreeBSD-src-c63688968a333b863524a975289bc95c25685608.zip FreeBSD-src-c63688968a333b863524a975289bc95c25685608.tar.gz |
Remove umtx_t definition, use type long directly, add wrapper function
_thr_umtx_wait_uint() for umtx operation UMTX_OP_WAIT_UINT, use the
function in semaphore operations, this fixed compiler warnings.
Diffstat (limited to 'lib/libthr/thread/thr_umtx.h')
-rw-r--r-- | lib/libthr/thread/thr_umtx.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libthr/thread/thr_umtx.h b/lib/libthr/thread/thr_umtx.h index 1a60c1a..65d00f2 100644 --- a/lib/libthr/thread/thr_umtx.h +++ b/lib/libthr/thread/thr_umtx.h @@ -32,9 +32,7 @@ #include <strings.h> #include <sys/umtx.h> -#define DEFAULT_UMUTEX {0} - -typedef long umtx_t; +#define DEFAULT_UMUTEX {0,0, {0,0},{0,0,0,0}} int __thr_umutex_lock(struct umutex *mtx) __hidden; int __thr_umutex_timedlock(struct umutex *mtx, @@ -45,9 +43,11 @@ int __thr_umutex_set_ceiling(struct umutex *mtx, uint32_t ceiling, uint32_t *oldceiling) __hidden; void _thr_umutex_init(struct umutex *mtx) __hidden; -int _thr_umtx_wait(volatile umtx_t *mtx, umtx_t exp, +int _thr_umtx_wait(volatile long *mtx, long exp, + const struct timespec *timeout) __hidden; +int _thr_umtx_wait_uint(volatile u_int *mtx, u_int exp, const struct timespec *timeout) __hidden; -int _thr_umtx_wake(volatile umtx_t *mtx, int count) __hidden; +int _thr_umtx_wake(volatile void *mtx, int count) __hidden; int _thr_ucond_wait(struct ucond *cv, struct umutex *m, const struct timespec *timeout, int check_unpaking) __hidden; void _thr_ucond_init(struct ucond *cv) __hidden; |