Functions | |
int | l4cpu_reserve_add (l4_threadid_t thread, const char *name, int prio, int period, int *wcet, int deadline, int *id) |
Make a reservation. | |
int | l4cpu_reserve_change (l4_threadid_t thread, int id, int new_prio, int *new_wcet, int new_deadline) |
Change the reservation of a thread. | |
int | l4cpu_reserve_delete_thread (l4_threadid_t thread) |
Remove the reservations of a thread. | |
int | l4cpu_reserve_delete_task (l4_threadid_t task) |
Remove the reservations of a task. | |
int | l4cpu_reserve_begin_strictly_periodic (l4_threadid_t thread, l4_kernel_clock_t clock) |
Start strictly periodic execution. | |
int | l4cpu_reserve_begin_strictly_periodic_self (l4_threadid_t me) |
Start strictly periodic execution of own thread ASAP. | |
int | l4cpu_reserve_begin_minimal_periodic (l4_threadid_t thread, l4_kernel_clock_t clock) |
Start periodic execution with minimal interrelease times. | |
int | l4cpu_reserve_begin_minimal_periodic_self (l4_threadid_t thread) |
Start periodic execution with minimal interrelease times, own thread. | |
int | l4cpu_reserve_end_periodic (l4_threadid_t thread) |
Stop periodic execution. | |
int | l4cpu_reserve_watch (l4_threadid_t thread, unsigned **addr) |
Watch exception IPCs for the given thread. | |
int | l4cpu_reserve_scheds_count (void) |
Return the number of reservations made. | |
int | l4cpu_reserve_scheds_get (int idx, char **name, l4_threadid_t *thread, l4_threadid_t *creator, int *id, int *prio, int *period, int *wcet, int *deadline) |
Return a given reservation. |
The function-prototypes can be found in <l4/cpu_reserve/sched.h>
The API implementation can be found in the libcpu_reserve.a library.
int l4cpu_reserve_add | ( | l4_threadid_t | thread, | |
const char * | name, | |||
int | prio, | |||
int | period, | |||
int * | wcet, | |||
int | deadline, | |||
int * | id | |||
) |
Make a reservation.
thread | thread to make a reservation for | |
name | a name for the reservation | |
prio | priority of the reservation | |
period | period of the thread | |
wcet | - in: WCET of the thread per period
| |
deadline | deadline within the period. Specify 0 for an optional reservation. | |
id | will be filled with the id of the timeslice. |
0 | OK | |
!0 | Error |
To add multiple timeslices for a thread, call this function multiple times. This function sets the period of the thread when adding the first timeslice to thread. So there is no additional set_period() call as with the raw kernel interface.
Definition at line 50 of file clientlib.c.
References server_id, and server_init().
int l4cpu_reserve_begin_minimal_periodic | ( | l4_threadid_t | thread, | |
l4_kernel_clock_t | clock | |||
) |
Start periodic execution with minimal interrelease times.
dest | thread that starts periodic execution | |
clock | absolute time to start. |
0 | OK | |
!0 | Error |
For details, see l4_rt_begin_minimal_periodic() in the l4sys package.
Definition at line 176 of file clientlib.c.
References server_id, and server_init().
Referenced by l4cpu_reserve_wait_periodic_ready().
int l4cpu_reserve_begin_minimal_periodic_self | ( | l4_threadid_t | thread | ) |
Start periodic execution with minimal interrelease times, own thread.
me | (cached) own ID. L4_INVALID_ID if you don't know. | |
clock | absolute time to start. 0: ASAP. |
0 | OK | |
!0 | Error |
For details, see l4_rt_begin_minimal_periodic() in the l4sys package. For notes, see l4cpu_reserve_begin_strictly_periodic_self().
Definition at line 189 of file clientlib.c.
References server_id, and server_init().
int l4cpu_reserve_begin_strictly_periodic | ( | l4_threadid_t | thread, | |
l4_kernel_clock_t | clock | |||
) |
Start strictly periodic execution.
dest | thread that starts periodic execution | |
clock | absolute time to start. |
0 | OK | |
!0 | Error |
For details, see l4_rt_begin_strictly_periodic() in the l4sys package.
Definition at line 135 of file clientlib.c.
References server_id, and server_init().
Referenced by l4cpu_reserve_wait_periodic_ready().
int l4cpu_reserve_begin_strictly_periodic_self | ( | l4_threadid_t | me | ) |
Start strictly periodic execution of own thread ASAP.
me | (cached) own ID. L4_INVALID_ID if you don't know. |
0 | OK | |
!0 | Error |
For details, see l4_rt_begin_strictly_periodic() in the l4sys package.
Definition at line 148 of file clientlib.c.
References server_id, and server_init().
int l4cpu_reserve_change | ( | l4_threadid_t | thread, | |
int | id, | |||
int | new_prio, | |||
int * | new_wcet, | |||
int | new_deadline | |||
) |
Change the reservation of a thread.
thread | thread to change the reservation for | |
id | id of the timeslice to change | |
new_prio | new priority, -1 does not change | |
new_wcet | - in: new wcet, -1 does not change
| |
deadline | new deadline, -1 does not change. |
0 | OK | |
!0 | Error |
Definition at line 90 of file clientlib.c.
References server_id, and server_init().
int l4cpu_reserve_delete_task | ( | l4_threadid_t | task | ) |
Remove the reservations of a task.
task | task to remove all reservations from |
0 | OK | |
!0 | Error |
Definition at line 124 of file clientlib.c.
References server_id, and server_init().
int l4cpu_reserve_delete_thread | ( | l4_threadid_t | thread | ) |
Remove the reservations of a thread.
thread | thread to remove all reservations from |
0 | OK | |
!0 | Error |
Definition at line 109 of file clientlib.c.
References l4cpu_reserve_set_preempter(), server_id, and server_init().
int l4cpu_reserve_end_periodic | ( | l4_threadid_t | thread | ) |
Stop periodic execution.
thread | thread that stops periodic execution |
0 | OK | |
!0 | Error |
For details, see l4_rt_end_periodic() in the l4sys package.
Definition at line 217 of file clientlib.c.
References server_id, and server_init().
int l4cpu_reserve_scheds_count | ( | void | ) |
Return the number of reservations made.
Use this function for debugging/monitoring purposes.
Definition at line 255 of file clientlib.c.
References server_id, and server_init().
Referenced by l4cpu_reserve_dump().
int l4cpu_reserve_scheds_get | ( | int | idx, | |
char ** | name, | |||
l4_threadid_t * | thread, | |||
l4_threadid_t * | creator, | |||
int * | id, | |||
int * | prio, | |||
int * | period, | |||
int * | wcet, | |||
int * | deadline | |||
) |
Return a given reservation.
idx | reservation index, 0<=idx<=l4cpu_reserve_scheds_count() | |
name | will set to the name, free() it after use | |
thread | thread-id of reservation | |
creator | thread-id of the creator of the reservation | |
id | id of the reservation | |
prio | priority of the reservation | |
period | period of the reservation | |
wcet | WCET of the reservation | |
deadline | deadline of the reservation, 0 means optional |
Definition at line 264 of file clientlib.c.
References server_id, and server_init().
Referenced by l4cpu_reserve_dump().
int l4cpu_reserve_watch | ( | l4_threadid_t | thread, | |
unsigned ** | addr | |||
) |
Watch exception IPCs for the given thread.
thread | thread to be watched | |
addr | will contain ptr to overflow-field after return. if 0, no address will be provided in return. |
Definition at line 228 of file clientlib.c.
References l4cpu_reserve_set_preempter(), server_id, and server_init().