aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@kernel.org>2016-05-05 16:45:41 -0700
committerLuis R. Rodriguez <mcgrof@kernel.org>2016-05-06 16:01:54 -0700
commit61ec5f5d6ec8701237ba64065f1754395fc27c86 (patch)
tree09bb5a75ffb437fd685073a24e8cf68d2070933c
parent0c81b9b9cd4e961bdc4f982c2667855a18c428d4 (diff)
downloadcocci-tact-61ec5f5d6ec8701237ba64065f1754395fc27c86.tar.gz
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>
-rw-r--r--main.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/main.c b/main.c
index f1fd83c..2965ec7 100644
--- a/main.c
+++ b/main.c
@@ -53,14 +53,12 @@ void *thread_party(void *t)
{
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);
}