![]() |
EM-ODP 4.4.0
Event Machine on ODP
|
#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <stdio.h>#include <event_machine.h>#include "em_internal_event_types.h"#include "em_mem.h"#include "em_queue_group_types.h"#include "em_queue_types.h"#include "misc/objpool.h"

Go to the source code of this file.
Macros | |
| #define | invalid_qgrp(queue_group) ((unsigned int)qgrp_hdl2idx((queue_group)) >= EM_MAX_QUEUE_GROUPS) |
Functions | |
| em_status_t | queue_group_init (queue_group_tbl_t *const queue_group_tbl, queue_group_pool_t *const queue_group_pool) |
| em_status_t | queue_group_init_local (void) |
| em_status_t | queue_group_term (void) |
| void | queue_group_join_all (void) |
| The calling core joins all available queue groups. | |
| void | queue_group_leave_all (bool flush_orphan_qgrps) |
| The calling core leaves all queue groups it is part of. | |
| em_queue_group_t | queue_group_create (const char *name, const em_core_mask_t *mask, int num_notif, const em_notif_t notif_tbl[], em_queue_group_t queue_group) |
| em_queue_group_t | queue_group_create_sync (const char *name, const em_core_mask_t *mask, em_queue_group_t requested_queue_group) |
| em_status_t | queue_group_modify (queue_group_elem_t *const qgrp_elem, const em_core_mask_t *new_mask, int num_notif, const em_notif_t notif_tbl[], bool is_delete) |
| em_status_t | queue_group_modify_sync (queue_group_elem_t *const qgrp_elem, const em_core_mask_t *new_mask, bool is_delete) |
| void | queue_group_add_queue_list (queue_group_elem_t *const queue_group_elem, queue_elem_t *const queue_elem) |
| void | queue_group_rem_queue_list (queue_group_elem_t *const queue_group_elem, queue_elem_t *const queue_elem) |
| unsigned int | queue_group_count (void) |
| em_status_t | queue_group_check_mask (const em_core_mask_t *mask) |
| Check that only running EM cores are set in mask. | |
| void | queue_group_info_print_all (void) |
| Print EM queue group info. | |
| void | queue_group_queues_print (em_queue_group_t qgrp) |
| Print info about all queues belonging to the given queue group. | |
| void | i_event__qgrp_add_core_req (const internal_event_t *i_ev) |
| EM internal event handler, add core to an EM queue group. (see em_internal_event.c&h) | |
| void | i_event__qgrp_rem_core_req (const internal_event_t *i_ev) |
| EM internal event handler, remove core from an EM queue group. (see em_internal_event.c&h) | |
EM internal queue group functions
Definition in file em_queue_group.h.
| #define invalid_qgrp | ( | queue_group | ) | ((unsigned int)qgrp_hdl2idx((queue_group)) >= EM_MAX_QUEUE_GROUPS) |
Definition at line 58 of file em_queue_group.h.
| void i_event__qgrp_add_core_req | ( | const internal_event_t * | i_ev | ) |
EM internal event handler, add core to an EM queue group. (see em_internal_event.c&h)
Handle the internal event requesting to add the core to an ODP schedule group that is related to an EM queue group.
Definition at line 1580 of file em_queue_group.c.
| void i_event__qgrp_rem_core_req | ( | const internal_event_t * | i_ev | ) |
EM internal event handler, remove core from an EM queue group. (see em_internal_event.c&h)
Handle the internal event requesting to remove the core from an ODP schedule group that is related to an EM queue group.
Definition at line 1593 of file em_queue_group.c.
| void queue_group_add_queue_list | ( | queue_group_elem_t *const | queue_group_elem, |
| queue_elem_t *const | queue_elem | ||
| ) |
Definition at line 1769 of file em_queue_group.c.
| em_status_t queue_group_check_mask | ( | const em_core_mask_t * | mask | ) |
Check that only running EM cores are set in mask.
| mask | Queue group core mask |
Definition at line 931 of file em_queue_group.c.
| unsigned int queue_group_count | ( | void | ) |
Definition at line 1789 of file em_queue_group.c.
| em_queue_group_t queue_group_create | ( | const char * | name, |
| const em_core_mask_t * | mask, | ||
| int | num_notif, | ||
| const em_notif_t | notif_tbl[], | ||
| em_queue_group_t | requested_queue_group | ||
| ) |
Allow creating a queue group with a specific handle if requested and available.
Definition at line 903 of file em_queue_group.c.
| em_queue_group_t queue_group_create_sync | ( | const char * | name, |
| const em_core_mask_t * | mask, | ||
| em_queue_group_t | requested_queue_group | ||
| ) |
Allow creating a queue group synchronously with a specific handle if requested and available. No need for sync blocking when creating a new queue group.
Definition at line 918 of file em_queue_group.c.
| void queue_group_info_print_all | ( | void | ) |
Print EM queue group info.
Definition at line 1861 of file em_queue_group.c.
| em_status_t queue_group_init | ( | queue_group_tbl_t *const | queue_group_tbl, |
| queue_group_pool_t *const | queue_group_pool | ||
| ) |
Queue group inits done at global init (once at startup on one core)
Definition at line 176 of file em_queue_group.c.
| em_status_t queue_group_init_local | ( | void | ) |
Definition at line 238 of file em_queue_group.c.
| void queue_group_join_all | ( | void | ) |
The calling core joins all available queue groups.
Main use case for em_term(): to be able to flush the scheduler with only the last EM-core running we need to modify all queue groups to include this last core in the queue groups' core masks
Definition at line 536 of file em_queue_group.c.
| void queue_group_leave_all | ( | bool | flush_orphan_qgrps | ) |
The calling core leaves all queue groups it is part of.
Also flushes the scheduler from events from queues that belong to queue groups that would only be services by the terminating core.
Main use case for em_term_local()/em_term_core()
| flush_orphan_qgrps | Flush the scheduler from events from queues that belong to queue groups that only this core is handling queues for. |
Definition at line 581 of file em_queue_group.c.
| em_status_t queue_group_modify | ( | queue_group_elem_t *const | qgrp_elem, |
| const em_core_mask_t * | new_mask, | ||
| int | num_notif, | ||
| const em_notif_t | notif_tbl[], | ||
| bool | is_delete | ||
| ) |
Called by em_queue_group_modify with flag is_delete=0 and by em_queue_group_delete() with flag is_delete=1
| qgrp_elem | Queue group element |
| new_mask | New core mask |
| num_notif | Number of entries in notif_tbl (0 for no notification) |
| notif_tbl | Array of notifications to send as the operation completes |
| is_delete | Is this modify triggered by em_queue_group_delete()? |
Definition at line 1259 of file em_queue_group.c.
| em_status_t queue_group_modify_sync | ( | queue_group_elem_t *const | qgrp_elem, |
| const em_core_mask_t * | new_mask, | ||
| bool | is_delete | ||
| ) |
Called by em_queue_group_modify_sync with flag is_delete=0 and by em_queue_group_delete_sync() with flag is_delete=1
| qgrp_elem | Queue group element |
| new_mask | New core mask |
| is_delete | Is this modify triggered by em_queue_group_delete_sync()? |
Definition at line 1381 of file em_queue_group.c.
| void queue_group_queues_print | ( | em_queue_group_t | qgrp | ) |
Print info about all queues belonging to the given queue group.
Definition at line 1923 of file em_queue_group.c.
| void queue_group_rem_queue_list | ( | queue_group_elem_t *const | queue_group_elem, |
| queue_elem_t *const | queue_elem | ||
| ) |
Definition at line 1778 of file em_queue_group.c.
| em_status_t queue_group_term | ( | void | ) |
Definition at line 275 of file em_queue_group.c.