Remove mutexing from device_status_alarm 72/59372/2
authorMu-Woong Lee <muwoong.lee@samsung.com>
Mon, 15 Feb 2016 06:29:45 +0000 (15:29 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Mon, 15 Feb 2016 06:31:41 +0000 (22:31 -0800)
Change-Id: Ic27042b77ada3ce4f7696afd92f87897f384cbfe
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/device/system/alarm.cpp

index 2a7ebd6c0dc7dec776c615c28da3ee0d2309aee5..0b75fb5a0ee27c4033f31de7a0b93a139e1c4b21 100644 (file)
  */
 
 #include <context_mgr.h>
-#include <scope_mutex.h>
 #include <timer_mgr.h>
 #include <timer_util.h>
 #include "system_types.h"
 #include "alarm.h"
 
-static GMutex timer_mutex;
-
 GENERATE_PROVIDER_COMMON_IMPL(device_status_alarm);
 
 ctx::device_status_alarm::device_status_alarm()
@@ -156,8 +153,6 @@ bool ctx::device_status_alarm::add(int minute, int day_of_week)
                        day_of_week > 0 && day_of_week <= timer_types::EVERYDAY,
                        false, _E, "Invalid parameter");
 
-       ctx::scope_mutex sm(&timer_mutex);
-
        ref_count_array_s &ref = ref_count_map[minute];
 
        for (int d = 0; d < MAX_DAY; ++d) {
@@ -175,8 +170,6 @@ bool ctx::device_status_alarm::remove(int minute, int day_of_week)
                        day_of_week > 0 && day_of_week <= timer_types::EVERYDAY,
                        false, _E, "Invalid parameter");
 
-       ctx::scope_mutex sm(&timer_mutex);
-
        ref_count_array_s &ref = ref_count_map[minute];
 
        for (int d = 0; d < MAX_DAY; ++d) {
@@ -227,8 +220,6 @@ bool ctx::device_status_alarm::reset_timer(int minute)
 
 void ctx::device_status_alarm::clear()
 {
-       ctx::scope_mutex sm(&timer_mutex);
-
        for (timer_state_map_t::iterator it = timer_state_map.begin(); it != timer_state_map.end(); ++it) {
                if (it->second.timer_id > 0) {
                        timer_manager::remove(it->second.timer_id);