Threads security context synchronization 90/72590/13
authorZbigniew Jasinski <z.jasinski@samsung.com>
Wed, 1 Jun 2016 15:43:29 +0000 (17:43 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Thu, 16 Jun 2016 12:15:54 +0000 (05:15 -0700)
commit6eef187ab9b81e83744e96bedc9c667598e588f6
treed997021a3a37e9cf8ef1ef86151aa98bb98b1d69
parentfea6a61d41bdbca8982a2d4c9cadc336f36495de
Threads security context synchronization

- use lambda as signal handler
- return error if not all threads synced
- change NULL to nullptr
- added std::atomic_thread_fence for memory synchronization
- block SIGUSR1 signal during threads counting
- set signal set to empty
- added waiting loop for signal propagation
- reset signal handler after threads synced, not before
- synchronization of both: Smack labels and Linux capabilities

Change-Id: Ia9d6a503e88523c387ab1ba30e0e9a5a94f05a5c
Signed-off-by: Zbigniew Jasinski <z.jasinski@samsung.com>
src/client/client-security-manager.cpp