Skip to content

Commit 53583d6

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 5ec16e4 + 6745868 commit 53583d6

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
compile-test:
2-
gcc -g -Wall -Wextra src/*.c test/*.c -o test.o
2+
gcc -g -Wall -Wextra src/*.c test/*.c -lpthread -o test.o
33

44
test:
55
make compile-test

src/mem_pool.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
check(pthread_mutex_lock(&pool->mutex));
1616

1717
#define unlock(pool) \
18-
check(pthread_cond_broadcast(&pool->cond)); \
1918
check(pthread_mutex_unlock(&pool->mutex));
2019

2120

@@ -42,7 +41,6 @@ struct mem_pool {
4241
Buffer *buff_last;
4342
Block *block_head;
4443
pthread_mutex_t mutex;
45-
pthread_cond_t cond;
4644
};
4745

4846

@@ -79,7 +77,6 @@ MemPool *pool_init(size_t block_size, size_t increase_count)
7977
pool->block_head = NULL;
8078

8179
check(pthread_mutex_init(&pool->mutex, NULL));
82-
check(pthread_cond_init(&pool->cond, NULL));
8380

8481
return pool;
8582
}
@@ -186,6 +183,5 @@ void pool_destroy(MemPool *pool)
186183
}
187184

188185
pthread_mutex_destroy(&pool->mutex);
189-
pthread_cond_destroy(&pool->cond);
190186
free(pool);
191187
}

0 commit comments

Comments
 (0)