static Priority getPriority(SecurityModuleCall action) {
auto priority = Priority::LOW;
- if (action == SecurityModuleCall::PREPARE_APP) {
- // highest priority for app launching
+ if (action == SecurityModuleCall::PREPARE_APP || action == SecurityModuleCall::APP_CLEAN_NAMESPACE) {
+ // highest priority for app launching & cleanup
priority = Priority::HIGHEST;
} else {
resource_pid_t proc_data;
void PutEvent(Priority priority, T&&...arg) {
assert(priority < arraySize(m_eventQueues));
auto event = new Event{ std::forward<T>(arg)... };
- if (event->callType() == SecurityModuleCall::PREPARE_APP)
+ if (event->callType() == SecurityModuleCall::PREPARE_APP ||
+ event->callType() == SecurityModuleCall::APP_CLEAN_NAMESPACE)
{
if (priority != Priority::HIGHEST)
- LogError("Gotcha, client sent improper priority for PREPARE_APP!");
+ LogError("Gotcha, client sent improper priority for PREPARE_APP or APP_CLEAN_NAMESPACE!");
{
std::lock_guard<std::mutex> lock(m_hi_prio_eventQueueMutex);
m_eventQueues[priority].emplace(event);
} else
{
if (priority == Priority::HIGHEST)
- LogError("Gotcha, client sent high-priority non-PREPARE_APP Event!");
+ LogError("Gotcha, client sent high-priority non-PREPARE_APP or APP_CLEAN_NAMESPACE Event!");
{
std::lock_guard<std::mutex> lock(m_eventQueueMutex);
m_eventQueues[priority].emplace(event);