Skip to content

Commit

Permalink
locks33
Browse files Browse the repository at this point in the history
  • Loading branch information
sujaypat committed Oct 5, 2016
1 parent 9967f39 commit c657521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion luscious_locks/barrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int barrier_init(barrier_t *barrier, unsigned int num_threads) {
int barrier_wait(barrier_t *barrier) {
pthread_mutex_lock(&barrier -> mtx);
barrier -> count++;
unsigned int previous = barrier -> n_threads;
unsigned int previous = barrier -> times_used;
if(barrier -> count == barrier -> n_threads){
pthread_cond_broadcast(&barrier -> cv);
barrier -> count = 0;
Expand Down

0 comments on commit c657521

Please sign in to comment.