X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_service.h;h=34b41aff2ac57910d90cce0aaae1d19d8471dec2;hb=e30dd31847d212cd1b766612cbd980c7d8240baa;hp=ba2c3cd3a2368458b14a398c855c342414e2b2d7;hpb=6461abf76b89f96d667adec8ca151c5d25f70fcc;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h index ba2c3cd3a2..34b41aff2a 100644 --- a/lib/librte_eal/common/include/rte_service.h +++ b/lib/librte_eal/common/include/rte_service.h @@ -161,6 +161,26 @@ int32_t rte_service_runstate_set(uint32_t id, uint32_t runstate); */ int32_t rte_service_runstate_get(uint32_t id); +/** + * @warning + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice + * + * This function returns whether the service may be currently executing on + * at least one lcore, or definitely is not. This function can be used to + * determine if, after setting the service runstate to stopped, the service + * is still executing a service lcore. + * + * Care must be taken if calling this function when the service runstate is + * running, since the result of this function may be incorrect by the time the + * function returns due to service cores running in parallel. + * + * @retval 1 Service may be running on one or more lcores + * @retval 0 Service is not running on any lcore + * @retval -EINVAL Invalid service id + */ +int32_t __rte_experimental +rte_service_may_be_active(uint32_t id); + /** * Enable or disable the check for a service-core being mapped to the service. * An application can disable the check when takes the responsibility to run a