Messages in this thread | | | Subject | Re: [PATCH 1/19] MUTEX: Introduce simple mutex implementation | From | Thomas Gleixner <> | Date | Thu, 15 Dec 2005 18:04:54 +0100 |
| |
On Thu, 2005-12-15 at 08:28 -0800, Linus Torvalds wrote: > I would suggest that if you create a new "mutex" type, you just keep the > lower-case name. Don't re-use the DECLARE_MUTEX format, just do > > struct mutex my_mutex = UNLOCKED_MUTEX; > > for new code that uses the new stuff. > > Think about it a bit. We don't have DECLARE_SPINLOCK either. Why?
Well, we have DEFINE_SPINLOCK() and we should have a matching one for mutexes DEFINE_MUTEX().
The reason is that you can implement complex initialization for debugging or extensions which can't be done by a var = INITIALZER, because you dont have a reference to var.
tglx
- 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/
| |