Don't allow saving if tracks are being added
[cmus.git] / locking.c
blobb431a91b91a159d80bdb079a8874c97139941bf9
1 #include "locking.h"
2 #include "debug.h"
4 #include <string.h>
6 void cmus_mutex_lock(pthread_mutex_t *mutex)
8 int rc = pthread_mutex_lock(mutex);
9 if (unlikely(rc))
10 BUG("error locking mutex: %s\n", strerror(rc));
13 void cmus_mutex_unlock(pthread_mutex_t *mutex)
15 int rc = pthread_mutex_unlock(mutex);
16 if (unlikely(rc))
17 BUG("error unlocking mutex: %s\n", strerror(rc));