summaryrefslogtreecommitdiff
path: root/lib/librte_eventdev/rte_event_timer_adapter.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_eventdev/rte_event_timer_adapter.c')
-rw-r--r--lib/librte_eventdev/rte_event_timer_adapter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
index 79070d4..575da04 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.c
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -261,6 +261,12 @@ rte_event_timer_adapter_start(const struct rte_event_timer_adapter *adapter)
ADAPTER_VALID_OR_ERR_RET(adapter, -EINVAL);
FUNC_PTR_OR_ERR_RET(adapter->ops->start, -EINVAL);
+ if (adapter->data->started) {
+ EVTIM_LOG_ERR("event timer adapter %"PRIu8" already started",
+ adapter->data->id);
+ return -EALREADY;
+ }
+
ret = adapter->ops->start(adapter);
if (ret < 0)
return ret;