MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_service_runstate_get

Function rte_service_runstate_get

dpdk/lib/eal/common/rte_service.c:347–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347int32_t
348rte_service_runstate_get(uint32_t id)
349{
350 struct rte_service_spec_impl *s;
351 SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL);
352
353 /* comp_runstate and app_runstate act as the guard variables.
354 * Use load-acquire memory order. This synchronizes with
355 * store-release in service state set functions.
356 */
357 if (rte_atomic_load_explicit(&s->comp_runstate, rte_memory_order_acquire) ==
358 RUNSTATE_RUNNING &&
359 rte_atomic_load_explicit(&s->app_runstate, rte_memory_order_acquire) ==
360 RUNSTATE_RUNNING) {
361 int check_disabled = !(s->internal_flags &
362 SERVICE_F_START_CHECK);
363 int lcore_mapped = (rte_atomic_load_explicit(&s->num_mapped_cores,
364 rte_memory_order_relaxed) > 0);
365
366 return (check_disabled | lcore_mapped);
367 } else
368 return 0;
369
370}
371
372static inline void
373service_runner_do_callback(struct rte_service_spec_impl *s,

Callers 8

__swtim_arm_burstFunction · 0.85
swtim_cancel_burstFunction · 0.85
rte_service_lcore_stopFunction · 0.85
sw_startFunction · 0.85
sw_stopFunction · 0.85
service_start_stopFunction · 0.85

Calls

no outgoing calls

Tested by 1

service_start_stopFunction · 0.68