Fix: Correct check thread pool initialized

traceFd of thread pool can be:
* -1: no tracing
* valid file descriptor/>0: tracing
This commit is contained in:
Robert Schmidt
2023-03-09 19:01:47 +01:00
committed by francescomani
parent f8d0c3de03
commit c9b043eb09
+2 -2
View File
@@ -286,7 +286,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_
notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
if (msg == NULL)
return NULL;
AssertFatal(t->traceFd > 0, "Thread pool used while not initialized");
AssertFatal(t->traceFd != 0, "Thread pool used while not initialized");
if (t->measurePerf)
msg->returnTime=rdtsc_oai();
@@ -300,7 +300,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_
static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo);
AssertFatal(t->traceFd > 0, "Thread pool used while not initialized");
AssertFatal(t->traceFd != 0, "Thread pool used while not initialized");
if (msg == NULL)
return NULL;