eal: check if primary process is alive
authorHarry van Haaren <harry.van.haaren@intel.com>
Wed, 9 Mar 2016 13:37:25 +0000 (13:37 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 9 Mar 2016 15:13:09 +0000 (16:13 +0100)
commitdd3e00138d742c7359921efcb0b82b6908e21156
tree47cbc0d5c4aebe9e80af02646c37e736371bd1d1
parent289d8dd6dbe4edb0949829e2c9a8895b5ae660a8
eal: check if primary process is alive

This patch adds a new function to the EAL API:
int rte_eal_primary_proc_alive(const char *path);

The function indicates if a primary process is alive right now.
This functionality is implemented by testing for a write-
lock on the config file, and the function tests for a lock.

The use case for this functionality is that a secondary
process can wait until a primary process starts by polling
the function and waiting. When the primary is running, the
secondary continues to poll to detect if the primary process
has quit unexpectedly, the secondary process can detect this.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
doc/guides/rel_notes/release_16_04.rst
lib/librte_eal/bsdapp/eal/Makefile
lib/librte_eal/bsdapp/eal/rte_eal_version.map
lib/librte_eal/common/eal_common_proc.c [new file with mode: 0644]
lib/librte_eal/common/include/rte_eal.h
lib/librte_eal/linuxapp/eal/Makefile
lib/librte_eal/linuxapp/eal/rte_eal_version.map