improved debug statements
This commit is contained in:
parent
2d42313e8f
commit
b96ed88bec
4
Makefile
4
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 1.2.3
|
||||
|
||||
CFLAGS += -O2 -g -Wall -Wextra -Wshadow -fanalyzer -fsanitize=undefined \
|
||||
-Wno-analyzer-file-leak\
|
||||
CFLAGS += -O2 -g -Wall -Wextra -Wshadow \
|
||||
-fsanitize=undefined -fanalyzer -Wno-analyzer-file-leak\
|
||||
-rdynamic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"$(VERSION)\"\
|
||||
`pkg-config --cflags-only-I gumbo libcurl fuse uuid expat`
|
||||
LDFLAGS += `pkg-config --libs-only-L gumbo libcurl fuse uuid expat`
|
||||
|
|
|
@ -89,7 +89,9 @@ static char *CacheSystem_calc_dir(const char *url)
|
|||
|
||||
void CacheSystem_init(const char *path, int url_supplied)
|
||||
{
|
||||
if (pthread_mutex_lock(&cf_lock, NULL)) {
|
||||
lprintf(cache_lock_debug,
|
||||
"thread %x: initialise cf_lock;\n", pthread_self());
|
||||
if (pthread_mutex_init(&cf_lock, NULL)) {
|
||||
lprintf(fatal, "cf_lock initialisation failed!\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ void PTHREAD_MUTEX_UNLOCK(pthread_mutex_t * x)
|
|||
i = pthread_mutex_unlock(x);
|
||||
if (i) {
|
||||
lprintf(fatal,
|
||||
"thread %x: pthread_mutex_unlock() failed, %d, %s\n",
|
||||
"thread %x: %d, %s\n",
|
||||
pthread_self(), i, strerror(i));
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ void PTHREAD_MUTEX_LOCK(pthread_mutex_t * x)
|
|||
i = pthread_mutex_lock(x);
|
||||
if (i) {
|
||||
lprintf(fatal,
|
||||
"thread %x: pthread_mutex_lock() failed, %d, %s\n",
|
||||
"thread %x: %d, %s\n",
|
||||
pthread_self(), i, strerror(i));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue