EM-ODP  3.7.0
Event Machine on ODP
event_hdr Struct Reference

#include <em_event_types.h>

Collaboration diagram for event_hdr:

Public Member Functions

void *end[0] ODP_ALIGNED (8)
 

Data Fields

evstate_cnt_t state_cnt
 
ev_hdr_state_t state
 
union {
   uint8_t   all
 
   struct {
      uint8_t   refs_used: 1
 
      uint8_t   tmo_type: 2
 
      uint8_t   unused: 5
 
   } 
 
flags
 
uint8_t align_offset
 
em_event_type_t event_type
 
em_event_t event
 
uint32_t event_size
 
int32_t egrp_gen
 
em_event_group_t egrp
 
em_tmo_t tmo
 
ev_hdr_user_area_t user_area
 
uint8_t end_hdr_data [0]
 

Detailed Description

Event header

SW & I/O originated events.

Definition at line 184 of file em_event_types.h.

Field Documentation

◆ align_offset

uint8_t event_hdr::align_offset

Payload alloc alignment offset. Value is copied from pool_elem->align_offset for easy access.

Definition at line 236 of file em_event_types.h.

◆ egrp

em_event_group_t event_hdr::egrp

Event Group handle (cannot be used by event references)

Definition at line 265 of file em_event_types.h.

◆ egrp_gen

int32_t event_hdr::egrp_gen

Event group generation

Definition at line 260 of file em_event_types.h.

◆ end_hdr_data

uint8_t event_hdr::end_hdr_data[0]

End of event header data, for offsetof(event_hdr_t, end_hdr_data)

Definition at line 283 of file em_event_types.h.

◆ event

em_event_t event_hdr::event

Event handle (this event)

Definition at line 246 of file em_event_types.h.

◆ event_size

uint32_t event_hdr::event_size

Event size

buf: current size pkt & vec: original alloc size (otherwise not used, odp size used) periodic ring timer tmo (EM_EVENT_TYPE_TIMER_IND): 0

Definition at line 255 of file em_event_types.h.

◆ event_type

em_event_type_t event_hdr::event_type

Event type, contains major and minor parts

Definition at line 241 of file em_event_types.h.

◆ flags

union { ... } event_hdr::flags

Event flags

◆ refs_used

uint8_t event_hdr::refs_used

Indicate that this event has (or had) references and some of the ESV checks must be omitted (evgen). Will be set for the whole lifetime of the event.

Definition at line 220 of file em_event_types.h.

◆ state

ev_hdr_state_t event_hdr::state

Event State Verification (ESV) state.

Event state, updated on valid state transitions. "Best effort" update, i.e. atomic update not guaranteed in invalid simultaneous state-updates.

Contains the previously known good state and will be printed when detecting an invalid state transition.

Definition at line 207 of file em_event_types.h.

◆ state_cnt

evstate_cnt_t event_hdr::state_cnt

Event State Verification (ESV) counters.

Together the evstate_cnt_t counters (evgen, ref_cnt and send_cnt) can be used to detect invalid states and operations on the event, e.g.: double-free, double-send, send-after-free, free-after-send, usage-after-output, usage-after-timer-tmo-set/ack/cancel/delete etc.

Definition at line 195 of file em_event_types.h.

◆ tmo

em_tmo_t event_hdr::tmo

Holds the tmo handle in case event is used as timeout indication. Only valid if flags.tmo_type is not EM_TMO_TYPE_NONE (0). Initialized only when used as timeout indication by timer code.

Definition at line 272 of file em_event_types.h.

◆ tmo_type

uint8_t event_hdr::tmo_type

Indicate that this event is used as tmo indication. See em_tmo_type_t. Initially 0 = EM_TMO_TYPE_NONE

Definition at line 225 of file em_event_types.h.

◆ unused

uint8_t event_hdr::unused

currently unused bits

Definition at line 228 of file em_event_types.h.

◆ user_area

ev_hdr_user_area_t event_hdr::user_area

Event User Area metadata

Definition at line 277 of file em_event_types.h.


The documentation for this struct was generated from the following file: