EM-ODP  3.7.0
Event Machine on ODP
event_machine_queue.c
1 /*
2  * Copyright (c) 2015-2023, Nokia Solutions and Networks
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  * * Neither the name of the copyright holder nor the names of its
15  * contributors may be used to endorse or promote products derived
16  * from this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #include "em_include.h"
33 
34 /* per core (thread) state for queue_get_next() */
35 static ENV_LOCAL unsigned int _queue_tbl_iter_idx;
36 
37 COMPILE_TIME_ASSERT(EM_QUEUE_NAME_LEN <= ODP_QUEUE_NAME_LEN,
38  EM_QUEUE_NAME_LEN_OVER_ODP_LIMIT);
39 
40 em_queue_t
41 em_queue_create(const char *name, em_queue_type_t type, em_queue_prio_t prio,
42  em_queue_group_t queue_group, const em_queue_conf_t *conf)
43 {
44  const char *err_str = "";
45  em_queue_t queue;
46 
47  queue = queue_create(name, type, prio, queue_group,
49  conf, &err_str);
50 
51  if (unlikely(queue == EM_QUEUE_UNDEF))
52  INTERNAL_ERROR(EM_ERR_LIB_FAILED, EM_ESCOPE_QUEUE_CREATE,
53  err_str);
54  return queue;
55 }
56 
58 em_queue_create_static(const char *name, em_queue_type_t type,
59  em_queue_prio_t prio, em_queue_group_t queue_group,
60  em_queue_t queue, const em_queue_conf_t *conf)
61 {
62  const char *err_str = "";
63  em_queue_t queue_static;
64 
66  EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_CREATE_STATIC,
67  "Invalid static queue requested:%" PRI_QUEUE "",
68  queue);
69 
70  queue_static = queue_create(name, type, prio, queue_group,
71  queue, EM_ATOMIC_GROUP_UNDEF,
72  conf, &err_str);
73  RETURN_ERROR_IF(queue_static == EM_QUEUE_UNDEF,
74  EM_ERR_NOT_FREE, EM_ESCOPE_QUEUE_CREATE_STATIC,
75  "Static queue:%" PRI_QUEUE " creation failed: %s", queue, err_str);
76 
77  if (unlikely(queue_static != queue)) {
78  queue_elem_t *q_elem = queue_elem_get(queue_static);
79 
80  /* Fatal error if q_elem == NULL, should never happen if queue_static != UNDEF */
81  RETURN_ERROR_IF(!q_elem, EM_FATAL(EM_ERR_BAD_POINTER),
82  EM_ESCOPE_QUEUE_CREATE_STATIC,
83  "Queue error - req:%" PRI_QUEUE " vs. %" PRI_QUEUE "(q_elem NULL)",
84  queue, queue_static);
85 
86  queue_delete(q_elem);
87  return INTERNAL_ERROR(EM_ERR_BAD_ID, EM_ESCOPE_QUEUE_CREATE_STATIC,
88  "Queue error - req:%" PRI_QUEUE " vs. %" PRI_QUEUE "",
89  queue, queue_static);
90  }
91 
92  return EM_OK;
93 }
94 
95 em_status_t em_queue_delete(em_queue_t queue)
96 {
97  queue_elem_t *const q_elem = queue_elem_get(queue);
98  em_status_t status;
99 
100  RETURN_ERROR_IF(q_elem == NULL || !queue_allocated(q_elem),
101  EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_DELETE,
102  "Invalid queue:%" PRI_QUEUE "", queue);
103 
104  status = queue_delete(q_elem);
105 
106  RETURN_ERROR_IF(status != EM_OK, status, EM_ESCOPE_QUEUE_DELETE,
107  "queue delete failed!");
108 
109  return status;
110 }
111 
112 em_status_t em_queue_set_context(em_queue_t queue, const void *context)
113 {
114  queue_elem_t *const queue_elem = queue_elem_get(queue);
115 
116  if (EM_CHECK_LEVEL > 0)
117  RETURN_ERROR_IF(queue_elem == NULL || !queue_allocated(queue_elem),
118  EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_SET_CONTEXT,
119  "Invalid queue:%" PRI_QUEUE "", queue);
120 
121  queue_elem->context = (void *)(uintptr_t)context;
122 
123  return EM_OK;
124 }
125 
126 void *em_queue_get_context(em_queue_t queue)
127 {
128  const queue_elem_t *queue_elem = queue_elem_get(queue);
129 
130  if (EM_CHECK_LEVEL > 0 && unlikely(queue_elem == NULL)) {
131  INTERNAL_ERROR(EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_GET_CONTEXT,
132  "Invalid queue:%" PRI_QUEUE "", queue);
133  return NULL;
134  }
135 
136  if (unlikely(EM_CHECK_LEVEL >= 2 && !queue_allocated(queue_elem))) {
137  INTERNAL_ERROR(EM_ERR_NOT_CREATED, EM_ESCOPE_QUEUE_GET_CONTEXT,
138  "Queue:%" PRI_QUEUE " not created!", queue);
139  return NULL;
140  }
141 
142  return queue_elem->context;
143 }
144 
145 size_t em_queue_get_name(em_queue_t queue, char *name, size_t maxlen)
146 {
147  const queue_elem_t *queue_elem = queue_elem_get(queue);
148 
149  if (EM_CHECK_LEVEL > 0 &&
150  unlikely(name == NULL || maxlen == 0)) {
151  INTERNAL_ERROR(EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_GET_NAME,
152  "Invalid ptr or maxlen (name=0x%" PRIx64 ", maxlen=%zu)",
153  name, maxlen);
154  return 0;
155  }
156 
157  name[0] = '\0';
158 
159  if (EM_CHECK_LEVEL > 0 &&
160  unlikely(queue_elem == NULL || !queue_allocated(queue_elem))) {
161  INTERNAL_ERROR(EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_GET_NAME,
162  "Invalid queue:%" PRI_QUEUE "", queue);
163  return 0;
164  }
165 
166  return queue_get_name(queue_elem, name, maxlen);
167 }
168 
169 em_queue_t em_queue_find(const char *name)
170 {
171  if (name && *name) {
172  /* this might be worth optimizing if maaany queues */
173  for (unsigned int i = 0; i < em_shm->opt.queue.max_num; i++) {
174  const queue_elem_t *q_elem =
175  &em_shm->queue_tbl.queue_elem[i];
176 
177  if (queue_allocated(q_elem) &&
178  !strncmp(name, em_shm->queue_tbl.name[i], EM_QUEUE_NAME_LEN)) {
179  return (em_queue_t)(uintptr_t)
180  em_shm->queue_tbl.queue_elem[i].queue;
181  }
182  }
183  }
184  return EM_QUEUE_UNDEF;
185 }
186 
188 {
189  const queue_elem_t *queue_elem = queue_elem_get(queue);
190 
191  if (EM_CHECK_LEVEL > 0 &&
192  unlikely(queue_elem == NULL || !queue_allocated(queue_elem))) {
193  INTERNAL_ERROR(EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_GET_PRIORITY,
194  "Invalid queue:%" PRI_QUEUE "", queue);
195  return EM_QUEUE_PRIO_UNDEF;
196  }
197 
198  return queue_elem->priority;
199 }
200 
202 {
203  const queue_elem_t *queue_elem = queue_elem_get(queue);
204 
205  if (EM_CHECK_LEVEL > 0 &&
206  unlikely(queue_elem == NULL || !queue_allocated(queue_elem))) {
207  INTERNAL_ERROR(EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_GET_TYPE,
208  "Invalid queue-id:%" PRI_QUEUE "", queue);
209  return EM_QUEUE_TYPE_UNDEF;
210  }
211 
212  return queue_elem->type;
213 }
214 
215 em_queue_group_t em_queue_get_group(em_queue_t queue)
216 {
217  const queue_elem_t *q_elem = queue_elem_get(queue);
218 
219  if (EM_CHECK_LEVEL > 0 &&
220  unlikely(q_elem == NULL || !queue_allocated(q_elem))) {
221  INTERNAL_ERROR(EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_GET_GROUP,
222  "Invalid queue-id:%" PRI_QUEUE "", queue);
223  return EM_QUEUE_GROUP_UNDEF;
224  }
225 
226  if (unlikely(q_elem->state == EM_QUEUE_STATE_INVALID))
227  return EM_QUEUE_GROUP_UNDEF;
228  else
229  return q_elem->queue_group;
230 }
231 
232 em_event_t em_queue_dequeue(em_queue_t queue)
233 {
234  const queue_elem_t *q_elem = queue_elem_get(queue);
235  em_event_t event;
236 
237  if (unlikely(EM_CHECK_LEVEL > 0 && !q_elem)) {
238  INTERNAL_ERROR(EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_DEQUEUE,
239  "Invalid EM queue:%" PRI_QUEUE "", queue);
240  return EM_EVENT_UNDEF;
241  }
242 
243  if (unlikely(EM_CHECK_LEVEL >= 2 && !queue_allocated(q_elem))) {
244  INTERNAL_ERROR(EM_ERR_NOT_CREATED, EM_ESCOPE_QUEUE_DEQUEUE,
245  "Queue:%" PRI_QUEUE " not created", queue);
246  return EM_EVENT_UNDEF;
247  }
248 
249  if (EM_CHECK_LEVEL > 0 &&
250  unlikely(q_elem->type != EM_QUEUE_TYPE_UNSCHEDULED)) {
251  INTERNAL_ERROR(EM_ERR_BAD_CONTEXT, EM_ESCOPE_QUEUE_DEQUEUE,
252  "Queue is not unscheduled, cannot dequeue!");
253  return EM_EVENT_UNDEF;
254  }
255 
256  event = queue_dequeue(q_elem);
257  return event;
258 }
259 
260 int em_queue_dequeue_multi(em_queue_t queue,
261  em_event_t events[/*out*/], int num)
262 {
263  const queue_elem_t *q_elem = queue_elem_get(queue);
264  int ret;
265 
266  if (EM_CHECK_LEVEL > 0 &&
267  unlikely(!q_elem || !events || num < 0)) {
268  INTERNAL_ERROR(EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_DEQUEUE_MULTI,
269  "Inv.args: Q:%" PRI_QUEUE " events[]:%p num:%d",
270  queue, events, num);
271  return 0;
272  }
273 
274  if (unlikely(EM_CHECK_LEVEL >= 2 && !queue_allocated(q_elem))) {
275  INTERNAL_ERROR(EM_ERR_NOT_CREATED, EM_ESCOPE_QUEUE_DEQUEUE,
276  "Queue:%" PRI_QUEUE " not created", queue);
277  return 0;
278  }
279 
280  if (unlikely(num == 0))
281  return 0;
282 
283  if (EM_CHECK_LEVEL > 0 &&
284  unlikely(q_elem->type != EM_QUEUE_TYPE_UNSCHEDULED)) {
286  EM_ESCOPE_QUEUE_DEQUEUE_MULTI,
287  "Queue is not unscheduled, cannot dequeue!");
288  return 0;
289  }
290 
291  ret = queue_dequeue_multi(q_elem, events /*out*/, num);
292  if (unlikely(ret < 0)) {
294  EM_ESCOPE_QUEUE_DEQUEUE_MULTI,
295  "odp_queue_deq_multi(%d):%d", num, ret);
296  return 0;
297  }
298 
299  return ret;
300 }
301 
302 em_queue_t em_queue_current(void)
303 {
304  return queue_current();
305 }
306 
307 em_queue_t em_queue_get_first(unsigned int *num)
308 {
309  const queue_tbl_t *const queue_tbl = &em_shm->queue_tbl;
310  const unsigned int queue_cnt = queue_count();
311  const unsigned int max_queues = em_shm->opt.queue.max_num;
312 
313  _queue_tbl_iter_idx = 0; /* reset iteration */
314 
315  if (num)
316  *num = queue_cnt;
317 
318  if (queue_cnt == 0) {
319  _queue_tbl_iter_idx = max_queues; /* UNDEF = _get_next() */
320  return EM_QUEUE_UNDEF;
321  }
322 
323  /* find first */
324  while (!queue_allocated(&queue_tbl->queue_elem[_queue_tbl_iter_idx])) {
325  _queue_tbl_iter_idx++;
326  if (_queue_tbl_iter_idx >= max_queues)
327  return EM_QUEUE_UNDEF;
328  }
329 
330  return queue_idx2hdl(_queue_tbl_iter_idx);
331 }
332 
333 em_queue_t em_queue_get_next(void)
334 {
335  const unsigned int max_queues = em_shm->opt.queue.max_num;
336 
337  if (_queue_tbl_iter_idx >= max_queues - 1)
338  return EM_QUEUE_UNDEF;
339 
340  _queue_tbl_iter_idx++;
341 
342  const queue_tbl_t *const queue_tbl = &em_shm->queue_tbl;
343 
344  /* find next */
345  while (!queue_allocated(&queue_tbl->queue_elem[_queue_tbl_iter_idx])) {
346  _queue_tbl_iter_idx++;
347  if (_queue_tbl_iter_idx >= max_queues)
348  return EM_QUEUE_UNDEF;
349  }
350 
351  return queue_idx2hdl(_queue_tbl_iter_idx);
352 }
353 
354 int em_queue_get_index(em_queue_t queue)
355 {
356  const internal_queue_t iq = {.queue = queue};
357  const int queue_idx = queue_id2idx(iq.queue_id); /* return value */
358 
359  if (unlikely((unsigned int)queue_idx > em_shm->opt.queue.max_num - 1))
360  goto error;
361 
362  if (EM_CHECK_LEVEL > 0 &&
363  unlikely(iq.device_id != em_shm->conf.device_id))
364  goto error;
365 
366  if (EM_CHECK_LEVEL >= 3) {
367  const queue_elem_t *q_elem =
368  &em_shm->queue_tbl.queue_elem[queue_idx];
369  if (unlikely(q_elem == NULL || !queue_allocated(q_elem)))
370  goto error;
371  }
372 
373  return queue_idx;
374 
375 error:
376  INTERNAL_ERROR(EM_ERR_BAD_ARG, EM_ESCOPE_QUEUE_GET_INDEX,
377  "Bad arg, invalid queue:%" PRI_QUEUE ":\n"
378  " Q.device-id:0x%" PRIx16 " Q.id:0x%" PRIx16 "",
379  queue, iq.device_id, iq.queue_id);
380  return queue_idx % em_shm->opt.queue.max_num;
381 }
382 
383 int em_queue_get_num_prio(int *num_runtime)
384 {
385  if (EM_CHECK_LEVEL > 1 && unlikely(em_shm == NULL)) {
387  EM_ESCOPE_QUEUE_GET_NUM_PRIO,
388  "EM not initialized!");
389  return 0;
390  }
391  if (num_runtime != NULL)
392  *num_runtime = em_shm->queue_prio.num_runtime;
393 
394  return EM_QUEUE_PRIO_NUM;
395 }
396 
398 {
399  return em_shm->opt.queue.max_num;
400 }
401 
402 uint16_t em_queue_get_device_id(em_queue_t queue)
403 {
404  internal_queue_t iq = {.queue = queue};
405 
406  return iq.device_id;
407 }
408 
409 uint16_t em_queue_get_qid(em_queue_t queue)
410 {
411  internal_queue_t iq = {.queue = queue};
412 
413  return iq.queue_id;
414 }
415 
416 void em_queue_get_ids(em_queue_t queue, uint16_t *device_id /*out*/, uint16_t *qid /*out*/)
417 {
418  internal_queue_t iq = {.queue = queue};
419 
420  if (likely(device_id))
421  *device_id = iq.device_id;
422  if (likely(qid))
423  *qid = iq.queue_id;
424 }
425 
426 em_queue_t em_queue_handle_raw(uint16_t device_id, uint16_t qid)
427 {
428  internal_queue_t iq = {.device_id = device_id, .queue_id = qid};
429 
430  return iq.queue;
431 }
432 
433 uint32_t em_queue_to_u32(em_queue_t queue)
434 {
435  uint64_t queue_uptr = (uintptr_t)queue;
436  uint32_t queue_u32 = (uint32_t)(queue_uptr & UINT32_MAX);
437 
438  return queue_u32;
439 }
EM_QUEUE_GROUP_UNDEF
#define EM_QUEUE_GROUP_UNDEF
Definition: event_machine_types.h:127
queue_elem_t::queue_group
em_queue_group_t queue_group
Definition: em_queue_types.h:252
EM_OK
#define EM_OK
Definition: event_machine_types.h:329
EM_ERR_NOT_INITIALIZED
@ EM_ERR_NOT_INITIALIZED
Definition: event_machine_hw_types.h:280
EM_QUEUE_PRIO_UNDEF
#define EM_QUEUE_PRIO_UNDEF
Definition: event_machine_hw_types.h:157
EM_QUEUE_PRIO_NUM
#define EM_QUEUE_PRIO_NUM
Definition: event_machine_hw_config.h:103
em_queue_conf_t
Definition: event_machine_types.h:212
EM_QUEUE_STATE_INVALID
@ EM_QUEUE_STATE_INVALID
Definition: em_queue_types.h:126
EM_ERR_NOT_CREATED
@ EM_ERR_NOT_CREATED
Definition: event_machine_hw_types.h:274
em_shm_t::queue_prio
struct em_shm_t::@53 queue_prio
EM_EVENT_UNDEF
#define EM_EVENT_UNDEF
Definition: event_machine_types.h:62
em_queue_get_ids
void em_queue_get_ids(em_queue_t queue, uint16_t *device_id, uint16_t *qid)
Definition: event_machine_queue.c:416
queue_elem_t::type
uint8_t type
Definition: em_queue_types.h:216
em_queue_dequeue_multi
int em_queue_dequeue_multi(em_queue_t queue, em_event_t events[], int num)
Definition: event_machine_queue.c:260
em_queue_get_index
int em_queue_get_index(em_queue_t queue)
Definition: event_machine_queue.c:354
EM_ERR_LIB_FAILED
@ EM_ERR_LIB_FAILED
Definition: event_machine_hw_types.h:291
em_queue_dequeue
em_event_t em_queue_dequeue(em_queue_t queue)
Definition: event_machine_queue.c:232
queue_elem_t::state
queue_state_t state
Definition: em_queue_types.h:210
em_queue_type_t
uint32_t em_queue_type_t
Definition: event_machine_types.h:168
em_queue_get_first
em_queue_t em_queue_get_first(unsigned int *num)
Definition: event_machine_queue.c:307
em_queue_create
em_queue_t em_queue_create(const char *name, em_queue_type_t type, em_queue_prio_t prio, em_queue_group_t queue_group, const em_queue_conf_t *conf)
Definition: event_machine_queue.c:41
EM_QUEUE_NAME_LEN
#define EM_QUEUE_NAME_LEN
Definition: event_machine_config.h:125
em_queue_get_priority
em_queue_prio_t em_queue_get_priority(em_queue_t queue)
Definition: event_machine_queue.c:187
EM_QUEUE_TYPE_UNSCHEDULED
@ EM_QUEUE_TYPE_UNSCHEDULED
Definition: event_machine_hw_types.h:127
em_queue_current
em_queue_t em_queue_current(void)
Definition: event_machine_queue.c:302
EM_ERR_BAD_CONTEXT
@ EM_ERR_BAD_CONTEXT
Definition: event_machine_hw_types.h:269
EM_QUEUE_TYPE_UNDEF
@ EM_QUEUE_TYPE_UNDEF
Definition: event_machine_hw_types.h:107
em_queue_delete
em_status_t em_queue_delete(em_queue_t queue)
Definition: event_machine_queue.c:95
EM_ERR_NOT_FREE
@ EM_ERR_NOT_FREE
Definition: event_machine_hw_types.h:276
em_queue_get_group
em_queue_group_t em_queue_get_group(em_queue_t queue)
Definition: event_machine_queue.c:215
RETURN_ERROR_IF
#define RETURN_ERROR_IF(cond, error, escope, fmt,...)
Definition: em_error.h:50
em_queue_get_max_num
int em_queue_get_max_num(void)
Definition: event_machine_queue.c:397
queue_elem_t::context
void * context
Definition: em_queue_types.h:231
EM_ERR_BAD_ID
@ EM_ERR_BAD_ID
Definition: event_machine_hw_types.h:265
INTERNAL_ERROR
#define INTERNAL_ERROR(error, escope, fmt,...)
Definition: em_error.h:43
queue_tbl_t
Definition: em_queue_types.h:271
queue_delete
em_status_t queue_delete(queue_elem_t *const queue_elem)
Definition: em_queue.c:652
em_queue_get_name
size_t em_queue_get_name(em_queue_t queue, char *name, size_t maxlen)
Definition: event_machine_queue.c:145
queue_create
em_queue_t queue_create(const char *name, em_queue_type_t type, em_queue_prio_t prio, em_queue_group_t queue_group, em_queue_t queue_req, em_atomic_group_t atomic_group, const em_queue_conf_t *conf, const char **err_str)
Definition: em_queue.c:592
em_status_t
uint32_t em_status_t
Definition: event_machine_types.h:321
PRI_QUEUE
#define PRI_QUEUE
Definition: event_machine_types.h:109
EM_CHECK_LEVEL
#define EM_CHECK_LEVEL
Definition: event_machine_config.h:253
queue_elem_t::priority
uint8_t priority
Definition: em_queue_types.h:213
EM_ATOMIC_GROUP_UNDEF
#define EM_ATOMIC_GROUP_UNDEF
Definition: event_machine_types.h:156
em_shm
em_shm_t * em_shm
Definition: event_machine_init.c:41
EM_QUEUE_UNDEF
#define EM_QUEUE_UNDEF
Definition: event_machine_types.h:107
em_queue_set_context
em_status_t em_queue_set_context(em_queue_t queue, const void *context)
Definition: event_machine_queue.c:112
em_include.h
em_queue_to_u32
uint32_t em_queue_to_u32(em_queue_t queue)
Definition: event_machine_queue.c:433
em_queue_get_qid
uint16_t em_queue_get_qid(em_queue_t queue)
Definition: event_machine_queue.c:409
em_queue_get_context
void * em_queue_get_context(em_queue_t queue)
Definition: event_machine_queue.c:126
em_queue_get_type
em_queue_type_t em_queue_get_type(em_queue_t queue)
Definition: event_machine_queue.c:201
EM_ERR_BAD_POINTER
@ EM_ERR_BAD_POINTER
Definition: event_machine_hw_types.h:271
environment.h
em_queue_prio_t
uint32_t em_queue_prio_t
Definition: event_machine_types.h:186
em_queue_handle_raw
em_queue_t em_queue_handle_raw(uint16_t device_id, uint16_t qid)
Definition: event_machine_queue.c:426
EM_ERR_BAD_ARG
@ EM_ERR_BAD_ARG
Definition: event_machine_hw_types.h:261
em_queue_get_next
em_queue_t em_queue_get_next(void)
Definition: event_machine_queue.c:333
ENV_LOCAL
#define ENV_LOCAL
Definition: environment.h:57
em_queue_get_device_id
uint16_t em_queue_get_device_id(em_queue_t queue)
Definition: event_machine_queue.c:402
internal_queue_t
Definition: em_queue_types.h:98
em_queue_create_static
em_status_t em_queue_create_static(const char *name, em_queue_type_t type, em_queue_prio_t prio, em_queue_group_t queue_group, em_queue_t queue, const em_queue_conf_t *conf)
Definition: event_machine_queue.c:58
queue_elem_t
Definition: em_queue_types.h:180
em_queue_get_num_prio
int em_queue_get_num_prio(int *num_runtime)
Definition: event_machine_queue.c:383
em_queue_find
em_queue_t em_queue_find(const char *name)
Definition: event_machine_queue.c:169