core: introduce event subsystem
The patch introduces new event subsystem. This subsystem is designed to store user-defined triggers and has nothing in common with core triggers. Each trigger has its own name and is represented by func_adapter. Triggers are stored in events - named wrappers over rlist. Event objects are opaque, hence rlist field should not be used directly - event provides event_find_trigger, event_reset_triggers methods and event_trigger_iterator. Iterator provides stable iteration and all the non-deleted triggers will surely be traversed. On way to the goal this patch also fixes include list in func_adapter.h. Part of #8656 NO_CHANGELOG=internal NO_DOC=internal
Showing
- src/lib/core/CMakeLists.txt 1 addition, 0 deletionssrc/lib/core/CMakeLists.txt
- src/lib/core/event.c 337 additions, 0 deletionssrc/lib/core/event.c
- src/lib/core/event.h 162 additions, 0 deletionssrc/lib/core/event.h
- src/lib/core/func_adapter.h 3 additions, 0 deletionssrc/lib/core/func_adapter.h
- src/main.cc 3 additions, 0 deletionssrc/main.cc
- test/unit/CMakeLists.txt 5 additions, 0 deletionstest/unit/CMakeLists.txt
- test/unit/event.c 445 additions, 0 deletionstest/unit/event.c
src/lib/core/event.c
0 → 100644
src/lib/core/event.h
0 → 100644
test/unit/event.c
0 → 100644
Please register or sign in to comment