Flag validation is redundant with the logic already verified on
registration. Therefore, use an assertion, which can be compiled-out
when performance matters.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#include <side/trace.h>
#include <string.h>
#include <side/trace.h>
#include <string.h>
#include "rcu.h"
#include "list.h"
#include "rcu.h"
#include "list.h"
return;
if (side_unlikely(!initialized))
side_init();
return;
if (side_unlikely(!initialized))
side_init();
- if (side_unlikely(event_state->desc->flags & SIDE_EVENT_FLAG_VARIADIC)) {
- printf("ERROR: unexpected variadic event description\n");
- abort();
- }
+ assert(!(event_state->desc->flags & SIDE_EVENT_FLAG_VARIADIC));
enabled = __atomic_load_n(&event_state->enabled, __ATOMIC_RELAXED);
if (side_unlikely(enabled & SIDE_EVENT_ENABLED_KERNEL_USER_EVENT_MASK)) {
// TODO: call kernel write.
enabled = __atomic_load_n(&event_state->enabled, __ATOMIC_RELAXED);
if (side_unlikely(enabled & SIDE_EVENT_ENABLED_KERNEL_USER_EVENT_MASK)) {
// TODO: call kernel write.
return;
if (side_unlikely(!initialized))
side_init();
return;
if (side_unlikely(!initialized))
side_init();
- if (side_unlikely(!(event_state->desc->flags & SIDE_EVENT_FLAG_VARIADIC))) {
- printf("ERROR: unexpected non-variadic event description\n");
- abort();
- }
+ assert(event_state->desc->flags & SIDE_EVENT_FLAG_VARIADIC);
enabled = __atomic_load_n(&event_state->enabled, __ATOMIC_RELAXED);
if (side_unlikely(enabled & SIDE_EVENT_ENABLED_KERNEL_USER_EVENT_MASK)) {
// TODO: call kernel write.
enabled = __atomic_load_n(&event_state->enabled, __ATOMIC_RELAXED);
if (side_unlikely(enabled & SIDE_EVENT_ENABLED_KERNEL_USER_EVENT_MASK)) {
// TODO: call kernel write.