ChibiOS/RT Logo ChibiOS/RT

Architecture - Reference Manual - Guides

chschd.h File Reference

Scheduler macros and structures. More...

Go to the source code of this file.

Data Structures

struct  ReadyList
 Ready list header. More...

Defines

#define RDY_OK   0
 Default thread wakeup low level message.
#define RDY_TIMEOUT   -1
 Low level message sent to a thread awakened by a timeout.
#define RDY_RESET   -2
 Low level message sent to a thread awakened by a reset operation.
#define NOPRIO   0
 Ready list header priority.
#define IDLEPRIO   1
 Idle thread priority.
#define LOWPRIO   2
 Lowest user priority.
#define NORMALPRIO   64
 Normal user priority.
#define HIGHPRIO   127
 Highest user priority.
#define ABSPRIO   255
 Greatest possible priority.
#define TIME_IMMEDIATE   ((systime_t)-1)
 Zero time specification for some syscalls with a timeout specification.
#define TIME_INFINITE   ((systime_t)0)
 Infinite time specification for all the syscalls with a timeout specification.
#define firstprio(rlp)   ((rlp)->p_next->p_prio)
 Returns the priority of the first thread on the given ready list.
#define currp   rlist.r_current
 Current thread pointer access macro.
#define setcurrp(tp)   (currp = (tp))
 Current thread pointer change macro.
#define chSchIsRescRequiredI()   (firstprio(&rlist.r_queue) > currp->p_prio)
 Determines if the current thread must reschedule.
#define chSchCanYieldS()   (firstprio(&rlist.r_queue) >= currp->p_prio)
 Determines if yielding is possible.
#define chSchDoYieldS()
 Yields the time slot.

Functions

void scheduler_init (void)
 Scheduler initialization.
ThreadchSchReadyI (Thread *tp)
 Inserts a thread in the Ready List.
void chSchGoSleepS (tstate_t newstate)
 Puts the current thread to sleep into the specified state.
msg_t chSchGoSleepTimeoutS (tstate_t newstate, systime_t time)
 Puts the current thread to sleep into the specified state with timeout specification.
void chSchWakeupS (Thread *ntp, msg_t msg)
 Wakes up a thread.
void chSchDoRescheduleI (void)
 Switches to the first thread on the runnable queue.
void chSchRescheduleS (void)
 Performs a reschedule if a higher priority thread is runnable.
bool_t chSchIsRescRequiredExI (void)
 Evaluates if a reschedule is required.

Detailed Description

Scheduler macros and structures.

Definition in file chschd.h.


Generated on Sun Jul 11 13:13:02 2010 for ChibiOS/RT by doxygen 1.6.3