From 6356a9c88e04455186a9b6d683ace14dadb891b7 Mon Sep 17 00:00:00 2001 From: mtm Date: Fri, 23 May 2003 09:48:20 +0000 Subject: 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 --- lib/libthr/thread/thr_mutex.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/libthr/thread/thr_mutex.c') 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 -- cgit v1.1