diff --git a/repos/dde_linux/src/lib/lxip/timer_handler.cc b/repos/dde_linux/src/lib/lxip/timer_handler.cc index 9b19af79f..fc7b21c4f 100644 --- a/repos/dde_linux/src/lib/lxip/timer_handler.cc +++ b/repos/dde_linux/src/lib/lxip/timer_handler.cc @@ -57,7 +57,6 @@ class Lx::Timer void *timer; bool pending { false }; unsigned long timeout { INVALID_TIMEOUT }; /* absolute in jiffies */ - bool programmed { false }; Context(struct timer_list *timer) : type(LIST), timer(timer) { } @@ -111,11 +110,6 @@ class Lx::Timer /** * Program the first timer in the list - * - * The first timer is programmed if the 'programmed' flag was not set - * before. The second timer is flagged as not programmed as - * 'Timer::trigger_once' invalidates former registered one-shot - * timeouts. */ void _program_first_timer() { @@ -123,19 +117,10 @@ class Lx::Timer if (!ctx) return; - if (ctx->programmed) - return; - /* calculate relative microseconds for trigger */ unsigned long us = ctx->timeout > jiffies ? jiffies_to_msecs(ctx->timeout - jiffies) * 1000 : 0; _timer_conn.trigger_once(us); - - ctx->programmed = true; - - /* possibly programmed successor must be reprogrammed later */ - if (Context *next = ctx->next()) - next->programmed = false; } /** @@ -150,10 +135,10 @@ class Lx::Timer ctx->timeout = expires; ctx->pending = true; - ctx->programmed = false; + /* * Also write the timeout value to the expires field in - * struct timer_list because the checks + * struct timer_list because some code the checks * it directly. */ ctx->expires(expires); diff --git a/repos/dde_linux/src/lx_kit/timer.cc b/repos/dde_linux/src/lx_kit/timer.cc index dd94ab49d..503fb5497 100644 --- a/repos/dde_linux/src/lx_kit/timer.cc +++ b/repos/dde_linux/src/lx_kit/timer.cc @@ -44,7 +44,6 @@ class Lx_kit::Timer : public Lx::Timer void *timer; bool pending { false }; unsigned long timeout { INVALID_TIMEOUT }; /* absolute in jiffies */ - bool programmed { false }; Context(struct timer_list *timer) : type(LIST), timer(timer) { } Context(struct hrtimer *timer) : type(HR), timer(timer) { } @@ -101,11 +100,6 @@ class Lx_kit::Timer : public Lx::Timer /** * Program the first timer in the list - * - * The first timer is programmed if the 'programmed' flag was not set - * before. The second timer is flagged as not programmed as - * 'Timer::trigger_once' invalidates former registered one-shot - * timeouts. */ void _program_first_timer() { @@ -113,19 +107,10 @@ class Lx_kit::Timer : public Lx::Timer if (!ctx) return; - if (ctx->programmed) - return; - /* calculate relative microseconds for trigger */ unsigned long us = ctx->timeout > _jiffies ? jiffies_to_msecs(ctx->timeout - _jiffies) * 1000 : 0; _timer_conn.trigger_once(us); - - ctx->programmed = true; - - /* possibly programmed successor must be reprogrammed later */ - if (Context *next = ctx->next()) - next->programmed = false; } /** @@ -140,10 +125,10 @@ class Lx_kit::Timer : public Lx::Timer ctx->timeout = expires; ctx->pending = true; - ctx->programmed = false; + /* * Also write the timeout value to the expires field in - * struct timer_list because the wireless stack checks + * struct timer_list because some code the checks * it directly. */ ctx->expires(expires);