From 4bfa83e22e4a0e445fe68465073df34c00481183 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Fri, 24 Sep 2010 22:45:03 +0000 Subject: dahdi: process_timers is already called with interrupts disabled. Very slight performance increase when timertest is running in the background. Measured at ~10 ns improvement over 10K samples. Signed-off-by: Shaun Ruffell Acked-by: Kinsey Moore Acked-by: Russ Meyerriecks Acked-by: Tzafrir Cohen Review: https://reviewboard.asterisk.org/r/940/ git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9413 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/dahdi/dahdi-base.c') diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 40c1c12..417a09f 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -8162,11 +8162,12 @@ int dahdi_hdlc_getbuf(struct dahdi_chan *ss, unsigned char *bufptr, unsigned int static void process_timers(void) { - unsigned long flags; struct dahdi_timer *cur; - spin_lock_irqsave(&dahdi_timer_lock, flags); + if (list_empty(&dahdi_timers)) + return; + spin_lock(&dahdi_timer_lock); list_for_each_entry(cur, &dahdi_timers, list) { if (cur->ms) { cur->pos -= DAHDI_CHUNKSIZE; @@ -8177,8 +8178,7 @@ static void process_timers(void) } } } - - spin_unlock_irqrestore(&dahdi_timer_lock, flags); + spin_unlock(&dahdi_timer_lock); } static unsigned int dahdi_timer_poll(struct file *file, struct poll_table_struct *wait_table) -- cgit v1.2.3