Remove include added by editor; Make sure to call pthread_cond_broadcast
after pushing to mq in order to unblock threads;
This commit is contained in:
parent
ccb742e80e
commit
5a769bc36c
2 changed files with 1 additions and 1 deletions
1
haggis.c
1
haggis.c
|
@ -39,7 +39,6 @@
|
|||
#include <limits.h> // PATH_MAX
|
||||
#include <stddef.h> // size_t
|
||||
#include <stdint.h> // uint<x>_t
|
||||
#include <sys/syslimits.h>
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#include <sha.h>
|
||||
|
|
1
mq.c
1
mq.c
|
@ -81,6 +81,7 @@ int haggis_mq_push(haggis_mq *queue, haggis_msg *msg) {
|
|||
queue->tail = msg;
|
||||
}
|
||||
queue->count++;
|
||||
pthread_cond_broadcast(&queue->cond);
|
||||
pthread_mutex_unlock(&queue->mutex);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue