Go to the source code of this file.
Data Structures | |
struct | l4events_event_t |
definition of messge (event) More... | |
Defines | |
#define | L4EVENTS_OK 0 |
Ok. | |
#define | L4EVENTS_WARNING_TASK_REGISTERED 0xf1 |
Task is already registered. | |
#define | L4EVENTS_WARNING_TASK_NOT_REGISTERED 0xf2 |
Task is not registered. | |
#define | L4EVENTS_WARNING_EVENTS_DELETED 0xf3 |
Task lost pending events deleted during unregister. | |
#define | L4EVENTS_WARNING_EVENTTYP_NOT_REGISTERED 0xf4 |
There is no registered task for this channel. | |
#define | L4EVENTS_WARNING_NO_EVENT_TO_RECEIVE 0xf5 |
The task has no event to receive. | |
#define | L4EVENTS_WARNING_EVENT_PENDING 0xf6 |
Some registered task has not received this event. | |
#define | L4EVENTS_WARNING_INVALID_EVENTNR 0xf7 |
The event-number the task want to be acknowledged doesn't exist. | |
#define | L4EVENTS_ERROR_INTERNAL 0xf8 |
Internal server error occured. | |
#define | L4EVENTS_ERROR_IPC 0xf9 |
IPC error occured. | |
#define | L4EVENTS_ERROR_TIMEOUT 0xfa |
IPC timeout occured. | |
#define | L4EVENTS_ERROR_INVALID_COMMAND 0xfb |
Unknown command was sent. | |
#define | L4EVENTS_ERROR_OTHER 0xfc |
Undefined error occured. | |
#define | L4EVENTS_RECV_OTHER 0xfd |
another server replied to an open wait call. | |
#define | L4EVENTS_ERROR_NOT_EXISTS 0xfe |
thread does not exists or we are not allowed to communicate | |
#define | L4EVENTS_ASYNC 1 |
non-blocking send | |
#define | L4EVENTS_SEND_ACK 2 |
acknowledge after sending | |
#define | L4EVENTS_RECV_ACK 4 |
give acknowledge after receive | |
#define | L4EVENTS_GIVE_ACK 8 |
give acknowledge and receive | |
#define | L4EVENTS_RECV_SHORT 16 |
receive a short event | |
#define | L4EVENTS_NO_CHANNEL 0 |
event_ch 0 is reserved | |
#define | L4EVENTS_EXIT_CHANNEL 1 |
event_ch for task exit | |
#define | L4EVENTS_MAX_BUFFER_SIZE 60 |
definition of the maximum length of an event | |
#define | L4EVENTS_MAX_PRIORITY 15 |
maximum priority | |
#define | L4EVENTS_NO_NR 0 |
event-nr 0 is reserved | |
Typedefs | |
typedef l4_uint16_t | l4events_ch_t |
definition of a channel | |
typedef l4_umword_t | l4events_nr_t |
definition of an event-nr | |
typedef L4_CV void(* | l4events_recv_function_t )(l4events_ch_t, l4events_event_t *) |
callback function type definition | |
Functions | |
L4_CV int | l4events_init (void) |
Initializes the event server. | |
L4_CV long | l4events_register (const l4events_ch_t event_ch, const l4events_pr_t priority) |
Registers a task with its task id for an channel. | |
L4_CV long | l4events_unregister (const l4events_ch_t event_ch) |
Unregisters a task for an channel. | |
L4_CV long | l4events_unregister_all (void) |
Unregisters a task for all previous registered channels. | |
L4_CV long | l4events_send (const l4events_ch_t event_ch, l4events_event_t *event, l4events_nr_t *event_nr, const int opt) |
Sends an event to all registered tasks. | |
L4_CV long | l4events_receive (l4events_ch_t *event_ch, l4events_event_t *event, l4events_nr_t *event_nr, l4_timeout_t timeout, const int opt) |
Receives an event. | |
L4_CV long | l4events_give_ack_and_receive (l4events_ch_t *event_ch, l4events_event_t *event, l4events_nr_t *event_nr, l4_timeout_t timeout, const int opt) |
Acknowledges and receives an event. | |
L4_CV int | l4events_dump (void) |
Dumps some information about the event server. | |
L4_CV void | l4events_wait (int threadno, l4events_ch_t event_ch, l4events_recv_function_t function) |
Starts a thread that waits for an event. | |
L4_CV long | l4events_get_ack (l4events_nr_t *event_nr, l4_timeout_t timeout) |
Tries to get acknowledge after sending an event. | |
L4_CV long | l4events_get_ack_open (l4events_nr_t *event_nr, l4_threadid_t *id, l4_umword_t *w1, l4_umword_t *w2, l4_timeout_t timeout) |
Tries to get acknowledge after sending an event with an open wait. | |
L4_CV long | l4events_give_ack (l4events_nr_t event_nr) |
Tries to set acknowledge after receiving an event. |
Definition in file events.h.
#define L4EVENTS_OK 0 |
#define L4EVENTS_WARNING_TASK_REGISTERED 0xf1 |
Task is already registered.
The task tries itself to register twice for the same channel. The request was ignored by the server.
#define L4EVENTS_WARNING_TASK_NOT_REGISTERED 0xf2 |
Task is not registered.
The task is not registered for this channel, but tries to unregister. The request is ignoered by the server.
#define L4EVENTS_WARNING_EVENTS_DELETED 0xf3 |
Task lost pending events deleted during unregister.
The has itself unregistered for an channel. During the operation the server removed some pending events from the wait-queue of this task. This may cause serious information loss.
#define L4EVENTS_WARNING_EVENTTYP_NOT_REGISTERED 0xf4 |
There is no registered task for this channel.
The task has send an event. During the operation the server hasn't found any registered task for this channel. The event was thrown away. This may cause serious information loss.
#define L4EVENTS_WARNING_NO_EVENT_TO_RECEIVE 0xf5 |
The task has no event to receive.
The thread tries to receive some event. During the operation the server hasn't found any event suitable for this receive.
#define L4EVENTS_WARNING_EVENT_PENDING 0xf6 |
#define L4EVENTS_WARNING_INVALID_EVENTNR 0xf7 |
#define L4EVENTS_ERROR_INTERNAL 0xf8 |
#define L4EVENTS_ERROR_IPC 0xf9 |
#define L4EVENTS_ERROR_TIMEOUT 0xfa |
IPC timeout occured.
The client-library detected an IPC timeout. This could normally only happen during a receive operation with timeout set. The error should be handled by client.
#define L4EVENTS_ERROR_INVALID_COMMAND 0xfb |
#define L4EVENTS_RECV_OTHER 0xfd |
#define L4EVENTS_ERROR_NOT_EXISTS 0xfe |
#define L4EVENTS_ASYNC 1 |
non-blocking send
The sender is not blocked while the server tries to send the event to all registered tasks. The default is that the sender is blocked while the server tries to send the event to all registered tasks.
#define L4EVENTS_SEND_ACK 2 |
acknowledge after sending
The sender can get acknowledged after all registered tasks for the channel have received the event. The acknowledge can be requested with l4events_get_ack. The default is to get no acknowledge.
#define L4EVENTS_RECV_ACK 4 |
give acknowledge after receive
The receiver can give acknowledged after processing the received event. The acknowledge can be given with l4events_give_ack or combined with l4events_give_ack_and_receive. The default is to get no acknowledge.
#define L4EVENTS_GIVE_ACK 8 |
give acknowledge and receive
Use the API function l4events_give_ack_and_receive.
#define L4EVENTS_RECV_SHORT 16 |
#define L4EVENTS_MAX_BUFFER_SIZE 60 |
typedef l4_uint16_t l4events_ch_t |
typedef l4_umword_t l4events_nr_t |
typedef L4_CV void(* l4events_recv_function_t)(l4events_ch_t, l4events_event_t *) |