Re: [PATCH] Real-Time Preemption V0.7.52-07: rt_init_MUTEX_LOCKED declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-08-01 at 19:05 +0000, Luca Falavigna wrote:
> > The patch you wanted to send was:
> > 
> > Signed-off-by: Steven Rostedt <[email protected]>
> > 
> > Index: linux_realtime_ernie/drivers/char/watchdog/cpu5wdt.c
> > ===================================================================
> > --- linux_realtime_ernie/drivers/char/watchdog/cpu5wdt.c        (revision 265)
> > +++ linux_realtime_ernie/drivers/char/watchdog/cpu5wdt.c        (working copy)
> > @@ -56,7 +56,7 @@
> >  /* some device data */
> > 
> >  static struct {
> > -       struct semaphore stop;
> > +       struct compat_semaphore stop;
> >         volatile int running;
> >         struct timer_list timer;
> >         volatile int queue;
> 
> Another solution could be this (as shown in drivers/cpufreq/cpufreq.c):
> -	init_MUTEX_LOCKED(&policy->lock);
> +	init_MUTEX(&policy->lock);
> +	down(&policy->lock);
> -

If the semaphore is being used as a mutex, 
then it could be converted to an RT-mutex.

That would nicely side-step the problem.

Note this won't work if you are counting with the sema.

Sven


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux