EM-ODP
3.7.0
Event Machine on ODP
event_machine_types.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012, Nokia Siemens Networks
3
* Copyright (c) 2014, Nokia Solutions and Networks
4
* All rights reserved.
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions
8
* are met:
9
*
10
* * Redistributions of source code must retain the above copyright
11
* notice, this list of conditions and the following disclaimer.
12
* * Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in the
14
* documentation and/or other materials provided with the distribution.
15
* * Neither the name of the copyright holder nor the names of its
16
* contributors may be used to endorse or promote products derived
17
* from this software without specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
*/
31
32
#ifndef EVENT_MACHINE_TYPES_H_
33
#define EVENT_MACHINE_TYPES_H_
34
35
#pragma GCC visibility push(default)
36
37
/**
38
* @file
39
*
40
* Event Machine basic types
41
*/
42
43
#ifdef __cplusplus
44
extern
"C"
{
45
#endif
46
47
#include <inttypes.h>
48
#include <stdarg.h>
49
#include <stddef.h>
50
#include <stdbool.h>
51
52
/** EM boolean values. */
53
#define EM_TRUE 1
/**< True */
54
#define EM_FALSE 0
/**< False */
55
56
/**
57
* @typedef em_event_t
58
* Event handle
59
*/
60
EM_HANDLE_T
(em_event_t);
61
/** Undefined event */
62
#define EM_EVENT_UNDEF EM_STATIC_CAST(em_event_t, EM_HDL_UNDEF)
63
/** em_event_t printf format */
64
#define PRI_EVENT PRI_HDL
65
66
/**
67
* @typedef em_event_type_t
68
* Event type
69
*
70
* The event type is given to the EO-receive function for each received event
71
* and is also needed for event allocation. This type is an integer that is
72
* split into major and minor parts:
73
* 1) the major-field categorizes the event and
74
* 2) the minor is a more detailed system specific description.
75
* The major-part will not change by HW, but the minor-part can be
76
* HW/SW platform specific and thus could be split into more sub-fields as
77
* needed. The application should use the access functions for reading major
78
* and minor parts.
79
*
80
* The only event type with defined content is EM_EVENT_TYPE_SW with
81
* minor type 0, which needs to be portable (direct pointer to data).
82
*
83
* @see em_event_type_major(), em_event_type_minor(), em_receive_func_t()
84
*/
85
typedef
uint32_t
em_event_type_t
;
86
87
/**
88
* @typedef em_eo_t
89
* Execution Object handle
90
*
91
* @see em_eo_create()
92
*/
93
EM_HANDLE_T
(em_eo_t);
94
/** Undefined EO */
95
#define EM_EO_UNDEF EM_STATIC_CAST(em_eo_t, EM_HDL_UNDEF)
96
/** em_eo_t printf format */
97
#define PRI_EO PRI_HDL
98
99
/**
100
* @typedef em_queue_t
101
* Queue handle
102
*
103
* @see em_queue_create(), em_receive_func_t(), em_send()
104
*/
105
EM_HANDLE_T
(em_queue_t);
106
/** Undefined queue */
107
#define EM_QUEUE_UNDEF EM_STATIC_CAST(em_queue_t, EM_HDL_UNDEF)
108
/** em_queue_t printf format */
109
#define PRI_QUEUE PRI_HDL
110
111
/**
112
* @typedef em_queue_group_t
113
* Queue Group handle
114
*
115
* Each queue belongs to one queue group that defines a core mask for
116
* scheduling events, i.e. defines which cores participate in load balancing.
117
* A queue group can also allow only a single core for no load balancing.
118
*
119
* Queue groups need to be created as needed. One default queue group, i.e.
120
* EM_QUEUE_GROUP_DEFAULT, always exists, and that allows scheduling to all the
121
* EM cores running this execution binary instance.
122
*
123
* @see em_queue_group_create()
124
*/
125
EM_HANDLE_T
(em_queue_group_t);
126
/** Undefined queue group */
127
#define EM_QUEUE_GROUP_UNDEF EM_STATIC_CAST(em_queue_group_t, EM_HDL_UNDEF)
128
/** em_queue_group_t printf format */
129
#define PRI_QGRP PRI_HDL
130
131
/**
132
* @typedef em_event_group_t
133
* Event Group handle
134
*
135
* This is used for fork-join event handling.
136
*
137
* @see em_event_group_create()
138
*/
139
EM_HANDLE_T
(em_event_group_t);
140
/** Undefined event group */
141
#define EM_EVENT_GROUP_UNDEF EM_STATIC_CAST(em_event_group_t, EM_HDL_UNDEF)
142
/** em_event_group_t printf format */
143
#define PRI_EGRP PRI_HDL
144
145
/**
146
* @typedef em_atomic_group_t
147
* Atomic Group handle
148
*
149
* This is used to combine multiple atomic queues into one
150
* atomically scheduled group.
151
*
152
* @see em_atomic_group_create()
153
*/
154
EM_HANDLE_T
(em_atomic_group_t);
155
/** Undefined atomic group */
156
#define EM_ATOMIC_GROUP_UNDEF EM_STATIC_CAST(em_atomic_group_t, EM_HDL_UNDEF)
157
/** em_atomic_group_t printf format */
158
#define PRI_AGRP PRI_HDL
159
160
/**
161
* @typedef em_queue_type_t
162
* Queue type.
163
*
164
* Affects the scheduling principle
165
*
166
* @see em_queue_create(), event_machine_hw_config.h
167
*/
168
typedef
uint32_t
em_queue_type_t
;
169
#define PRI_QTYPE PRIu32
170
171
/**
172
* @typedef em_queue_prio_t
173
* Queue priority
174
*
175
* Queue priority defines implementation specific QoS class for event
176
* scheduling. Priority is an integer in range 0 (lowest) to num priorities - 1.
177
* Note, that the exact scheduling rules are not defined by EM and all available
178
* priorities may not be relative to the adjacent one (e.g. using dynamic
179
* priority, rate limiting or other more complex scheduling discipline).
180
* There are 5 generic predefined values (em_queue_prio_e) mapped to available
181
* runtime priorities for portability.
182
*
183
* @see em_queue_create(), em_queue_get_num_prio(), event_machine_hw_config.h,
184
* em_queue_prio_e
185
*/
186
typedef
uint32_t
em_queue_prio_t
;
187
#define PRI_QPRIO PRIu32
188
189
/**
190
* Type for queue flags.
191
*
192
* This is an unsigned integer with defined flags, that can be combined by
193
* bitwise 'OR' only. EM_QUEUE_FLAG_DEFAULT can be used in most cases.
194
* Unused bits must be set to zero. The actual values are system specific, but
195
* the implementation need to define at least: EM_QUEUE_FLAG_DEFAULT,
196
* EM_QUEUE_FLAG_BLOCKING, EM_QUEUE_FLAG_NONBLOCKING_LF and
197
* EM_QUEUE_FLAG_NONBLOCKING_WF even if those would not be supported.
198
**/
199
typedef
uint32_t
em_queue_flag_t
;
200
/**
201
* @def EM_QUEUE_FLAG_MASK
202
* The low 16 bits are reserved for EM, the upper bits are free
203
* for system-specific use.
204
*/
205
#define EM_QUEUE_FLAG_MASK 0x0000FFFF
206
207
/**
208
* Queue configuration data for queue-create APIs. The use of this conf is
209
* optional, but provides a standard way to pass extra parameters or specify
210
* extra requirements.
211
**/
212
typedef
struct
{
213
/**
214
* Extra flags. See em_queue_flag_t for choices.
215
* EM_QUEUE_FLAG_DEFAULT is defined by all systems and indicates a
216
* default multithread-safe queue without any special guarantees.
217
**/
218
em_queue_flag_t
flags
;
219
/**
220
* Request for a minimum amount of events the queue can hold or use
221
* 0 for EM default value. Queue creation will fail, if the system
222
* cannot support the requested amount.
223
**/
224
unsigned
int
min_events
;
225
/**
226
* Size of the data passed via 'conf'. 'conf' is ignored,
227
* if 'conf_len' is 0.
228
**/
229
size_t
conf_len
;
230
/**
231
* Extra queue configuration data. This can also work
232
* as a placeholder for directly attached extra data.
233
**/
234
void
*
conf
;
235
}
em_queue_conf_t
;
236
237
/**
238
* EO configuration data via em_eo_start. The use of this is
239
* optional, but provides a standard way to pass data to EO start.
240
* EM does not dereference any of the fields here.
241
**/
242
typedef
struct
{
243
/** Size of the data passed via conf pointer */
244
size_t
conf_len
;
245
/** Application specific configuration data */
246
void
*
conf
;
247
}
em_eo_conf_t
;
248
249
/**
250
* Notification
251
*
252
* A notification structure allows the user to define a notification event and
253
* a destination queue with an optional event group. EM will notify the user by
254
* sending the event into the given queue.
255
*
256
* The egroup-field defines an optional event group for this notification.
257
* The used event group has to exist and be initialized. Use value
258
* EM_EVENT_GROUP_UNDEF for normal operation (API 1.0 functionality), i.e.
259
* notification is not sent to a group.
260
* egroup should not be the originating group, i.e. should not be sent
261
* back to the group.
262
*
263
* @attention API 1.0 code using notifications may need to be modified
264
* as the new field need to be initialized. Value EM_EVENT_GROUP_UNDEF
265
* is the correct value to use for non-group notification but value 0
266
* is an alias, e.g. it is safe to initialize the structure with memset(0,..).
267
*/
268
typedef
struct
{
269
em_event_t
event
;
/**< User defined notification event */
270
em_queue_t
queue
;
/**< Destination queue */
271
em_event_group_t
egroup
;
/**< Event group for this event */
272
}
em_notif_t
;
273
274
/**
275
* Scheduling context types
276
*/
277
typedef
enum
{
278
/**
279
* Parallel or released context
280
*/
281
EM_SCHED_CONTEXT_TYPE_NONE
= 0,
282
/**
283
* Atomic context
284
*/
285
EM_SCHED_CONTEXT_TYPE_ATOMIC
= 1,
286
/**
287
* Ordered context
288
*/
289
EM_SCHED_CONTEXT_TYPE_ORDERED
= 2
290
}
em_sched_context_type_t
;
291
292
/**
293
* EO running state. Event dispatching is only enabled in running state.
294
**/
295
typedef
enum
{
296
/** Undefined */
297
EM_EO_STATE_UNDEF
= 0,
298
/** Initial state after creation */
299
EM_EO_STATE_CREATED
= 1,
300
/** start called, not completed */
301
EM_EO_STATE_STARTING
= 2,
302
/** running, event dispatching enabled */
303
EM_EO_STATE_RUNNING
= 3,
304
/** stop called, not completed. Next state EM_EO_STATE_CREATED */
305
EM_EO_STATE_STOPPING
= 4,
306
/** exceptional state, only delete allowed */
307
EM_EO_STATE_ERROR
= 5
308
}
em_eo_state_t
;
309
310
/**
311
* @typedef em_status_t
312
* Error/Status code.
313
*
314
* EM_OK (0) is the general code for success, other values
315
* describe failed operation.
316
* There is a generic error code EM_ERROR, but application should
317
* normally test for not equal to EM_OK.
318
*
319
* @see event_machine_hw_config.h, em_error_handler_t(), em_error()
320
*/
321
typedef
uint32_t
em_status_t
;
322
#define PRI_STAT PRIu32
323
#define PRIxSTAT PRIx32
324
325
/**
326
* @def EM_OK
327
* Operation successful
328
*/
329
#define EM_OK 0
330
331
/**
332
* @def EM_ERROR
333
* Operation not successful.
334
*
335
* Generic error code, other error codes are system specific.
336
*/
337
#define EM_ERROR 0xffffffff
338
339
/**
340
* @typedef em_escope_t
341
* Error scope.
342
*
343
* Identifies the error scope for interpreting error codes and variable
344
* arguments.
345
*
346
* @see em_error_handler_t(), em_error()
347
*/
348
typedef
uint32_t
em_escope_t
;
349
#define PRI_ESCOPE PRIu32
350
#define PRIxESCOPE PRIx32
351
352
/**
353
* @def EM_ESCOPE_BIT
354
* All EM internal error scopes should have bit 31 set
355
*
356
* NOTE: High bit is RESERVED for EM internal escopes and should not be
357
* used by the application.
358
*/
359
#define EM_ESCOPE_BIT (0x80000000u)
360
361
/**
362
* @def EM_ESCOPE
363
* Test if the error scope identifies an EM function (API or other internal)
364
*/
365
#define EM_ESCOPE(escope) (EM_ESCOPE_BIT & (escope))
366
367
/**
368
* @def EM_ESCOPE_MASK
369
* Mask selects the high byte of the 32-bit escope
370
*/
371
#define EM_ESCOPE_MASK (0xFF000000)
372
373
/**
374
* @def EM_ESCOPE_API_TYPE
375
* EM API functions error scope
376
*/
377
#define EM_ESCOPE_API_TYPE (0xFFu)
378
379
/**
380
* @def EM_ESCOPE_API_MASK
381
* EM API functions error mask
382
*/
383
#define EM_ESCOPE_API_MASK (EM_ESCOPE_BIT | (EM_ESCOPE_API_TYPE << 24))
384
385
/**
386
* @def EM_ESCOPE_API
387
* Test if the error scope identifies an EM API function
388
*/
389
#define EM_ESCOPE_API(escope) (((escope) & EM_ESCOPE_MASK) == \
390
EM_ESCOPE_API_MASK)
391
392
/*
393
* EM API functions error scopes:
394
*/
395
396
/* EM API escopes: Atomic Group */
397
#define EM_ESCOPE_ATOMIC_GROUP_CREATE (EM_ESCOPE_API_MASK | 0x0001)
398
#define EM_ESCOPE_ATOMIC_GROUP_DELETE (EM_ESCOPE_API_MASK | 0x0002)
399
#define EM_ESCOPE_QUEUE_CREATE_AG (EM_ESCOPE_API_MASK | 0x0003)
400
#define EM_ESCOPE_QUEUE_CREATE_STATIC_AG (EM_ESCOPE_API_MASK | 0x0004)
401
#define EM_ESCOPE_ATOMIC_GROUP_GET (EM_ESCOPE_API_MASK | 0x0005)
402
#define EM_ESCOPE_ATOMIC_GROUP_GET_NAME (EM_ESCOPE_API_MASK | 0x0006)
403
#define EM_ESCOPE_ATOMIC_GROUP_FIND (EM_ESCOPE_API_MASK | 0x0007)
404
#define EM_ESCOPE_ATOMIC_GROUP_GET_FIRST (EM_ESCOPE_API_MASK | 0x0008)
405
#define EM_ESCOPE_ATOMIC_GROUP_GET_NEXT (EM_ESCOPE_API_MASK | 0x0009)
406
#define EM_ESCOPE_ATOMIC_GROUP_QUEUE_GET_FIRST (EM_ESCOPE_API_MASK | 0x000A)
407
#define EM_ESCOPE_ATOMIC_GROUP_QUEUE_GET_NEXT (EM_ESCOPE_API_MASK | 0x000B)
408
409
/* EM API escopes: Core */
410
#define EM_ESCOPE_CORE_ID (EM_ESCOPE_API_MASK | 0x0101)
411
#define EM_ESCOPE_CORE_COUNT (EM_ESCOPE_API_MASK | 0x0102)
412
413
/* EM API escopes: Dispatcher */
414
#define EM_ESCOPE_DISPATCH (EM_ESCOPE_API_MASK | 0x0201)
415
#define EM_ESCOPE_DISPATCH_OPT_INIT (EM_ESCOPE_API_MASK | 0x0202)
416
#define EM_ESCOPE_DISPATCH_DURATION (EM_ESCOPE_API_MASK | 0x0203)
417
#define EM_ESCOPE_DISPATCH_NS (EM_ESCOPE_API_MASK | 0x0204)
418
#define EM_ESCOPE_DISPATCH_EVENTS (EM_ESCOPE_API_MASK | 0x0205)
419
#define EM_ESCOPE_DISPATCH_ROUNDS (EM_ESCOPE_API_MASK | 0x0206)
420
#define EM_ESCOPE_DISPATCH_REGISTER_ENTER_CB (EM_ESCOPE_API_MASK | 0x0207)
421
#define EM_ESCOPE_DISPATCH_UNREGISTER_ENTER_CB (EM_ESCOPE_API_MASK | 0x0208)
422
#define EM_ESCOPE_DISPATCH_REGISTER_EXIT_CB (EM_ESCOPE_API_MASK | 0x0209)
423
#define EM_ESCOPE_DISPATCH_UNREGISTER_EXIT_CB (EM_ESCOPE_API_MASK | 0x020A)
424
425
/* EM API escopes: EO */
426
#define EM_ESCOPE_EO_CREATE (EM_ESCOPE_API_MASK | 0x0301)
427
#define EM_ESCOPE_EO_CREATE_MULTIRCV (EM_ESCOPE_API_MASK | 0x0302)
428
#define EM_ESCOPE_EO_MULTIRCV_PARAM_INIT (EM_ESCOPE_API_MASK | 0x0303)
429
#define EM_ESCOPE_EO_DELETE (EM_ESCOPE_API_MASK | 0x0304)
430
#define EM_ESCOPE_EO_GET_NAME (EM_ESCOPE_API_MASK | 0x0305)
431
#define EM_ESCOPE_EO_FIND (EM_ESCOPE_API_MASK | 0x0306)
432
#define EM_ESCOPE_EO_ADD_QUEUE (EM_ESCOPE_API_MASK | 0x0307)
433
#define EM_ESCOPE_EO_ADD_QUEUE_SYNC (EM_ESCOPE_API_MASK | 0x0308)
434
#define EM_ESCOPE_EO_REMOVE_QUEUE (EM_ESCOPE_API_MASK | 0x0309)
435
#define EM_ESCOPE_EO_REMOVE_QUEUE_SYNC (EM_ESCOPE_API_MASK | 0x030A)
436
#define EM_ESCOPE_EO_REMOVE_QUEUE_ALL (EM_ESCOPE_API_MASK | 0x030B)
437
#define EM_ESCOPE_EO_REMOVE_QUEUE_ALL_SYNC (EM_ESCOPE_API_MASK | 0x030C)
438
#define EM_ESCOPE_EO_REGISTER_ERROR_HANDLER (EM_ESCOPE_API_MASK | 0x030D)
439
#define EM_ESCOPE_EO_UNREGISTER_ERROR_HANDLER (EM_ESCOPE_API_MASK | 0x030E)
440
#define EM_ESCOPE_EO_START (EM_ESCOPE_API_MASK | 0x030F)
441
#define EM_ESCOPE_EO_START_SYNC (EM_ESCOPE_API_MASK | 0x0310)
442
#define EM_ESCOPE_EO_STOP (EM_ESCOPE_API_MASK | 0x0311)
443
#define EM_ESCOPE_EO_STOP_SYNC (EM_ESCOPE_API_MASK | 0x0312)
444
#define EM_ESCOPE_EO_CURRENT (EM_ESCOPE_API_MASK | 0x0313)
445
#define EM_ESCOPE_EO_GET_CONTEXT (EM_ESCOPE_API_MASK | 0x0314)
446
#define EM_ESCOPE_EO_GET_FIRST (EM_ESCOPE_API_MASK | 0x0315)
447
#define EM_ESCOPE_EO_GET_NEXT (EM_ESCOPE_API_MASK | 0x0316)
448
#define EM_ESCOPE_EO_GET_STATE (EM_ESCOPE_API_MASK | 0x0317)
449
#define EM_ESCOPE_EO_QUEUE_GET_FIRST (EM_ESCOPE_API_MASK | 0x0318)
450
#define EM_ESCOPE_EO_QUEUE_GET_NEXT (EM_ESCOPE_API_MASK | 0x0319)
451
452
/* EM API escopes: Error */
453
#define EM_ESCOPE_REGISTER_ERROR_HANDLER (EM_ESCOPE_API_MASK | 0x0401)
454
#define EM_ESCOPE_UNREGISTER_ERROR_HANDLER (EM_ESCOPE_API_MASK | 0x0402)
455
#define EM_ESCOPE_ERROR (EM_ESCOPE_API_MASK | 0x0403)
456
457
/* EM API escopes: Event Group */
458
#define EM_ESCOPE_EVENT_GROUP_CREATE (EM_ESCOPE_API_MASK | 0x0501)
459
#define EM_ESCOPE_EVENT_GROUP_DELETE (EM_ESCOPE_API_MASK | 0x0502)
460
#define EM_ESCOPE_EVENT_GROUP_APPLY (EM_ESCOPE_API_MASK | 0x0503)
461
#define EM_ESCOPE_EVENT_GROUP_INCREMENT (EM_ESCOPE_API_MASK | 0x0504)
462
#define EM_ESCOPE_EVENT_GROUP_CURRENT (EM_ESCOPE_API_MASK | 0x0505)
463
#define EM_ESCOPE_EVENT_GROUP_IS_READY (EM_ESCOPE_API_MASK | 0x0506)
464
#define EM_ESCOPE_SEND_GROUP (EM_ESCOPE_API_MASK | 0x0507)
465
#define EM_ESCOPE_SEND_GROUP_MULTI (EM_ESCOPE_API_MASK | 0x0508)
466
#define EM_ESCOPE_EVENT_GROUP_PROCESSING_END (EM_ESCOPE_API_MASK | 0x0509)
467
#define EM_ESCOPE_EVENT_GROUP_ASSIGN (EM_ESCOPE_API_MASK | 0x050A)
468
#define EM_ESCOPE_EVENT_GROUP_ABORT (EM_ESCOPE_API_MASK | 0x050B)
469
#define EM_ESCOPE_EVENT_GROUP_GET_NOTIF (EM_ESCOPE_API_MASK | 0x050C)
470
#define EM_ESCOPE_EVENT_GROUP_GET_FIRST (EM_ESCOPE_API_MASK | 0x050D)
471
#define EM_ESCOPE_EVENT_GROUP_GET_NEXT (EM_ESCOPE_API_MASK | 0x050E)
472
473
/* EM API escopes: Event */
474
#define EM_ESCOPE_ALLOC (EM_ESCOPE_API_MASK | 0x0601)
475
#define EM_ESCOPE_ALLOC_MULTI (EM_ESCOPE_API_MASK | 0x0602)
476
#define EM_ESCOPE_FREE (EM_ESCOPE_API_MASK | 0x0603)
477
#define EM_ESCOPE_FREE_MULTI (EM_ESCOPE_API_MASK | 0x0604)
478
#define EM_ESCOPE_SEND (EM_ESCOPE_API_MASK | 0x0605)
479
#define EM_ESCOPE_SEND_MULTI (EM_ESCOPE_API_MASK | 0x0606)
480
#define EM_ESCOPE_EVENT_POINTER (EM_ESCOPE_API_MASK | 0x0607)
481
#define EM_ESCOPE_EVENT_POINTER_AND_SIZE (EM_ESCOPE_API_MASK | 0x0608)
482
#define EM_ESCOPE_EVENT_GET_SIZE (EM_ESCOPE_API_MASK | 0x0609)
483
#define EM_ESCOPE_EVENT_GET_POOL (EM_ESCOPE_API_MASK | 0x060A)
484
#define EM_ESCOPE_EVENT_GET_POOL_SUBPOOL (EM_ESCOPE_API_MASK | 0x060B)
485
#define EM_ESCOPE_EVENT_SET_TYPE (EM_ESCOPE_API_MASK | 0x060C)
486
#define EM_ESCOPE_EVENT_GET_TYPE (EM_ESCOPE_API_MASK | 0x060D)
487
#define EM_ESCOPE_EVENT_GET_TYPE_MULTI (EM_ESCOPE_API_MASK | 0x060E)
488
#define EM_ESCOPE_EVENT_SAME_TYPE_MULTI (EM_ESCOPE_API_MASK | 0x060F)
489
#define EM_ESCOPE_EVENT_MARK_SEND (EM_ESCOPE_API_MASK | 0x0610)
490
#define EM_ESCOPE_EVENT_UNMARK_SEND (EM_ESCOPE_API_MASK | 0x0611)
491
#define EM_ESCOPE_EVENT_MARK_FREE (EM_ESCOPE_API_MASK | 0x0612)
492
#define EM_ESCOPE_EVENT_UNMARK_FREE (EM_ESCOPE_API_MASK | 0x0613)
493
#define EM_ESCOPE_EVENT_MARK_FREE_MULTI (EM_ESCOPE_API_MASK | 0x0614)
494
#define EM_ESCOPE_EVENT_UNMARK_FREE_MULTI (EM_ESCOPE_API_MASK | 0x0615)
495
#define EM_ESCOPE_EVENT_CLONE (EM_ESCOPE_API_MASK | 0x0616)
496
#define EM_ESCOPE_EVENT_CLONE_PART (EM_ESCOPE_API_MASK | 0x0617)
497
#define EM_ESCOPE_EVENT_UAREA_GET (EM_ESCOPE_API_MASK | 0x0618)
498
#define EM_ESCOPE_EVENT_UAREA_ID_GET (EM_ESCOPE_API_MASK | 0x0619)
499
#define EM_ESCOPE_EVENT_UAREA_ID_SET (EM_ESCOPE_API_MASK | 0x061A)
500
#define EM_ESCOPE_EVENT_UAREA_INFO (EM_ESCOPE_API_MASK | 0x061B)
501
#define EM_ESCOPE_EVENT_REF (EM_ESCOPE_API_MASK | 0x061C)
502
#define EM_ESCOPE_EVENT_HAS_REF (EM_ESCOPE_API_MASK | 0x061D)
503
#define EM_ESCOPE_EVENT_VECTOR_FREE (EM_ESCOPE_API_MASK | 0x061E)
504
#define EM_ESCOPE_EVENT_VECTOR_TBL (EM_ESCOPE_API_MASK | 0x061F)
505
#define EM_ESCOPE_EVENT_VECTOR_SIZE (EM_ESCOPE_API_MASK | 0x0620)
506
#define EM_ESCOPE_EVENT_VECTOR_SIZE_SET (EM_ESCOPE_API_MASK | 0x0621)
507
#define EM_ESCOPE_EVENT_VECTOR_MAX_SIZE (EM_ESCOPE_API_MASK | 0x0622)
508
#define EM_ESCOPE_EVENT_VECTOR_INFO (EM_ESCOPE_API_MASK | 0x0623)
509
510
/* EM API escopes: Event Packet */
511
#define EM_ESCOPE_PACKET_POINTER (EM_ESCOPE_API_MASK | 0x0701)
512
#define EM_ESCOPE_PACKET_SIZE (EM_ESCOPE_API_MASK | 0x0702)
513
#define EM_ESCOPE_PACKET_POINTER_AND_SIZE (EM_ESCOPE_API_MASK | 0x0703)
514
#define EM_ESCOPE_PACKET_RESIZE (EM_ESCOPE_API_MASK | 0x0704)
515
#define EM_ESCOPE_PACKET_HEADROOM (EM_ESCOPE_API_MASK | 0x0705)
516
#define EM_ESCOPE_PACKET_TAILROOM (EM_ESCOPE_API_MASK | 0x0706)
517
#define EM_ESCOPE_PACKET_PUSH_HEAD (EM_ESCOPE_API_MASK | 0x0707)
518
#define EM_ESCOPE_PACKET_PULL_HEAD (EM_ESCOPE_API_MASK | 0x0708)
519
#define EM_ESCOPE_PACKET_PUSH_TAIL (EM_ESCOPE_API_MASK | 0x0709)
520
#define EM_ESCOPE_PACKET_PULL_TAIL (EM_ESCOPE_API_MASK | 0x070A)
521
#define EM_ESCOPE_PACKET_RESET (EM_ESCOPE_API_MASK | 0x070B)
522
523
/* EM API escopes: Queue Group */
524
#define EM_ESCOPE_QUEUE_GROUP_CREATE (EM_ESCOPE_API_MASK | 0x0801)
525
#define EM_ESCOPE_QUEUE_GROUP_CREATE_SYNC (EM_ESCOPE_API_MASK | 0x0802)
526
#define EM_ESCOPE_QUEUE_GROUP_DELETE (EM_ESCOPE_API_MASK | 0x0803)
527
#define EM_ESCOPE_QUEUE_GROUP_DELETE_SYNC (EM_ESCOPE_API_MASK | 0x0804)
528
#define EM_ESCOPE_QUEUE_GROUP_MODIFY (EM_ESCOPE_API_MASK | 0x0805)
529
#define EM_ESCOPE_QUEUE_GROUP_MODIFY_SYNC (EM_ESCOPE_API_MASK | 0x0806)
530
#define EM_ESCOPE_QUEUE_GROUP_FIND (EM_ESCOPE_API_MASK | 0x0807)
531
#define EM_ESCOPE_QUEUE_GROUP_MASK (EM_ESCOPE_API_MASK | 0x0808)
532
#define EM_ESCOPE_QUEUE_GROUP_GET_NAME (EM_ESCOPE_API_MASK | 0x0809)
533
#define EM_ESCOPE_QUEUE_GROUP_GET_FIRST (EM_ESCOPE_API_MASK | 0x080A)
534
#define EM_ESCOPE_QUEUE_GROUP_GET_NEXT (EM_ESCOPE_API_MASK | 0x080B)
535
#define EM_ESCOPE_QUEUE_GROUP_QUEUE_GET_FIRST (EM_ESCOPE_API_MASK | 0x080C)
536
#define EM_ESCOPE_QUEUE_GROUP_QUEUE_GET_NEXT (EM_ESCOPE_API_MASK | 0x080D)
537
538
/* EM API escopes: Queue */
539
#define EM_ESCOPE_QUEUE_CREATE (EM_ESCOPE_API_MASK | 0x0901)
540
#define EM_ESCOPE_QUEUE_CREATE_STATIC (EM_ESCOPE_API_MASK | 0x0902)
541
#define EM_ESCOPE_QUEUE_DELETE (EM_ESCOPE_API_MASK | 0x0903)
542
#define EM_ESCOPE_QUEUE_SET_CONTEXT (EM_ESCOPE_API_MASK | 0x0904)
543
#define EM_ESCOPE_QUEUE_GET_CONTEXT (EM_ESCOPE_API_MASK | 0x0905)
544
#define EM_ESCOPE_QUEUE_GET_NAME (EM_ESCOPE_API_MASK | 0x0906)
545
#define EM_ESCOPE_QUEUE_GET_PRIORITY (EM_ESCOPE_API_MASK | 0x0907)
546
#define EM_ESCOPE_QUEUE_GET_TYPE (EM_ESCOPE_API_MASK | 0x0908)
547
#define EM_ESCOPE_QUEUE_GET_GROUP (EM_ESCOPE_API_MASK | 0x0909)
548
#define EM_ESCOPE_QUEUE_FIND (EM_ESCOPE_API_MASK | 0x090A)
549
#define EM_ESCOPE_QUEUE_DEQUEUE (EM_ESCOPE_API_MASK | 0x090B)
550
#define EM_ESCOPE_QUEUE_DEQUEUE_MULTI (EM_ESCOPE_API_MASK | 0x090C)
551
#define EM_ESCOPE_QUEUE_CURRENT (EM_ESCOPE_API_MASK | 0x090D)
552
#define EM_ESCOPE_QUEUE_GET_FIRST (EM_ESCOPE_API_MASK | 0x090E)
553
#define EM_ESCOPE_QUEUE_GET_NEXT (EM_ESCOPE_API_MASK | 0x090F)
554
#define EM_ESCOPE_QUEUE_GET_INDEX (EM_ESCOPE_API_MASK | 0x0910)
555
#define EM_ESCOPE_QUEUE_GET_NUM_PRIO (EM_ESCOPE_API_MASK | 0x0911)
556
557
/* EM API escopes: Scheduler */
558
#define EM_ESCOPE_ATOMIC_PROCESSING_END (EM_ESCOPE_API_MASK | 0x0A01)
559
#define EM_ESCOPE_ORDERED_PROCESSING_END (EM_ESCOPE_API_MASK | 0x0A02)
560
#define EM_ESCOPE_PRESCHEDULE (EM_ESCOPE_API_MASK | 0x0A03)
561
#define EM_ESCOPE_SCHED_CONTEXT_TYPE_CURRENT (EM_ESCOPE_API_MASK | 0x0A04)
562
563
/* EM API escopes: Timer */
564
#define EM_ESCOPE_TIMER_CREATE (EM_ESCOPE_API_MASK | 0x0B00)
565
#define EM_ESCOPE_TIMER_DELETE (EM_ESCOPE_API_MASK | 0x0B01)
566
#define EM_ESCOPE_TIMER_CUR_TICK (EM_ESCOPE_API_MASK | 0x0B02)
567
#define EM_ESCOPE_TIMER_GET_ALL (EM_ESCOPE_API_MASK | 0x0B03)
568
#define EM_ESCOPE_TIMER_GET_ATTR (EM_ESCOPE_API_MASK | 0x0B04)
569
#define EM_ESCOPE_TIMER_GET_FREQ (EM_ESCOPE_API_MASK | 0x0B05)
570
#define EM_ESCOPE_TMO_CREATE (EM_ESCOPE_API_MASK | 0x0B06)
571
#define EM_ESCOPE_TMO_DELETE (EM_ESCOPE_API_MASK | 0x0B07)
572
#define EM_ESCOPE_TMO_SET_ABS (EM_ESCOPE_API_MASK | 0x0B08)
573
#define EM_ESCOPE_TMO_SET_REL (EM_ESCOPE_API_MASK | 0x0B09)
574
#define EM_ESCOPE_TMO_CANCEL (EM_ESCOPE_API_MASK | 0x0B0A)
575
#define EM_ESCOPE_TMO_ACK (EM_ESCOPE_API_MASK | 0x0B0B)
576
#define EM_ESCOPE_TMO_GET_STATE (EM_ESCOPE_API_MASK | 0x0B0C)
577
#define EM_ESCOPE_TMO_SET_PERIODIC (EM_ESCOPE_API_MASK | 0x0B0D)
578
#define EM_ESCOPE_TMO_GET_STATS (EM_ESCOPE_API_MASK | 0x0B0E)
579
#define EM_ESCOPE_TIMER_ATTR_INIT (EM_ESCOPE_API_MASK | 0x0B0F)
580
#define EM_ESCOPE_TIMER_CAPABILITY (EM_ESCOPE_API_MASK | 0x0B10)
581
#define EM_ESCOPE_TIMER_RES_CAPABILITY (EM_ESCOPE_API_MASK | 0x0B11)
582
#define EM_ESCOPE_TIMER_NS_TO_TICK (EM_ESCOPE_API_MASK | 0x0B12)
583
#define EM_ESCOPE_TIMER_TICK_TO_NS (EM_ESCOPE_API_MASK | 0x0B13)
584
#define EM_ESCOPE_TMO_GET_TYPE (EM_ESCOPE_API_MASK | 0x0B14)
585
#define EM_ESCOPE_TIMER_RING_CREATE (EM_ESCOPE_API_MASK | 0x0B15)
586
#define EM_ESCOPE_TMO_SET_PERIODIC_RING (EM_ESCOPE_API_MASK | 0x0B16)
587
#define EM_ESCOPE_TMO_GET_USERPTR (EM_ESCOPE_API_MASK | 0x0B17)
588
#define EM_ESCOPE_TMO_CREATE_ARG (EM_ESCOPE_API_MASK | 0x0B18)
589
#define EM_ESCOPE_TMO_GET_TIMER (EM_ESCOPE_API_MASK | 0x0B19)
590
591
/* add-on APIs have a separate escope file but define a base here */
592
#define EM_ESCOPE_ADD_ON_API_BASE (EM_ESCOPE_API_MASK | 0x1000)
593
594
#ifdef __cplusplus
595
}
596
#endif
597
598
#pragma GCC visibility pop
599
#endif
/* EVENT_MACHINE_TYPES_H_ */
EM_EO_STATE_CREATED
@ EM_EO_STATE_CREATED
Definition:
event_machine_types.h:299
EM_EO_STATE_STARTING
@ EM_EO_STATE_STARTING
Definition:
event_machine_types.h:301
EM_EO_STATE_RUNNING
@ EM_EO_STATE_RUNNING
Definition:
event_machine_types.h:303
em_queue_conf_t
Definition:
event_machine_types.h:212
em_notif_t::queue
em_queue_t queue
Definition:
event_machine_types.h:270
EM_EO_STATE_UNDEF
@ EM_EO_STATE_UNDEF
Definition:
event_machine_types.h:297
EM_EO_STATE_ERROR
@ EM_EO_STATE_ERROR
Definition:
event_machine_types.h:307
em_queue_type_t
uint32_t em_queue_type_t
Definition:
event_machine_types.h:168
em_eo_conf_t::conf_len
size_t conf_len
Definition:
event_machine_types.h:244
em_eo_conf_t::conf
void * conf
Definition:
event_machine_types.h:246
em_queue_conf_t::flags
em_queue_flag_t flags
Definition:
event_machine_types.h:218
em_queue_conf_t::conf_len
size_t conf_len
Definition:
event_machine_types.h:229
em_queue_conf_t::conf
void * conf
Definition:
event_machine_types.h:234
EM_EO_STATE_STOPPING
@ EM_EO_STATE_STOPPING
Definition:
event_machine_types.h:305
EM_SCHED_CONTEXT_TYPE_ATOMIC
@ EM_SCHED_CONTEXT_TYPE_ATOMIC
Definition:
event_machine_types.h:285
em_escope_t
uint32_t em_escope_t
Definition:
event_machine_types.h:348
em_status_t
uint32_t em_status_t
Definition:
event_machine_types.h:321
EM_SCHED_CONTEXT_TYPE_ORDERED
@ EM_SCHED_CONTEXT_TYPE_ORDERED
Definition:
event_machine_types.h:289
em_event_type_t
uint32_t em_event_type_t
Definition:
event_machine_types.h:85
EM_SCHED_CONTEXT_TYPE_NONE
@ EM_SCHED_CONTEXT_TYPE_NONE
Definition:
event_machine_types.h:281
em_notif_t
Definition:
event_machine_types.h:268
EM_HANDLE_T
EM_HANDLE_T(em_timer_t)
em_queue_conf_t::min_events
unsigned int min_events
Definition:
event_machine_types.h:224
em_queue_prio_t
uint32_t em_queue_prio_t
Definition:
event_machine_types.h:186
em_eo_state_t
em_eo_state_t
Definition:
event_machine_types.h:295
em_eo_conf_t
Definition:
event_machine_types.h:242
em_queue_flag_t
uint32_t em_queue_flag_t
Definition:
event_machine_types.h:199
em_notif_t::egroup
em_event_group_t egroup
Definition:
event_machine_types.h:271
em_notif_t::event
em_event_t event
Definition:
event_machine_types.h:269
em_sched_context_type_t
em_sched_context_type_t
Definition:
event_machine_types.h:277