From: DongHyun Song Date: Fri, 3 Sep 2021 01:50:24 +0000 (+0900) Subject: Add CreateTaskQueue for early initialization X-Git-Tag: submit/tizen/20210914.065046~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33436b7444ef580789097b0d826015ef13cfefe9;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git Add CreateTaskQueue for early initialization This API will be used by global wrt-service (thread model) This singleton TaskQueue instance should have smack label same as pid's smack label. After a service app is launched, this TaskQueue thread has app's smack label. Then, smack violation might be happened. Thus, to initialize early before app creation, this patch exposes CreateTaskQueue() funtion for WebRuntime. Change-Id: I108bed31dbf0dbd1b54a6781530b95618584b0f8 Signed-off-by: DongHyun Song --- diff --git a/src/common/task-queue.cpp b/src/common/task-queue.cpp index ef58b5d2..139f554c 100644 --- a/src/common/task-queue.cpp +++ b/src/common/task-queue.cpp @@ -78,3 +78,12 @@ void TaskQueue::ScheduleWorkInMainThread(const std::function& work) { } } // namespace common + +extern "C" { + +__attribute__ ((visibility("default"))) void CreateTaskQueue() { + common::TaskQueue::GetInstance(); + LoggerI("Create TaskQueue"); +} + +}