diff options
author | deva <deva> | 2005-04-30 20:42:15 +0000 |
---|---|---|
committer | deva <deva> | 2005-04-30 20:42:15 +0000 |
commit | 741613f816796b21abdc3b140ac9131419fd99de (patch) | |
tree | 725df8d26125ebafcfb4b87416da96dd4db78223 | |
parent | 0791ce8426fe56246afa4123c37388c2f506f8ce (diff) |
*** empty log message ***
-rw-r--r-- | src/queue.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/queue.h b/src/queue.h index 6b143fd..1f8a80f 100644 --- a/src/queue.h +++ b/src/queue.h @@ -219,9 +219,11 @@ void Queue<T>::plength() template<typename T> void Queue<T>::lock() { + pthread_mutex_lock(&mutex); fprintf(stderr, "Lock this motherfucker..."); fflush(stderr); locked = true; fprintf(stderr, "done\n"); fflush(stderr); + pthread_mutex_unlock(&mutex); } /** @@ -230,9 +232,11 @@ void Queue<T>::lock() template<typename T> void Queue<T>::unlock() { + pthread_mutex_lock(&mutex); fprintf(stderr, "Unlock this motherfucker..."); fflush(stderr); locked = false; fprintf(stderr, "done\n"); fflush(stderr); + pthread_mutex_unlock(&mutex); } #endif |