summaryrefslogtreecommitdiff
path: root/src/queue.h
diff options
context:
space:
mode:
authordeva <deva>2005-04-30 20:42:15 +0000
committerdeva <deva>2005-04-30 20:42:15 +0000
commit741613f816796b21abdc3b140ac9131419fd99de (patch)
tree725df8d26125ebafcfb4b87416da96dd4db78223 /src/queue.h
parent0791ce8426fe56246afa4123c37388c2f506f8ce (diff)
*** empty log message ***
Diffstat (limited to 'src/queue.h')
-rw-r--r--src/queue.h4
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