|
EM-ODP
3.7.0
Event Machine on ODP
|
Go to the documentation of this file.
38 #ifndef EM_QUEUE_GROUP_H_
39 #define EM_QUEUE_GROUP_H_
45 #define invalid_qgrp(queue_group) \
46 ((unsigned int)qgrp_hdl2idx((queue_group)) >= EM_MAX_QUEUE_GROUPS)
56 em_queue_group_t queue_group);
59 em_queue_group_t requested_queue_group);
74 unsigned int queue_group_count(
void);
116 qgrp_hdl2idx(
const em_queue_group_t queue_group)
118 return (
int)((uintptr_t)queue_group - 1);
124 static inline em_queue_group_t
125 qgrp_idx2hdl(
const int queue_group_idx)
127 return (em_queue_group_t)(uintptr_t)(queue_group_idx + 1);
134 queue_group_elem_get(em_queue_group_t queue_group)
136 const int qgrp_idx = qgrp_hdl2idx(queue_group);
142 qgrp_elem = &
em_shm->queue_group_tbl.queue_group_elem[qgrp_idx];
157 core_queue_grp_name(
int core,
char qgrp_name[],
size_t len)
162 if (unlikely(maxlen == 0))
166 snprintf(qgrp_name, maxlen,
"%s%d",
168 qgrp_name[maxlen - 1] =
'\0';
void queue_group_join_all(void)
The calling core joins all available queue groups.
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_rem_core_req(const internal_event_t *i_ev)
EM internal event handler, remove core from an EM queue group. (see em_internal_event....
#define EM_QUEUE_GROUP_NAME_LEN
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)
em_queue_group_t queue_group_create_sync(const char *name, const em_core_mask_t *mask, em_queue_group_t requested_queue_group)
#define EM_QUEUE_GROUP_CORE_BASE_NAME
em_status_t queue_group_init(queue_group_tbl_t *const queue_group_tbl, queue_group_pool_t *const queue_group_pool)
objpool_elem_t queue_group_pool_elem
void queue_group_info_print_all(void)
Print EM queue group info.
#define EM_MAX_QUEUE_GROUPS
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_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_status_t queue_group_modify_sync(queue_group_elem_t *const qgrp_elem, const em_core_mask_t *new_mask, bool is_delete)
em_status_t queue_group_check_mask(const em_core_mask_t *mask)
Check that only running EM cores are set in mask.