Handle abortFIFO in FIFO functions
This commit is contained in:
@@ -131,14 +131,18 @@ static inline void pushNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf, notifiedFIF
|
|||||||
|
|
||||||
static inline void pushNotifiedFIFO(notifiedFIFO_t *nf, notifiedFIFO_elt_t *msg) {
|
static inline void pushNotifiedFIFO(notifiedFIFO_t *nf, notifiedFIFO_elt_t *msg) {
|
||||||
mutexlock(nf->lockF);
|
mutexlock(nf->lockF);
|
||||||
pushNotifiedFIFO_nothreadSafe(nf,msg);
|
if (!nf->abortFIFO) {
|
||||||
condsignal(nf->notifF);
|
pushNotifiedFIFO_nothreadSafe(nf,msg);
|
||||||
|
condsignal(nf->notifF);
|
||||||
|
}
|
||||||
mutexunlock(nf->lockF);
|
mutexunlock(nf->lockF);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline notifiedFIFO_elt_t *pullNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf) {
|
static inline notifiedFIFO_elt_t *pullNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf) {
|
||||||
if (nf->outF == NULL)
|
if (nf->outF == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
if (nf->abortFIFO)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
notifiedFIFO_elt_t *ret=nf->outF;
|
notifiedFIFO_elt_t *ret=nf->outF;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user