INLINE void ActivateOneOutputTask(TaskQueue& queue, int task, int* tasknum) { if (DEC_ATOMIC(&fTaskList[task]) == 0) { *tasknum = task; } else { *tasknum = queue.PopHead(); } }
INLINE void GetReadyTask(TaskQueue& queue, int* tasknum) { if (*tasknum == WORK_STEALING_INDEX) { *tasknum = queue.PopHead(); } }