src/ssx/ppc405/ppc405.h
// SSX requires the port to define the type SsxThreadQueue, which is a
// priority queue (where 0 is the highest priority).  This queue must be able
// to handle SSX_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 SSX_THREADS if
// the queue is empty (or a queue could be initialized with that entry always
// present - SSX 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 PPC405 with 32 threads (implied), this is a job for a uint32_t and
// cntlzw(). 
SSX requires the port to define the type SsxThreadQueue, which is a
priority queue (where 0 is the highest priority).  This queue must be able
to handle SSX_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 SSX_THREADS if
the queue is empty (or a queue could be initialized with that entry always
present - SSX 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 PPC405 with 32 threads (implied), this is a job for a uint32_t and
cntlzw().
SSX requires the port to define the type SsxThreadQueue which is a priority queue ( where 0 is the highest priority ) . This queue must be able to handle SSX_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 SSX_THREADS if the queue is empty ( or a queue could be initialized with that entry always present - SSX 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 PPC405 with 32 threads ( implied ) this is a job for a uint32_t and cntlzw () .
static inline void
__ssx_thread_queue_clear(volatile SsxThreadQueue* queue)
{
*queue = 0;
}
static inline void __ssx_thread_queue_clear ( volatile SsxThreadQueue * queue ) { * queue = 0 ; }
SSX requires the port to define the type SsxThreadQueue, which is a
priority queue (where 0 is the highest priority).
SSX requires the port to define the type SsxThreadQueue which is a priority queue ( where 0 is the highest priority ) .