Expand description
Run-queue structures to support a work-stealing scheduler
Structsยง
- Inner ๐
- Local ๐
- Producer handle. May only be used from a single thread.
- Steal ๐
- Consumer handle. May be used from many threads.
Constantsยง
- LOCAL_
QUEUE_ ๐CAPACITY - MASK ๐
Functionsยง
- len ๐
- Calculate the length of the queue using the head and tail.
The
head
can be thesteal
orreal
head. - local ๐
- Create a new local run-queue
- make_
fixed_ ๐size - pack ๐
- Join the two head values
- unpack ๐
- Split the head value into the real head and the index a stealer is working on.
Type Aliasesยง
- Atomic
Unsigned ๐Long - Atomic
Unsigned ๐Short - Unsigned
Long ๐ - Unsigned
Short ๐