Loading system/osi/src/alarm.cc +5 −7 Original line number Original line Diff line number Diff line Loading @@ -114,12 +114,6 @@ struct alarm_t { int64_t TIMER_INTERVAL_FOR_WAKELOCK_IN_MS = 3000; int64_t TIMER_INTERVAL_FOR_WAKELOCK_IN_MS = 3000; static const clockid_t CLOCK_ID = CLOCK_BOOTTIME; static const clockid_t CLOCK_ID = CLOCK_BOOTTIME; #if (KERNEL_MISSING_CLOCK_BOOTTIME_ALARM == TRUE) static const clockid_t CLOCK_ID_ALARM = CLOCK_BOOTTIME; #else static const clockid_t CLOCK_ID_ALARM = CLOCK_BOOTTIME_ALARM; #endif // This mutex ensures that the |alarm_set|, |alarm_cancel|, and alarm callback // This mutex ensures that the |alarm_set|, |alarm_cancel|, and alarm callback // functions execute serially and not concurrently. As a result, this mutex // functions execute serially and not concurrently. As a result, this mutex // also protects the |alarms| list. // also protects the |alarms| list. Loading Loading @@ -327,7 +321,11 @@ static bool lazy_initialize(void) { if (!timer_create_internal(CLOCK_ID, &timer)) goto error; if (!timer_create_internal(CLOCK_ID, &timer)) goto error; timer_initialized = true; timer_initialized = true; if (!timer_create_internal(CLOCK_ID_ALARM, &wakeup_timer)) goto error; if (!timer_create_internal(CLOCK_BOOTTIME_ALARM, &wakeup_timer)) { if (!timer_create_internal(CLOCK_BOOTTIME, &wakeup_timer)) { goto error; } } wakeup_timer_initialized = true; wakeup_timer_initialized = true; alarm_expired = semaphore_new(0); alarm_expired = semaphore_new(0); Loading Loading
system/osi/src/alarm.cc +5 −7 Original line number Original line Diff line number Diff line Loading @@ -114,12 +114,6 @@ struct alarm_t { int64_t TIMER_INTERVAL_FOR_WAKELOCK_IN_MS = 3000; int64_t TIMER_INTERVAL_FOR_WAKELOCK_IN_MS = 3000; static const clockid_t CLOCK_ID = CLOCK_BOOTTIME; static const clockid_t CLOCK_ID = CLOCK_BOOTTIME; #if (KERNEL_MISSING_CLOCK_BOOTTIME_ALARM == TRUE) static const clockid_t CLOCK_ID_ALARM = CLOCK_BOOTTIME; #else static const clockid_t CLOCK_ID_ALARM = CLOCK_BOOTTIME_ALARM; #endif // This mutex ensures that the |alarm_set|, |alarm_cancel|, and alarm callback // This mutex ensures that the |alarm_set|, |alarm_cancel|, and alarm callback // functions execute serially and not concurrently. As a result, this mutex // functions execute serially and not concurrently. As a result, this mutex // also protects the |alarms| list. // also protects the |alarms| list. Loading Loading @@ -327,7 +321,11 @@ static bool lazy_initialize(void) { if (!timer_create_internal(CLOCK_ID, &timer)) goto error; if (!timer_create_internal(CLOCK_ID, &timer)) goto error; timer_initialized = true; timer_initialized = true; if (!timer_create_internal(CLOCK_ID_ALARM, &wakeup_timer)) goto error; if (!timer_create_internal(CLOCK_BOOTTIME_ALARM, &wakeup_timer)) { if (!timer_create_internal(CLOCK_BOOTTIME, &wakeup_timer)) { goto error; } } wakeup_timer_initialized = true; wakeup_timer_initialized = true; alarm_expired = semaphore_new(0); alarm_expired = semaphore_new(0); Loading