Skip to content

Commit

Permalink
eventdev: fix C++ include
Browse files Browse the repository at this point in the history
[ upstream commit 153e7d8 ]

The eventdev headers had issues when used from C++

* Missing closing "}" for the extern "C" block
* No automatic casting to/from void *

Fixes: a6562f6 ("eventdev: introduce event timer adapter")
Fixes: 32e3268 ("eventdev: add tracepoints")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
  • Loading branch information
bruce-richardson authored and bluca committed Feb 17, 2022
1 parent ae0613e commit 48735e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/librte_eventdev/rte_event_timer_adapter.h
Expand Up @@ -665,4 +665,8 @@ rte_event_timer_cancel_burst(const struct rte_event_timer_adapter *adapter,
return adapter->cancel_burst(adapter, evtims, nb_evtims);
}

#ifdef __cplusplus
}
#endif

#endif /* __RTE_EVENT_TIMER_ADAPTER_H__ */
2 changes: 1 addition & 1 deletion lib/librte_eventdev/rte_eventdev.h
Expand Up @@ -1380,7 +1380,7 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
return 0;
}
#endif
rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, fn);
rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (void *)fn);
/*
* Allow zero cost non burst mode routine invocation if application
* requests nb_events as const one
Expand Down

0 comments on commit 48735e1

Please sign in to comment.