HAPI int fault_init(void)
{
struct sigaction act;
+ char *ecore_abort;
- if (access("/tmp/live.err", F_OK) == 0)
- ErrPrint("Error log still exists (/tmp/live.err)\n");
+ ecore_abort = getenv("ECORE_ERROR_ABORT");
+ if (ecore_abort && ecore_abort[0] == '1') {
+ DbgPrint("Ecore abort is enabled\n");
+ return 0;
+ }
act.sa_sigaction = signal_handler;
act.sa_flags = SA_SIGINFO;
double delay;
double sleep_time;
+ if (!item->timer)
+ return;
+
ecore_timer_thaw(item->timer);
period = ecore_timer_interval_get(item->timer);
pending = ecore_timer_pending_get(item->timer);
delay = util_time_delay_for_compensation(period) - pending;
ecore_timer_delay(item->timer, delay);
- DbgPrint("Compensated: %lf\n", delay);
+ DbgPrint("Compensated: %lf, Instance %s resume timer\n", delay, item->inst->item->pkgname);
if (item->sleep_at == 0.0f)
return;
static inline void timer_freeze(struct item *item)
{
struct timeval tv;
+
+ if (!item->timer)
+ return;
+
ecore_timer_freeze(item->timer);
if (ecore_timer_interval_get(item->timer) <= 1.0f)
}
item->sleep_at = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0f;
+ DbgPrint("Instance %s freeze timer\n", item->inst->item->pkgname);
}
static inline void update_monitor_cnt(struct item *item)
continue;
}
- if (item->timer) {
- DbgPrint("Instance %s freeze timer\n", item->inst->item->pkgname);
- timer_freeze(item);
- } else {
- DbgPrint("Instance %s has no timer\n", item->inst->item->pkgname);
- }
+ timer_freeze(item);
lb_sys_event(item->inst, item, LB_SYS_EVENT_PAUSED);
}
continue;
}
- if (item->timer) {
- DbgPrint("Instance %s resume timer\n", item->inst->item->pkgname);
- timer_thaw(item);
- }
+ timer_thaw(item);
lb_sys_event(item->inst, item, LB_SYS_EVENT_RESUMED);
}
return LB_STATUS_SUCCESS;
}
- if (item->timer)
- timer_freeze(item);
+ timer_freeze(item);
lb_sys_event(inst, item, LB_SYS_EVENT_PAUSED);
return LB_STATUS_SUCCESS;
}
- if (item->timer)
- timer_thaw(item);
+ timer_thaw(item);
lb_sys_event(inst, item, LB_SYS_EVENT_RESUMED);
return LB_STATUS_SUCCESS;