rmtfs: Sync rmtfs server with rproc instance

Add sigterm/sigint handlers to enable graceful rmtfs server
bringdown on first instance of SIGINT/SIGTERM. Start/Stop the
remoteproc instance on RMTFS service up and SIGINT/SIGTERM
respectively. Force quit on second instance of SIGINT/SIGTERM.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
[bjorn: Pipe for event loop signaling, reworked /sys traversal]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Sibi Sankar
2019-04-15 16:21:28 +05:30
committed by Bjorn Andersson
parent 42edb9c07a
commit 976aa0ddbe
4 changed files with 204 additions and 16 deletions

View File

@@ -1,10 +1,10 @@
OUT := rmtfs
CFLAGS += -Wall -g -O2
LDFLAGS += -lqrtr -ludev
LDFLAGS += -lqrtr -ludev -lpthread
prefix = /usr/local
SRCS := qmi_rmtfs.c rmtfs.c sharedmem.c storage.c util.c
SRCS := qmi_rmtfs.c rmtfs.c rproc.c sharedmem.c storage.c util.c
OBJS := $(SRCS:.c=.o)
$(OUT): $(OBJS)