Commit c9b043eb authored by Robert Schmidt's avatar Robert Schmidt Committed by francescomani

Fix: Correct check thread pool initialized

traceFd of thread pool can be:
* -1: no tracing
* valid file descriptor/>0: tracing
parent f8d0c3de
...@@ -286,7 +286,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_ ...@@ -286,7 +286,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_
notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo); notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
if (msg == NULL) if (msg == NULL)
return 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) if (t->measurePerf)
msg->returnTime=rdtsc_oai(); msg->returnTime=rdtsc_oai();
...@@ -300,7 +300,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_ ...@@ -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) { static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo); 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) if (msg == NULL)
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment