Skip to content

Commit

Permalink
no typecasting
Browse files Browse the repository at this point in the history
  • Loading branch information
niyatim23 committed Nov 27, 2023
1 parent d87e093 commit f2096b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/src/Threadpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ PVOID threadpoolActor(PVOID data)
if (stackQueueGetCount(pThreadpool->threadList, &count) == STATUS_SUCCESS) {
if (count > pThreadpool->minThreads) {
finished = TRUE;
if (stackQueueRemoveItem(pThreadpool->threadList, (UINT64) (pThreadData)) != STATUS_SUCCESS) {
if (stackQueueRemoveItem(pThreadpool->threadList, pThreadData) != STATUS_SUCCESS) {
DLOGE("Failed to remove thread data from threadpool");
}
}
Expand All @@ -109,7 +109,7 @@ PVOID threadpoolActor(PVOID data)
// in the event somehow the queue is not empty.
else if (ATOMIC_LOAD_BOOL(&pThreadData->terminate)) {
finished = TRUE;
if (stackQueueRemoveItem(pThreadpool->threadList, (UINT64) (pThreadData)) != STATUS_SUCCESS) {
if (stackQueueRemoveItem(pThreadpool->threadList, pThreadData) != STATUS_SUCCESS) {
DLOGE("Failed to remove thread data from threadpool");
}
}
Expand Down Expand Up @@ -327,7 +327,7 @@ STATUS threadpoolFree(PThreadpool pThreadpool)
ATOMIC_STORE_BOOL(&item->terminate, TRUE);

// when we acquire the lock, remove the item from the list. Its thread will free it.
if (stackQueueRemoveItem(pThreadpool->threadList, (UINT64) (item)) != STATUS_SUCCESS) {
if (stackQueueRemoveItem(pThreadpool->threadList, item) != STATUS_SUCCESS) {
DLOGE("Failed to remove thread data from threadpool");
}
MUTEX_UNLOCK(item->dataMutex);
Expand Down

0 comments on commit f2096b8

Please sign in to comment.