X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fppmutex.c;h=1ecc026a3e11fd9c472f797004d49e75d9e7ee39;hb=817e3ec506c4095bc4fcc1923cee36153ef4ee43;hp=fa187b231b0ae08c9a55e26b6ca7ad99905ec51a;hpb=1b423121ae5ccbf05ff800ea229a9941b0a52dee;p=pazpar2-moved-to-github.git diff --git a/src/ppmutex.c b/src/ppmutex.c index fa187b2..1ecc026 100644 --- a/src/ppmutex.c +++ b/src/ppmutex.c @@ -1,5 +1,5 @@ /* This file is part of Pazpar2. - Copyright (C) 2006-2010 Index Data + Copyright (C) Index Data Pazpar2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -26,22 +26,21 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #endif #include - +#include #include "ppmutex.h" -static int pazpar2_mutex_debug = 0; +static int ppmutex_level = 0; -void pazpar2_mutex_enable_debug(int debug) +void pazpar2_mutex_init(void) { - pazpar2_mutex_debug = debug; + ppmutex_level = yaz_log_module_level("mutex"); } void pazpar2_mutex_create(YAZ_MUTEX *p, const char *name) { assert(p); yaz_mutex_create(p); - if (pazpar2_mutex_debug && name) - yaz_mutex_set_name(*p, name); + yaz_mutex_set_name(*p, ppmutex_level, name); } /*