On Fri, 23 Dec 2005, Ingo Molnar wrote:
>
> add the two generic mutex fastpath implementations.
Now this looks more like it. This is readable code without any #ifdef's in
the middle.
Now the only #ifdef's seem to be for mutex debugging. Might it be
worthwhile to have a generic debugging, that just uses spinlocks and just
accept that it's going to be slow, but shared across absolutely all
architectures?
Then you could have <linux/mutex.h> just doing a single
#ifdef CONFIG_MUTEX_DEBUG
# include <asm-generic/mutex-dbg.h>
#else
# include <asm/mutex.h>
#endif
and have muted-dbg.h just contain prototypes (no point in inlining them,
they're going to be big anyway) and then have a
obj$(CONFIG_MUTEX_DEBUG) += mutex-debug.c
in the kernel/ subdirectory? That way you could _really_ have a clean
separation, with absolutely zero pollution of any architecture mess or
debugging #ifdef's in any implementation code.
At that point I'd like to switch to mutexes just because the code is
cleaner!
Linus
-
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]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]