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:
committed by
francescomani
parent
f8d0c3de03
commit
c9b043eb09
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user