remove mutex locks
Everything is still in order though, this is because
everyone is following orders:
Before party:
FOOD: [ *********** ]
TRASH: [ ]
After party:
FOOD: [ ]
TRASH: [ *********** ]
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
diff --git a/main.c b/main.c
index f1fd83c..2965ec7 100644
--- a/main.c
+++ b/main.c
@@ -53,14 +53,12 @@
{
long tid = (long)t;
- pthread_mutex_lock(&party->mutex);
eat(tid);
if (tid % 2 == 1)
sleep(1);
cleanup(tid);
- pthread_mutex_unlock(&party->mutex);
pthread_exit(NULL);
}