From 439315d9183d0b189c1f7ed49495d1a6c48e913a Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 22 Feb 2013 12:38:01 +0100 Subject: [PATCH] timer: Don't set default cap as custom cap Without the patch the signal cap was ever transferred to the timer session when a usleep/msleep was called, even when unneeded. On base-nova this causes the allocation of new capability indexes which are not freed up. So the timer service run quickly out of indexes and get out of order... Related to issue #1 --- os/include/timer_session/connection.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os/include/timer_session/connection.h b/os/include/timer_session/connection.h index 34842857e1..52888a8f50 100644 --- a/os/include/timer_session/connection.h +++ b/os/include/timer_session/connection.h @@ -38,7 +38,7 @@ namespace Timer { _default_sigh_cap(_sig_rec.manage(&_default_sigh_ctx)) { /* register default signal handler */ - sigh(_default_sigh_cap); + Session_client::sigh(_default_sigh_cap); } ~Connection() { _sig_rec.dissolve(&_default_sigh_ctx); } @@ -59,7 +59,7 @@ namespace Timer { /* temporarily install to the default signal handler */ if (_custom_sigh_cap.valid()) - sigh(_default_sigh_cap); + Session_client::sigh(_default_sigh_cap); /* trigger timeout at default signal handler */ trigger_once(us); @@ -67,7 +67,7 @@ namespace Timer { /* revert custom signal handler if registered */ if (_custom_sigh_cap.valid()) - sigh(_custom_sigh_cap); + Session_client::sigh(_custom_sigh_cap); } void msleep(unsigned ms)