EM-ODP  3.7.0
Event Machine on ODP
em_internal_event.c File Reference
#include "em_include.h"
Include dependency graph for em_internal_event.c:

Go to the source code of this file.

Functions

em_status_t create_ctrl_queues (void)
 Create EM's internal unscheduled control queues at startup.
 
em_status_t delete_ctrl_queues (void)
 Delete EM's internal unscheduled control queues at teardown.
 
int send_core_ctrl_events (const em_core_mask_t *const 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 core set in 'mask'. More...
 
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(). More...
 
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.
 

Detailed Description

EM Internal Control

Definition in file em_internal_event.c.

Function Documentation

◆ internal_done_w_notif_req()

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().

Returns
An event group successfully 'applied' with count and notifications.
Return values
EM_EVENT_GROUP_UNDEFon error
See also
evgrp_abort_delete() below for deleting the event group returned by this function.

Definition at line 335 of file em_internal_event.c.

◆ send_core_ctrl_events()

int send_core_ctrl_events ( const em_core_mask_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 core set in 'mask'.

When all cores set in 'mask' has 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.

Returns
0 on success, otherwise return the number of ctrl events that could not be sent due to error

Definition at line 135 of file em_internal_event.c.