diff options
author | mtm <mtm@FreeBSD.org> | 2003-05-23 09:48:20 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-05-23 09:48:20 +0000 |
commit | 6356a9c88e04455186a9b6d683ace14dadb891b7 (patch) | |
tree | a5c7ab227f8b7ea35430bf21cc7cafe1b6b756f3 /lib/libthr/thread/thr_mutex.c | |
parent | 7f8de979fc762dc4b610f5f1bc9b9845a9c638a2 (diff) | |
download | FreeBSD-src-6356a9c88e04455186a9b6d683ace14dadb891b7.zip FreeBSD-src-6356a9c88e04455186a9b6d683ace14dadb891b7.tar.gz |
Make WARNS2 clean. The fixes mostly included:
o removed unused variables
o explicit inclusion of header files
o prototypes for externally defined functions
Approved by: re/blanket libthr
Diffstat (limited to 'lib/libthr/thread/thr_mutex.c')
-rw-r--r-- | lib/libthr/thread/thr_mutex.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index c6c80b4..aa3a96f 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -64,6 +64,7 @@ */ static int get_muncontested(pthread_mutex_t, int); static void get_mcontested(pthread_mutex_t); +static int mutex_lock_common(pthread_mutex_t *, int); static inline int mutex_self_trylock(pthread_mutex_t); static inline int mutex_self_lock(pthread_mutex_t); static inline int mutex_unlock_common(pthread_mutex_t *, int); @@ -1381,13 +1382,14 @@ mutex_queue_enq(pthread_mutex_t mutex, pthread_t pthread) static int get_muncontested(pthread_mutex_t mutexp, int nonblock) { - if (mutexp->m_owner != NULL && mutexp->m_owner != curthread) + if (mutexp->m_owner != NULL && mutexp->m_owner != curthread) { return (-1); - else if (mutexp->m_owner == curthread) + } else if (mutexp->m_owner == curthread) { if (nonblock) return (mutex_self_trylock(mutexp)); else return (mutex_self_lock(mutexp)); + } /* * The mutex belongs to this thread now. Mark it as |