Barrelfish
Functions
schedule.h File Reference

Kernel scheduling API. More...

Functions

struct dcbschedule (void)
 Scheduler policy. More...
 
void scheduler_remove (struct dcb *dcb)
 Remove 'dcb' from scheduler ring. More...
 
void scheduler_yield (struct dcb *dcb)
 Yield 'dcb' for the rest of the current timeslice. More...
 

Detailed Description

Kernel scheduling API.

Function Documentation

struct dcb* schedule ( void  )

Scheduler policy.

Returns
Next DCB to schedule or NULL if wait for interrupts.
void scheduler_remove ( struct dcb dcb)

Remove 'dcb' from scheduler ring.

Removes dispatcher 'dcb' from the scheduler ring. If it was not in the ring, this function is a no-op. The postcondition for this function is that dcb is not in the ring.

Parameters
dcbPointer to DCB to remove.

Opposite of make_runnable.

Removes dispatcher 'dcb' from the scheduler ring. If it was not in the ring, this function is a no-op. The postcondition for this function is that dcb is not in the ring.

Parameters
dcbPointer to DCB to remove.
void scheduler_yield ( struct dcb dcb)

Yield 'dcb' for the rest of the current timeslice.

Re-sorts 'dcb' into the scheduler queue with its release time increased by the timeslice period. It is an error to yield a dispatcher not in the scheduler queue.

Parameters
dcbPointer to DCB to remove.