lkml.org 
[lkml]   [2007]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] timer/hrtimer: take per cpu locks in sane order
On Fri, 2 Mar 2007 20:08:36 +0100
Heiko Carstens <heiko.carstens@de.ibm.com> wrote:

> +/*
> + * double_hrtimer_lock/unlock are used to ensure that on cpu hotplug the
> + * per cpu timer locks are always taken in the same order.
> + */
> +static void double_hrtimer_lock(struct hrtimer_cpu_base *base1,
> + struct hrtimer_cpu_base *base2, int ind)
> + __acquires(base1->lock)
> + __acquires(base2->lock)
> +{
>
> ...
>
> +/*
> + * double_timer_lock/unlock are used to ensure that on cpu hotplug the
> + * per cpu timer locks are always taken in the same order.
> + */
> +static void __devinit double_timer_lock(tvec_base_t *base1,
> + tvec_base_t *base2, int ind)
> + __acquires(base1->lock)
> + __acquires(base2->lock)

hm. Can we not just pass in the spinlock_t*'s and use a common function?

void double_spin_lock(spinlock_t *l1, spinlock_t *l2, int ind);

that way it has nothing to do with timers and can potentially be used
elsewhere in the kernel, too.

(what does "ind" mean?)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-02 20:49    [W:0.137 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site