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

From: Ingo Molnar
Date: Mon Aug 01 2005 - 16:00:35 EST



* Luca Falavigna <dktrkranz@xxxxxxxxx> wrote:

> This patch fixes broken rt_init_MUTEX_LOCKED declaration using
> rt_sema_init() macro. This way we fix a potential compile bug:
> rt_init_MUTEX_LOCKED calls
> there_is_no_init_MUTEX_LOCKED_for_RT_semaphores, which is not
> referenced. (e.g. drivers/char/watchdog/cpu5wdt.c: "cpu5wdt: Unknown
> symbol there_is_no_init_MUTEX_LOCKED_for_RT_semaphores")

the right solution would be to mark policy->lock as a compat_semaphore.
That will revert things back to the stock semantics. (at the price of
not having PI, which isnt a big issue in this case.)

> -+extern void there_is_no_init_MUTEX_LOCKED_for_RT_semaphores(void);

the reason for not allowing init_MUTEX_LOCKED() is that in basically
every case that does it, the semaphore is not used as a true mutex in
the strict sense. So the affected semaphore should be changed to
compat_semaphore, to gain full semantics.

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