Refactoring: make NSMountLogic class responsible for Channel and MntMonitor 12/164112/5
authorRafal Krypa <r.krypa@samsung.com>
Fri, 15 Dec 2017 08:25:25 +0000 (09:25 +0100)
committerDariusz Michaluk <d.michaluk@samsung.com>
Wed, 3 Jan 2018 13:58:17 +0000 (13:58 +0000)
commitbd010625093b73290150622daf9c6b3a5d0d7344
tree17b1b25173d1599abb9b9d914dd76a2621290257
parent36505e0ea64b11a5e743ea6ff73515a13d1038db
Refactoring: make NSMountLogic class responsible for Channel and MntMonitor

NSMountLogic class will now be solely responsible for making updates to
mount namespaces of running applications. It's single instance will be
persistent in ServiceImpl class. NSMountLogic now owns Channel for
communicating with the Worker process and sends requests for mount updates.
It also listens to mount events from MntMonitor and sends appropriate
requests to worker.

All required synchronization should be done in NSMountLogic.
NSMountLogic::check() method needs to be thread-safe because it may be
called concurrently from ServiceImpl and from MntMonitor thread.

Change-Id: I8cb4be25e5f9c8da4360d7ddff34993836f9f169
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
src/common/include/nsmount-logic.h
src/common/include/service_impl.h
src/common/nsmount-logic.cpp
src/common/service_impl.cpp