From 5749f1d8fe80cbb84d66a265bcf9bafe159985ab Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Tue, 6 Nov 2007 10:41:14 +0000 Subject: Rename source files in an ot_ fashion --- mutex.c | 77 ----------------------------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 mutex.c (limited to 'mutex.c') diff --git a/mutex.c b/mutex.c deleted file mode 100644 index 5c14e45..0000000 --- a/mutex.c +++ /dev/null @@ -1,77 +0,0 @@ -/* This software was written by Dirk Engling - It is considered beerware. Prost. Skol. Cheers or whatever. */ - -#include -#include - -#include "trackerlogic.h" -#include "mutex.h" - -static int bucket_locklist[ OT_MAX_THREADS ]; -static int bucket_locklist_count = 0; -static pthread_mutex_t bucket_mutex; -static pthread_cond_t bucket_being_unlocked; - -static int bucket_check( int bucket ) { - /* C should come with auto-i ;) */ - int i; - - /* No more space to acquire lock to bucket -- should not happen */ - if( bucket_locklist_count == OT_MAX_THREADS ) { - fprintf( stderr, "More lock requests than mutexes. Consult source code.\n" ); - return -1; - } - - /* See, if bucket is already locked */ - for( i=0; i