L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
l4_sched_cpu_set_t Struct Reference

CPU sets. More...

#include <scheduler.h>

+ Collaboration diagram for l4_sched_cpu_set_t:

Public Member Functions

unsigned char granularity () const
 
unsigned offset () const
 
void set (unsigned char granularity, unsigned offset)
 Set offset and granularity.
 

Data Fields

l4_umword_t gran_offset
 Combination of granularity and offset.
 
l4_umword_t map
 Bitmap of CPUs.
 

Detailed Description

CPU sets.

Examples
examples/sys/migrate/thread_migrate.cc.

Definition at line 69 of file scheduler.h.

Member Function Documentation

◆ granularity()

unsigned char l4_sched_cpu_set_t::granularity ( ) const
inline
Returns
Get granularity value

Definition at line 92 of file scheduler.h.

References gran_offset.

Referenced by set().

+ Here is the caller graph for this function:

◆ offset()

unsigned l4_sched_cpu_set_t::offset ( ) const
inline
Returns
Get offset value

Definition at line 94 of file scheduler.h.

References gran_offset.

Referenced by set().

+ Here is the caller graph for this function:

◆ set()

void l4_sched_cpu_set_t::set ( unsigned char  granularity,
unsigned  offset 
)
inline

Set offset and granularity.

Parameters
granularityGranularity in log2 notation.
offsetOffset. Must be a multiple of 2^granularity.

Definition at line 101 of file scheduler.h.

References gran_offset, granularity(), and offset().

+ Here is the call graph for this function:

Field Documentation

◆ gran_offset

l4_umword_t l4_sched_cpu_set_t::gran_offset

Combination of granularity and offset.

The granularity defines how many CPUs each bit in map describes. And the offset is the number of the first CPU described by the first bit in the bitmap.

Precondition
offset must be a multiple of 2^granularity.
MSB LSB
8bit granularity 24bit offset ..

Definition at line 83 of file scheduler.h.

Referenced by granularity(), L4::Scheduler::info(), l4_sched_cpu_set(), offset(), and set().


The documentation for this struct was generated from the following file: