EM-ODP 4.4.0
Event Machine on ODP
Loading...
Searching...
No Matches
em_queue_types.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <odp_api.h>
#include <event_machine.h>
#include <event_machine/platform/env/environment.h>
#include "misc/list.h"
#include "misc/objpool.h"
Include dependency graph for em_queue_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  internal_queue_t
 
struct  q_elem_atomic_group_
 
struct  q_elem_output_
 
struct  q_elem_aggr_parent_
 
struct  q_elem_aggr_
 
union  queue_elem_flags_
 
struct  queue_elem_t
 
struct  queue_tbl_t
 
struct  queue_pool_t
 
struct  local_queues_t
 
struct  output_queue_track_t
 

Macros

#define MAX_INTERNAL_QUEUES   (EM_MAX_CORES + EM_MAX_EXTTHRS + 1/*shared internal queue*/)
 
#define INTERNAL_QUEUE_PRIORITY   (EM_QUEUE_PRIO_HIGHEST)
 
#define QUEUE_ELEM_VALID   ((uint16_t)0xCAFE)
 
#define INVALID_QUEUE_ID   ((uint16_t)0xFFFF)
 

Typedefs

typedef struct eo_elem_t eo_elem_t
 
typedef enum queue_state queue_state_e
 
typedef uint8_t queue_state_t
 
typedef struct q_elem_atomic_group_ q_elem_atomic_group_t
 
typedef struct q_elem_output_ q_elem_output_t
 
typedef struct q_elem_aggr_parent_ q_elem_aggr_parent_t
 
typedef struct q_elem_aggr_ q_elem_aggr_t
 
typedef union queue_elem_flags_ queue_elem_flags_t
 
typedef struct queue_elem_t ENV_CACHE_LINE_ALIGNED
 
typedef struct queue_tbl_t queue_tbl_t
 
typedef struct queue_pool_t queue_pool_t
 
typedef struct local_queues_t local_queues_t
 
typedef struct output_queue_track_t output_queue_track_t
 

Enumerations

enum  queue_state {
  EM_QUEUE_STATE_INVALID = 0 , EM_QUEUE_STATE_INIT = 1 , EM_QUEUE_STATE_BIND = 2 , EM_QUEUE_STATE_READY = 3 ,
  EM_QUEUE_STATE_UNSCHEDULED = 255
}
 

Functions

 COMPILE_TIME_ASSERT (MAX_INTERNAL_QUEUES - 1 >=EM_MAX_CORES, TOO_FEW_INTERNAL_QUEUES_ERROR)
 
 COMPILE_TIME_ASSERT (sizeof(internal_queue_t)==sizeof(em_queue_t), INTERNAL_QUEUE_T_SIZE_ERROR)
 
 COMPILE_TIME_ASSERT (sizeof(queue_elem_t) % ENV_CACHE_LINE_SIZE==0, QUEUE_ELEM_T__SIZE_ERROR)
 
 COMPILE_TIME_ASSERT (sizeof(queue_elem_t)<=3 *ENV_CACHE_LINE_SIZE, QUEUE_ELEM_T__SIZE_TOO_LARGE)
 

Detailed Description

EM internal queue types & definitions

Definition in file em_queue_types.h.

Macro Definition Documentation

◆ INTERNAL_QUEUE_PRIORITY

#define INTERNAL_QUEUE_PRIORITY   (EM_QUEUE_PRIO_HIGHEST)

Definition at line 74 of file em_queue_types.h.

◆ INVALID_QUEUE_ID

#define INVALID_QUEUE_ID   ((uint16_t)0xFFFF)

Definition at line 78 of file em_queue_types.h.

◆ MAX_INTERNAL_QUEUES

#define MAX_INTERNAL_QUEUES   (EM_MAX_CORES + EM_MAX_EXTTHRS + 1/*shared internal queue*/)

Definition at line 69 of file em_queue_types.h.

◆ QUEUE_ELEM_VALID

#define QUEUE_ELEM_VALID   ((uint16_t)0xCAFE)

Definition at line 76 of file em_queue_types.h.

Typedef Documentation

◆ ENV_CACHE_LINE_ALIGNED

EM queue element

◆ eo_elem_t

typedef struct eo_elem_t eo_elem_t

Definition at line 62 of file em_queue_types.h.

◆ local_queues_t

Local queues, i.e. core-local storage for events to local queues

◆ output_queue_track_t

Track output-queues used during a dispatch round (burst)

◆ q_elem_aggr_parent_t

Parent queue aggregator data.

Stored in the parent (scheduled or unscheduled) queue element when the queue was created with child aggregator queues (em_queue_param_t::num_aggr).

◆ q_elem_aggr_t

typedef struct q_elem_aggr_ q_elem_aggr_t

Child aggregator queue data.

Stored in aggregator (EM_QUEUE_TYPE_AGGR) queue elements. Aggregator queues are never added to an EO or queue group, so this data shares space (union) with q_elem_atomic_group_t and q_elem_output_t.

◆ q_elem_atomic_group_t

Atomic-group queue specific part of the queue element

◆ q_elem_output_t

Output queue specific part of the queue element

◆ queue_elem_flags_t

Internal EM queue flags.

Contains per-queue boolean flags packed into a single byte, which describe aspects of the queue's nature and use. Intended for internal bookkeeping within EM.

◆ queue_pool_t

typedef struct queue_pool_t queue_pool_t

Pool of free queues

◆ queue_state_e

typedef enum queue_state queue_state_e

Queue state

◆ queue_state_t

typedef uint8_t queue_state_t

Queue state, packed into uint8_t.

The 'enum queue_state' or queue_state_e will always fit into an uint8_t. Save space in the queue_elem_t by using this instead.

Definition at line 144 of file em_queue_types.h.

◆ queue_tbl_t

typedef struct queue_tbl_t queue_tbl_t

EM queue element table

Enumeration Type Documentation

◆ queue_state

Queue state

Enumerator
EM_QUEUE_STATE_INVALID 

Invalid queue state, queue not created/allocated

EM_QUEUE_STATE_INIT 

Queue initialization, allocated and being set up

EM_QUEUE_STATE_BIND 

Queue added/bound to an EO, but EO-start not yet complete

EM_QUEUE_STATE_READY 

Queue ready, related EO started

Definition at line 117 of file em_queue_types.h.