Go to the source code of this file.
◆ ThreadCtrl_Continue
#define ThreadCtrl_Continue |
( |
|
ctrl, |
|
|
|
count |
|
) |
| |
Value: __extension__({ \
++(ctrl).nPolls[(int)((count) > 0)]; \
(ctrl).items += (count); \
if (count == 0) { \
ThreadCtrl_Sleep(&(ctrl)); \
} else { \
ThreadCtrl_SleepReset(&(ctrl)); \
} \
(count) = 0; \
atomic_load_explicit(&(ctrl).stop, memory_order_acquire); \
})
Determine if a thread loop should continue.
- Parameters
-
ctrl | ThreadCtrl object reference. |
count | integral lvalue, number of processed items in last iteration. |
- Return values
-
true | the thread should continue execution. |
false | the thread should stop. |
- Postcondition
- count==0
◆ ThreadCtrl
Thread load stats and stop flag.