Date: Mon, 02 Jul 2012 13:09:29 +0000 From: gmiller@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r238800 - in soc2012/gmiller/locking-head: . lib/libwitness Message-ID: <20120702130929.60826106564A@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gmiller Date: Mon Jul 2 13:09:28 2012 New Revision: 238800 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238800 Log: r238613@FreeBSD-dev: root | 2012-06-29 14:39:44 -0500 Properly check return values for pthread_mutex_lock() and pthread_mutex_unlock(). Modified: soc2012/gmiller/locking-head/ (props changed) soc2012/gmiller/locking-head/lib/libwitness/wrappers.c Modified: soc2012/gmiller/locking-head/lib/libwitness/wrappers.c ============================================================================== --- soc2012/gmiller/locking-head/lib/libwitness/wrappers.c Mon Jul 2 12:12:16 2012 (r238799) +++ soc2012/gmiller/locking-head/lib/libwitness/wrappers.c Mon Jul 2 13:09:28 2012 (r238800) @@ -38,7 +38,7 @@ int ret; ret = _pthread_mutex_lock(mutex); - if (mutex != &witness_mtx) { + if (mutex != &witness_mtx && ret == 0) { add_lock(mutex); } @@ -51,7 +51,7 @@ int ret; ret = _pthread_mutex_unlock(mutex); - if (mutex != &witness_mtx) { + if (mutex != &witness_mtx && ret == 0) { remove_lock(mutex); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120702130929.60826106564A>