FD.io VPP
v21.01.1
Vector Packet Processing
|
Callback multiplex scheme. More...
Go to the source code of this file.
Macros | |
#define | clib_callback_data_typedef(set_t_, cb_t_) |
Declare and define a callback set type. More... | |
#define | clib_callback_data_init(set_, lock_) |
Initialize a callback set. More... | |
#define | clib_callback_data_add(set_, value_) |
Add a callback to the specified callback set. More... | |
#define | clib_callback_data_remove(set_, fp_) |
Remove a callback from the specified callback set. More... | |
#define | clib_callback_data_swap(set_, fp_, value_) |
Swap a callback in the specified callback set. More... | |
#define | clib_callback_data_ensure(set_, value_) |
Ensure a callback is in the specified callback set. More... | |
#define | clib_callback_data_enable_disable(set_, fp_, ena_) |
Enable/Disable the specified callback. More... | |
#define | clib_callback_data_get_value(set_, fp_, v_) |
Get the value of a callback, if set. More... | |
#define | clib_callback_data_is_set(set_, fp_) |
Check if callback is set. More... | |
#define | clib_callback_data_check_and_get(set_) |
Check for and get current callback set. More... | |
#define | clib_callback_data_call_vec(vec_, ...) |
Iterate and call a callback vector. More... | |
#define | clib_callback_data_call(set_, ...) |
Call the specified callback set. More... | |
#define | clib_callback_data_prefetch(set_) |
prefetch the callback set More... | |
Callback multiplex scheme.
Definition in file callback_data.h.
#define clib_callback_data_add | ( | set_, | |
value_ | |||
) |
Add a callback to the specified callback set.
set_ | The callback set |
value_ | The value_ to assign the callback |
Add a callback from the indicated callback set. If the set is currently being iterated, then the change will be applied after the current full iteration, and prior to the next full iteration.
Definition at line 57 of file callback_data.h.
#define clib_callback_data_call | ( | set_, | |
... | |||
) |
Call the specified callback set.
set_ | the callback set |
varargs | additional callback parameters |
Definition at line 291 of file callback_data.h.
#define clib_callback_data_call_vec | ( | vec_, | |
... | |||
) |
Iterate and call a callback vector.
vec_ | the callback vector |
varargs | additional callback parameters |
Definition at line 276 of file callback_data.h.
#define clib_callback_data_check_and_get | ( | set_ | ) |
Check for and get current callback set.
set_ | the callback set |
varargs | additional callback parameters |
Definition at line 254 of file callback_data.h.
#define clib_callback_data_enable_disable | ( | set_, | |
fp_, | |||
ena_ | |||
) |
Enable/Disable the specified callback.
set_ | The callback set |
fp_ | The callback function |
ena_ | 1 to enable, 0 to disable |
Enable or disable a callback function, with no data.
Definition at line 189 of file callback_data.h.
#define clib_callback_data_ensure | ( | set_, | |
value_ | |||
) |
Ensure a callback is in the specified callback set.
set_ | The callback set |
value_ | The value_ to assign the callback |
Add or swap a callback in the indicated callback set. If the callback is already in the set, it is replaced. If the callback is not found, then it is added. If the set is currently being iterated, then the change will be applied after the current full iteration, and prior to the next full iteration.
Definition at line 156 of file callback_data.h.
#define clib_callback_data_get_value | ( | set_, | |
fp_, | |||
v_ | |||
) |
Get the value of a callback, if set.
set_ | The callback set |
fp_ | The callback function |
v_ | Set to the callback's current value |
Definition at line 206 of file callback_data.h.
#define clib_callback_data_init | ( | set_, | |
lock_ | |||
) |
Initialize a callback set.
set_ | The callback set to initialize |
lock_ | The lock to use, if any |
Definition at line 41 of file callback_data.h.
#define clib_callback_data_is_set | ( | set_, | |
fp_ | |||
) |
Check if callback is set.
set_ | The callback set |
fp_ | The callback function |
Definition at line 231 of file callback_data.h.
#define clib_callback_data_prefetch | ( | set_ | ) |
prefetch the callback set
set_ | The callback set |
Definition at line 300 of file callback_data.h.
#define clib_callback_data_remove | ( | set_, | |
fp_ | |||
) |
Remove a callback from the specified callback set.
set_ | The callback set |
fp_ | The current callback function |
Remove a callback from the indicated callback set. Idempotent. If the set is currently being iterated, then the change will be applied after the current full iteration, and prior to the next full iteration.
Definition at line 84 of file callback_data.h.
#define clib_callback_data_swap | ( | set_, | |
fp_, | |||
value_ | |||
) |
Swap a callback in the specified callback set.
set_ | The callback set |
fp_ | The current callback function |
value_ | The value_ to assign the callback |
Swap a callback in the indicated callback set. If the callback is not found, then nothing is done. If the set is currently being iterated, then the change will be applied after the current full iteration, and prior to the next full iteration.
Definition at line 120 of file callback_data.h.
#define clib_callback_data_typedef | ( | set_t_, | |
cb_t_ | |||
) |
Declare and define a callback set type.
set_t_ | The set type to define |
cb_t_ | The callback type to use |
Definition at line 28 of file callback_data.h.