Re: [patch 10/15] Generic Mutex Subsystem, mutex-migration-helper-core.patch

Steven Rostedt
2005-12-19T14:17:23Z

On Mon, 2005-12-19 at 02:38 +0100, Ingo Molnar wrote:
> +#ifdef CONFIG_DEBUG_MUTEXESS
> +void fastcall
> +__mutex_debug_sema_init(struct mutex_debug *lock, int val, char
> *name,
> + char *file, int line)
> +{
> + __mutex_init(&lock->lock, name, file, line);
> +
> + DEBUG_WARN_ON(val != 0 && val != 1);
> + if (!val)
> + __mutex_lock(&lock->lock __CALLER_IP__);
> +}
> +#else
> +void fastcall __mutex_debug_sema_init(struct mutex_debug *lock, int
> val)
> +{
> + __mutex_init(&lock->lock);
> +
> + DEBUG_WARN_ON(val != 0 && val != 1);

DEBUG_WARN_ON in this part of the #if is always a no-op.

-- Steve

> + if (!val)
> + __mutex_lock(&lock->lock __CALLER_IP__);
> +}
> +#endif
> +