clientlib.c File Reference

Client bindings for the CPU reservation server. More...

Go to the source code of this file.

Defines

#define my_default_environment

Typedefs

typedef void *(* malloc_t )(unsigned long)

Functions

static void l4cpu_reserve_set_preempter (l4_threadid_t thread, l4_threadid_t preempter)
static int server_init (void)
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_delayed_preempt (l4_threadid_t thread, int id, int prio, int *delay)
 Add delayed preemption reservation for a thread, internal function.
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 thread)
 Start strictly periodic execution of own thread ASAP.
int l4cpu_reserve_begin_strictly_periodic_self_deprecated (l4_threadid_t thread, l4_kernel_clock_t clock)
 Deprecated version with timeout, which is unsafe.
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_begin_minimal_periodic_self_deprecated (l4_threadid_t thread, l4_kernel_clock_t clock)
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.

Use this function for debugging/monitoring purposes.

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.
int l4cpu_reserve_time_demand (l4_threadid_t thread, int id)
 Return response time of given thread.

Variables

static l4_threadid_t server_id = L4_INVALID_ID


Detailed Description

Client bindings for the CPU reservation server.

Date:
09/06/2004
Author:
Jork Loeser <jork.loeser@inf.tu-dresden.de>

Definition in file clientlib.c.


Define Documentation

#define my_default_environment

Value:

{ { _corba: { major: CORBA_NO_EXCEPTION, repos_id: 0} }, \
      { param: 0}, L4_IPC_NEVER_INITIALIZER, \
      { fp: { 1, 1, L4_WHOLE_ADDRESS_SPACE, 0, 0 } }, \
      (malloc_t)malloc, free }

Definition at line 26 of file clientlib.c.


Typedef Documentation

typedef void*(* malloc_t)(unsigned long)

Definition at line 24 of file clientlib.c.


Function Documentation

int l4cpu_reserve_begin_minimal_periodic_self_deprecated ( l4_threadid_t  thread,
l4_kernel_clock_t  clock 
)

Definition at line 201 of file clientlib.c.

References server_id, and server_init().

int l4cpu_reserve_begin_strictly_periodic_self_deprecated ( l4_threadid_t  thread,
l4_kernel_clock_t  clock 
)

Deprecated version with timeout, which is unsafe.

Definition at line 160 of file clientlib.c.

References server_id, and server_init().

static void l4cpu_reserve_set_preempter ( l4_threadid_t  thread,
l4_threadid_t  preempter 
) [static]

Definition at line 32 of file clientlib.c.

Referenced by l4cpu_reserve_delete_thread(), and l4cpu_reserve_watch().

int l4cpu_reserve_time_demand ( l4_threadid_t  thread,
int  id 
)

Return response time of given thread.

Parameters:
thread thread id
id timeslice id
Return values:
>=0 worst-case response time according to given reservations
-L4_ETIME response-time larger than period (or deadline, if set) of the thread
-L4_EINVAL thread/timeslice not registered.

Definition at line 291 of file clientlib.c.

References server_id, and server_init().

static int server_init ( void   )  [static]


Variable Documentation

l4_threadid_t server_id = L4_INVALID_ID [static]


CPU reservation server Reference Manual, written by Jork Loeser  © 2004