![]() | |||||||||||||
Messages in this thread |
On Tue, 27 Apr 2004 16:54:11 +1000,
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
>> +#ifdef __HAVE_ARCH_RAW_SPIN_LOCK_FLAGS
>> +#define _raw_spin_lock(lock) _raw_spin_lock_flags(lock, 0)
>> +#else
>> +#define _raw_spin_lock_flags(lock, flags) do { (void)flags; _raw_spin_lock(lock); } while(0)
>> +#endif
>
>Looks good, except as paulus noted that using 0 for flags in the
>_raw_spin_lock() case is wrong, since 0 is a valid flags value
>for some archs that could mean anything...
0 is valid for ia64, which is the only architecture that currently
defines __HAVE_ARCH_RAW_SPIN_LOCK_FLAGS. If other architectures want
to define __HAVE_ARCH_RAW_SPIN_LOCK_FLAGS and they need a different
flag value to indicate 'no flags available' then the 0 can be changed
to an arch defined value. Worry about that if it ever occurs.
-
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: 2005-03-22 13:02 [from the cache] ©2003-2008 | |||||||||||||