![]() |
EM-ODP 4.4.0
Event Machine on ODP
|
#include <stdbool.h>#include <stdint.h>#include <string.h>#include <odp_api.h>#include <event_machine.h>#include <event_machine/platform/env/environment.h>#include "em_atomic_group.h"#include "em_atomic_group_types.h"#include "em_core.h"#include "em_eo.h"#include "em_eo_types.h"#include "em_error.h"#include "em_event.h"#include "em_event_group.h"#include "em_event_group_types.h"#include "em_event_inline.h"#include "em_event_state.h"#include "em_event_types.h"#include "em_internal_event.h"#include "em_internal_event_types.h"#include "em_mem.h"#include "em_queue.h"#include "em_queue_group.h"#include "em_queue_group_types.h"#include "em_queue_inline.h"#include "em_queue_types.h"
Go to the source code of this file.
Functions | |
| em_status_t | create_shared_ctrl_queue (void) |
| Create EM's internal shared unscheduled control queue at startup. | |
| em_status_t | create_ctrl_queue (void) |
| Create EM's internal unscheduled control queues at startup - one per core. | |
| em_status_t | delete_ctrl_queues (void) |
| Delete EM's internal unscheduled control queues at teardown. | |
| int | send_core_ctrl_events (const odp_thrmask_t *const thr_mask, em_event_t ctrl_event, void(*f_done_callback)(void *arg_ptr), void *f_done_arg_ptr, int num_notif, const em_notif_t notif_tbl[], bool sync_operation) |
| Sends an internal control event to each thread set in 'mask'. | |
| em_event_group_t | internal_done_w_notif_req (int event_group_count, void(*f_done_callback)(void *arg_ptr), void *f_done_arg_ptr, int num_notif, const em_notif_t notif_tbl[], bool sync_operation) |
| Helper func: Allocate & set up the internal 'done' event with function callbacks and notification events. Creates the needed event group and applies the event group count. A successful setup returns the event group ready for use with em_send_group(). | |
| void | evgrp_abort_delete (em_event_group_t event_group) |
| internal_done_w_notif_req() 'companion' to abort and delete the event group created by the mentioned function. | |
| em_status_t | send_notifs (const int num_notif, const em_notif_t notif_tbl[]) |
| Helper func to send notifications events. | |
| em_status_t | check_notif (const em_notif_t *const notif) |
| Check that the usage of a notification is valid. | |
| em_status_t | check_notif_tbl (const int num_notif, const em_notif_t notif_tbl[]) |
| Check that the usage of a table of notifications is valid. | |
| void | poll_unsched_ctrl_queue (void) |
| Poll EM's internal unscheduled control queues during dispatch. | |
EM Internal Control
Definition in file em_internal_event.c.
| #define _GNU_SOURCE |
Definition at line 39 of file em_internal_event.c.
| em_status_t check_notif | ( | const em_notif_t *const | notif | ) |
Check that the usage of a notification is valid.
Definition at line 515 of file em_internal_event.c.
| em_status_t check_notif_tbl | ( | const int | num_notif, |
| const em_notif_t | notif_tbl[] | ||
| ) |
Check that the usage of a table of notifications is valid.
Definition at line 542 of file em_internal_event.c.
| em_status_t create_ctrl_queue | ( | void | ) |
Create EM's internal unscheduled control queues at startup - one per core.
Definition at line 104 of file em_internal_event.c.
| em_status_t create_shared_ctrl_queue | ( | void | ) |
Create EM's internal shared unscheduled control queue at startup.
Definition at line 76 of file em_internal_event.c.
| em_status_t delete_ctrl_queues | ( | void | ) |
Delete EM's internal unscheduled control queues at teardown.
Definition at line 155 of file em_internal_event.c.
| void evgrp_abort_delete | ( | em_event_group_t | event_group | ) |
internal_done_w_notif_req() 'companion' to abort and delete the event group created by the mentioned function.
Definition at line 471 of file em_internal_event.c.
| em_event_group_t internal_done_w_notif_req | ( | int | event_group_count, |
| void(*)(void *arg_ptr) | f_done_callback, | ||
| void * | f_done_arg_ptr, | ||
| int | num_notif, | ||
| const em_notif_t | notif_tbl[], | ||
| bool | sync_operation | ||
| ) |
Helper func: Allocate & set up the internal 'done' event with function callbacks and notification events. Creates the needed event group and applies the event group count. A successful setup returns the event group ready for use with em_send_group().
| EM_EVENT_GROUP_UNDEF | on error |
Definition at line 403 of file em_internal_event.c.
| void poll_unsched_ctrl_queue | ( | void | ) |
Poll EM's internal unscheduled control queues during dispatch.
Definition at line 607 of file em_internal_event.c.
| int send_core_ctrl_events | ( | const odp_thrmask_t *const | mask, |
| em_event_t | ctrl_event, | ||
| void(*)(void *arg_ptr) | f_done_callback, | ||
| void * | f_done_arg_ptr, | ||
| int | num_notif, | ||
| const em_notif_t | notif_tbl[], | ||
| bool | sync_operation | ||
| ) |
Sends an internal control event to each thread set in 'mask'.
When all threads set in 'mask' have processed the event an additional internal 'done' msg is sent to synchronize - this done-event can then trigger any notifications for the user that the operation was completed. Processing of the 'done' event will also call the 'f_done_callback' function if given.
Definition at line 198 of file em_internal_event.c.
| em_status_t send_notifs | ( | const int | num_notif, |
| const em_notif_t | notif_tbl[] | ||
| ) |
Helper func to send notifications events.
Definition at line 488 of file em_internal_event.c.