|
l4_msgtag_t | info (l4_umword_t *cpu_max, l4_sched_cpu_set_t *cpus, l4_utcb_t *utcb=l4_utcb()) const throw () |
| Get scheduler information. More...
|
|
l4_msgtag_t | run_thread (Ipc::Cap< Thread > thread, l4_sched_param_t const &sp) |
| Run a thread on a Scheduler. More...
|
|
l4_msgtag_t | idle_time (l4_sched_cpu_set_t const &cpus, l4_kernel_clock_t *us) |
| Query the idle time (in µs) of a CPU. More...
|
|
bool | is_online (l4_umword_t cpu, l4_utcb_t *utcb=l4_utcb()) const throw () |
| Query if a CPU is online. More...
|
|
l4_msgtag_t | bind (unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb()) throw () |
| Bind an interrupt line of an interrupt controller to an interrupt object. More...
|
|
l4_msgtag_t | unbind (unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb()) throw () |
| Remove binding of an interrupt line from the interrupt controller object. More...
|
|
l4_msgtag_t | info (l4_icu_info_t *info, l4_utcb_t *utcb=l4_utcb()) throw () |
| Get information about the capabilities of the ICU. More...
|
|
l4_msgtag_t | msi_info (l4_umword_t irqnum, l4_uint64_t source, l4_icu_msi_info_t *msi_info) |
| Get MSI info about IRQ. More...
|
|
l4_msgtag_t | mask (unsigned irqnum, l4_umword_t *label=0, l4_timeout_t to=L4_IPC_NEVER, l4_utcb_t *utcb=l4_utcb()) throw () |
| Mask an IRQ line. More...
|
|
l4_msgtag_t | set_mode (unsigned irqnum, l4_umword_t mode, l4_utcb_t *utcb=l4_utcb()) throw () |
| Set interrupt mode. More...
|
|
l4_msgtag_t | unmask (unsigned irqnum, l4_umword_t *label=0, l4_timeout_t to=L4_IPC_NEVER, l4_utcb_t *utcb=l4_utcb()) throw () |
| Acknowledge the given interrupt line. More...
|
|
|
typedef Scheduler | Class |
| The target interface type (inheriting from Kobject_t)
|
|
typedef Typeid::Iface< PROTO, Scheduler > | __Iface |
| The interface description for the derived class.
|
|
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Icu ::__Iface_list > | __Iface_list |
| The list of all RPC interfaces provided directly or through inheritance.
|
|
typedef Icu | Class |
| The target interface type (inheriting from Kobject_t)
|
|
typedef Typeid::Iface< PROTO, Icu > | __Iface |
| The interface description for the derived class.
|
|
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Irq_eoi ::__Iface_list > | __Iface_list |
| The list of all RPC interfaces provided directly or through inheritance.
|
|
L4::Cap< Class > | c () const |
| Get the capability to ourselves.
|
|
L4::Cap< Class > | c () const |
| Get the capability to ourselves.
|
|
static void | __check_protocols__ () |
| Helper to check for protocol conflicts.
|
|
static void | __check_protocols__ () |
| Helper to check for protocol conflicts.
|
|
C++ interface of the Scheduler kernel object.
The Scheduler interface allows a client to manage CPU resources. The API provides functions to query scheduler information, check the online state of CPUs, query CPU idle time and to start threads on defined CPU sets.
- Include File
-
Definition at line 42 of file scheduler.
Query the idle time (in µs) of a CPU.
- Parameters
-
| cpus | Set of CPUs to query. Only the idle time of the first selected CPU in cpus.map is queried. |
[out] | us | Idle time of queried CPU in µs. |
- Return values
-
0 | Success. |
-L4_EINVAL | Invalid CPU requested in cpu set. |
This function retrieves the idle time in µs of the first selected CPU in cpus.map
. The idle time is the accumulated time a CPU has spent in the idle thread since its last reset. To calculate a load estimate l
one has to retrieve the idle time at the beginning (i1
) and the end (i2
) of a known time interval t
. The load is then calculated as l = 1 - (i2 - i1)/t.
The idle time is only defined for online CPUs. Reading the idle time from offline CPUs is undefined and may result in either getting -L4_EINVAL or calculating an estimated (incorrect) load of 1.
- Note
- The idle time statistics of remote CPUs is updated on context switch events only, hence may not be up-to-date when requested cross-CPU. To get up-to-date idle time you should use a thread running on the same CPU of which the idle time is requested.