#include <sched_context.h>
Public Types | |
| enum | Preemption_type { None, Timeslice_overrun, Deadline_miss } |
| Definition of different preemption types. More... | |
Public Member Functions | |
| Sched_context (Context *const owner, unsigned short const id, unsigned short prio, Unsigned64 quantum) | |
| Constructor. | |
| void * | operator new (size_t) |
| Allocator. | |
| void | operator delete (void *const ptr) |
| Deallocator. | |
| Sched_context * | next () const |
| Return the next Sched_context in list. | |
| Sched_context * | prev () const |
| Return the previous Sched_context in list. | |
| void | enqueue_before (Sched_context *const sibling) |
| Enqueue a Sched_context in list before sibling. | |
| void | dequeue () |
| Dequeue a Sched_context from list. | |
| Context * | owner () const |
| Return owner of Sched_context. | |
| unsigned short | id () const |
| Return ID of Sched_context. | |
| unsigned short | prio () const |
| Return priority of Sched_context. | |
| void | set_prio (unsigned short const prio) |
| Set priority of Sched_context. | |
| Unsigned64 | quantum () const |
| Return full time quantum of Sched_context. | |
| void | set_quantum (Unsigned64 const quantum) |
| Set full time quantum of Sched_context. | |
| Unsigned64 | left () const |
| Return remaining time quantum of Sched_context. | |
| void | set_left (Unsigned64 const left) |
| Set remaining time quantum of Sched_context. | |
| Sched_context::Preemption_type | preemption_type () const |
| Return type of last preemption event on this Sched_context. | |
| Cpu_time | preemption_time () const |
| Return time of last preemption event on this Sched_context. | |
| unsigned | preemption_count () const |
| Return number of unsent preemption events on this Sched_context. | |
| void | set_preemption_event (Preemption_type const type, Cpu_time const clock) |
| Set time of last preemption event on this Sched_context. | |
| void | clear_preemption_event () |
| Sched_context * | find_next_preemption () |
| Return next Sched_context with a pending preemption event. | |
Private Attributes | |
| Context *const | _owner |
| unsigned short const | _id |
| unsigned short | _prio |
| Unsigned64 | _quantum |
| Unsigned64 | _left |
| Preemption_type | _preemption_type |
| Cpu_time | _preemption_time |
| unsigned | _preemption_count |
| Sched_context * | _prev |
| Sched_context * | _next |
Static Private Attributes | |
| static slab_cache_anon * | _slabs |
| Slab allocator for Sched_context slabs. | |
Friends | |
| class | Jdb_list_timeouts |
| void | allocator_init () |
|
|
Definition of different preemption types.
|
|
||||||||||||||||||||
|
Constructor.
|
|
|
|
|
|
Dequeue a Sched_context from list.
|
|
|
Enqueue a Sched_context in list before sibling.
|
|
|
Return next Sched_context with a pending preemption event.
|
|
|
Return ID of Sched_context.
|
|
|
Return remaining time quantum of Sched_context.
|
|
|
Return the next Sched_context in list.
|
|
|
Deallocator.
|
|
|
Allocator.
|
|
|
Return owner of Sched_context.
|
|
|
Return number of unsent preemption events on this Sched_context.
|
|
|
Return time of last preemption event on this Sched_context.
|
|
|
Return type of last preemption event on this Sched_context.
|
|
|
Return the previous Sched_context in list.
|
|
|
Return priority of Sched_context.
|
|
|
Return full time quantum of Sched_context.
|
|
|
Set remaining time quantum of Sched_context.
|
|
||||||||||||
|
Set time of last preemption event on this Sched_context.
|
|
|
Set priority of Sched_context.
|
|
|
Set full time quantum of Sched_context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Slab allocator for Sched_context slabs.
|
1.4.2