hrev45146 adds 1 changeset to branch 'master' old head: af5a895fa40721e40810d847d8692f12526fba14 new head: 4f5a4183de6cb47826c135c333375e60ca1434c8 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=4f5a418+%5Eaf5a895 ---------------------------------------------------------------------------- 4f5a418: freebsd network compat layer: a mutex type is actually a bitmap * should fix #9368 [ Jerome Duval <jerome.duval@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev45146 Commit: 4f5a4183de6cb47826c135c333375e60ca1434c8 URL: http://cgit.haiku-os.org/haiku/commit/?id=4f5a418 Author: Jerome Duval <jerome.duval@xxxxxxxxx> Date: Thu Jan 10 21:55:46 2013 UTC Ticket: https://dev.haiku-os.org/ticket/9368 ---------------------------------------------------------------------------- 1 file changed, 4 insertions(+), 4 deletions(-) src/libs/compat/freebsd_network/mutex.c | 8 ++++---- ---------------------------------------------------------------------------- diff --git a/src/libs/compat/freebsd_network/mutex.c b/src/libs/compat/freebsd_network/mutex.c index 3944e60..058be10 100644 --- a/src/libs/compat/freebsd_network/mutex.c +++ b/src/libs/compat/freebsd_network/mutex.c @@ -21,10 +21,10 @@ void mtx_init(struct mtx *mutex, const char *name, const char *type, int options) { - if (options == MTX_DEF) { + if (options & MTX_DEF) { mutex_init_etc(&mutex->u.mutex.lock, name, MUTEX_FLAG_CLONE_NAME); mutex->u.mutex.owner = -1; - } else if (options == MTX_RECURSE) { + } else if (options & MTX_RECURSE) { recursive_lock_init_etc(&mutex->u.recursive, name, MUTEX_FLAG_CLONE_NAME); } else @@ -37,9 +37,9 @@ mtx_init(struct mtx *mutex, const char *name, const char *type, void mtx_destroy(struct mtx *mutex) { - if (mutex->type == MTX_DEF) + if (mutex->type & MTX_DEF) mutex_destroy(&mutex->u.mutex.lock); - else if (mutex->type == MTX_RECURSE) + else if (mutex->type & MTX_RECURSE) recursive_lock_destroy(&mutex->u.recursive); }