src/ppe/pk/ppe42/ppe42.h
// PK requires the port to define the type PkThreadQueue, which is a
// priority queue (where 0 is the highest priority).  This queue must be able
// to handle PK_THREADS + 1 priorities (the last for the idle thread) The
// port must also define methods for clearing, insertion, deletion and min
// (with assumed legal priorities).  The min operation returns PK_THREADS if
// the queue is empty (or a queue could be initialized with that entry always
// present - PK code never tries to delete the idle thread from a thread
// queue).
//
// These queues are used both for the run queue and the pending queue
// associated with every semaphore.
//
// On PPE42 with 32 threads (implied), this is a job for a uint32_t and
// cntlzw().
PK requires the port to define the type PkThreadQueue, which is a
priority queue (where 0 is the highest priority).  This queue must be able
to handle PK_THREADS + 1 priorities (the last for the idle thread) The
port must also define methods for clearing, insertion, deletion and min
(with assumed legal priorities).  The min operation returns PK_THREADS if
the queue is empty (or a queue could be initialized with that entry always
present - PK code never tries to delete the idle thread from a thread
queue).

These queues are used both for the run queue and the pending queue
associated with every semaphore.

On PPE42 with 32 threads (implied), this is a job for a uint32_t and
cntlzw().
PK requires the port to define the type PkThreadQueue which is a priority queue ( where 0 is the highest priority ) . This queue must be able to handle PK_THREADS + 1 priorities ( the last for the idle thread ) The port must also define methods for clearing insertion deletion and min ( with assumed legal priorities ) . The min operation returns PK_THREADS if the queue is empty ( or a queue could be initialized with that entry always present - PK code never tries to delete the idle thread from a thread queue ) . These queues are used both for the run queue and the pending queue associated with every semaphore . On PPE42 with 32 threads ( implied ) this is a job for a uint32_t and cntlzw () .
static inline void
__pk_thread_queue_clear(volatile PkThreadQueue* queue)
{
*queue = 0;
}
static inline void __pk_thread_queue_clear ( volatile PkThreadQueue * queue ) { * queue = 0 ; }
PK requires the port to define the type PkThreadQueue, which is a
priority queue (where 0 is the highest priority).
PK requires the port to define the type PkThreadQueue which is a priority queue ( where 0 is the highest priority ) .