Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Sched_context Class Reference

#include <sched_context.h>

List of all members.

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_contextnext () const
 Return the next Sched_context in list.
Sched_contextprev () 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.
Contextowner () 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_contextfind_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 ()


Member Enumeration Documentation

enum Sched_context::Preemption_type
 

Definition of different preemption types.

Enumeration values:
None 
Timeslice_overrun 
Deadline_miss 


Constructor & Destructor Documentation

Sched_context::Sched_context Context *const   owner,
unsigned short const   id,
unsigned short  prio,
Unsigned64  quantum
 

Constructor.


Member Function Documentation

void Sched_context::clear_preemption_event  )  [inline]
 

void Sched_context::dequeue  )  [inline]
 

Dequeue a Sched_context from list.

void Sched_context::enqueue_before Sched_context *const   sibling  )  [inline]
 

Enqueue a Sched_context in list before sibling.

Sched_context * Sched_context::find_next_preemption  )  [inline]
 

Return next Sched_context with a pending preemption event.

unsigned short Sched_context::id  )  const [inline]
 

Return ID of Sched_context.

Unsigned64 Sched_context::left  )  const [inline]
 

Return remaining time quantum of Sched_context.

Sched_context * Sched_context::next  )  const [inline]
 

Return the next Sched_context in list.

void Sched_context::operator delete void *const   ptr  )  [inline]
 

Deallocator.

void * Sched_context::operator new size_t   )  [inline]
 

Allocator.

Context * Sched_context::owner  )  const [inline]
 

Return owner of Sched_context.

unsigned Sched_context::preemption_count  )  const [inline]
 

Return number of unsent preemption events on this Sched_context.

Cpu_time Sched_context::preemption_time  )  const [inline]
 

Return time of last preemption event on this Sched_context.

Sched_context::Preemption_type Sched_context::preemption_type  )  const [inline]
 

Return type of last preemption event on this Sched_context.

Sched_context * Sched_context::prev  )  const [inline]
 

Return the previous Sched_context in list.

unsigned short Sched_context::prio  )  const [inline]
 

Return priority of Sched_context.

Unsigned64 Sched_context::quantum  )  const [inline]
 

Return full time quantum of Sched_context.

void Sched_context::set_left Unsigned64 const   left  )  [inline]
 

Set remaining time quantum of Sched_context.

void Sched_context::set_preemption_event Preemption_type const   type,
Cpu_time const   clock
[inline]
 

Set time of last preemption event on this Sched_context.

void Sched_context::set_prio unsigned short const   prio  )  [inline]
 

Set priority of Sched_context.

void Sched_context::set_quantum Unsigned64 const   quantum  )  [inline]
 

Set full time quantum of Sched_context.


Friends And Related Function Documentation

void allocator_init  )  [friend]
 

friend class Jdb_list_timeouts [friend]
 


Member Data Documentation

unsigned short const Sched_context::_id [private]
 

Unsigned64 Sched_context::_left [private]
 

Sched_context* Sched_context::_next [private]
 

Context* const Sched_context::_owner [private]
 

unsigned Sched_context::_preemption_count [private]
 

Cpu_time Sched_context::_preemption_time [private]
 

Preemption_type Sched_context::_preemption_type [private]
 

Sched_context* Sched_context::_prev [private]
 

unsigned short Sched_context::_prio [private]
 

Unsigned64 Sched_context::_quantum [private]
 

slab_cache_anon * Sched_context::_slabs [static, private]
 

Slab allocator for Sched_context slabs.


The documentation for this class was generated from the following files:
Generated on Mon Sep 26 14:20:17 2005 for Fiasco by  doxygen 1.4.2