Introduction   Client Library API Reference   Demo1   Demo2   Demo3   File List   Index  

events - server API

Functions the server implements. More...

Functions

l4_uint8_t server_register (l4_threadid_t client, l4events_ch_t event_ch, l4events_pr_t priority)
 Handles a register request.
l4_uint8_t server_unregister (l4_threadid_t client, l4events_ch_t event_ch)
 Handles an unregister request.
l4_uint8_t server_unregister_all (l4_threadid_t client)
 Handles an unregister all request.
l4_uint8_t server_send_event (l4_threadid_t client, l4events_ch_t event_ch, const l4events_event_t *event, int async, int ack)
 Handles a send request.
l4_uint8_t server_receive_event (l4_threadid_t client, l4events_ch_t *event_ch, l4events_event_t *event, int ack)
 Handles a receive request.
l4_uint8_t server_give_ack (l4_threadid_t client, l4events_nr_t event_nr)
 Handles a give-ack request from the receiver.
l4_uint8_t server_get_ack (l4_threadid_t client, l4events_nr_t event_nr)
 Handles a get-ack request from the sender.
l4_uint8_t server_handle_timeout (void)
 This function is only used internally.
void server_dump (void)
 Handles a dump request.

Detailed Description

Functions the server implements.


Function Documentation

l4_uint8_t server_register ( l4_threadid_t  client,
l4events_ch_t  event_ch,
l4events_pr_t  priority 
)

Handles a register request.

Parameters:
client threadid of the client
event_ch specifies the channel to register
priority specefies the priority to register
Returns:
indicates a successful opration

l4_uint8_t server_unregister ( l4_threadid_t  client,
l4events_ch_t  event_ch 
)

Handles an unregister request.

Parameters:
client threadid of the client
event_ch specifies the channel
Returns:
indicates a successful opration

l4_uint8_t server_unregister_all ( l4_threadid_t  client  ) 

Handles an unregister all request.

Calls server_unregister until all channels unregistered,

Parameters:
client threadid of the client
Returns:
indicates a successful opration

l4_uint8_t server_send_event ( l4_threadid_t  client,
l4events_ch_t  event_ch,
const l4events_event_t event,
int  async,
int  ack 
)

Handles a send request.

Sends a long or a short event to waiting tasks or inserts the event in a wait queue if some task registered but can not receive the event.

Parameters:
client threadid of the client
event_ch specifies the channel
event event to send
async a bit flag for blocking or non-blocking send
See also:
WAIT and NO_WAIT
Returns:
indicates a successful opration

l4_uint8_t server_receive_event ( l4_threadid_t  client,
l4events_ch_t event_ch,
l4events_event_t event,
int  ack 
)

Handles a receive request.

Tries to receive an event for the task. If this is not possible, make a note that a thread is waiting for an event.

Parameters:
client threadid of the client
Return values:
event_ch returns the received channel
event returns the received short event
Parameters:
ack acknowledge after send
Returns:
indicates a successful opration

l4_uint8_t server_give_ack ( l4_threadid_t  client,
l4events_nr_t  event_nr 
)

Handles a give-ack request from the receiver.

Parameters:
client threadid of the client
event_nr number of the event
Returns:
indicates a successful opration

l4_uint8_t server_get_ack ( l4_threadid_t  client,
l4events_nr_t  event_nr 
)

Handles a get-ack request from the sender.

Parameters:
client threadid of the client
event_nr number of the event
Returns:
indicates a successful opration

l4_uint8_t server_handle_timeout ( void   ) 

This function is only used internally.

Returns:
indicates a successful opration

void server_dump ( void   ) 

Handles a dump request.


Events Reference Manual, written by Torsten Frenzel  © 2003