Preparatory patch for semaphore cleanup
Linus,
Please pull the semaphore-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git semaphore-for-linus
This patch just provides the DEFINE_SEMAPHORE macro which is required for the various subsystem cleanups I sent out, so we can finally get rid of init_MUTEX[_LOCKED] in 2.6.37.
Thanks,
tglx
------------------>
Thomas Gleixner (1):
semaphore: Add DEFINE_SEMAPHORE
include/linux/semaphore.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
include/linux/semaphore.h +3 -0
@@ -26,6 +26,9 @@ struct semaphore { .wait_list = LIST_HEAD_INIT((name).wait_list), \ } +#define DEFINE_SEMAPHORE (name) \ + struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) +#define DECLARE_MUTEX (name) \ struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
Quoted 4 lines · Thomas Gleixner
This patch just provides the
DEFINE_SEMAPHOREmacro which is required for the various subsystem cleanups I sent out, so we can finally get rid of init_MUTEX[_LOCKED] in 2.6.37.
Why is it called DEFINE_SEMAPHORE(), when two lines later the we have DECLARE_MUTEX()?
IOW, the whole DEFINE vs DECLARE thing seems confused. I'm not saying one is better than the other (maybe "define" is), but the mixing of names is worse than either, I feel..
Linus
Quoted 6 lines · Linus Torvalds
Quoted 4 lines · Thomas Gleixner
This patch just provides the
DEFINE_SEMAPHOREmacro which is required for the various subsystem cleanups I sent out, so we can finally get rid of init_MUTEX[_LOCKED] in 2.6.37.
Quoted 6 lines
Why is it called
DEFINE_SEMAPHORE(), when two lines later the we haveDECLARE_MUTEX()?IOW, the whole DEFINE vs DECLARE thing seems confused. I'm not saying one is better than the other (maybe "define" is), but the mixing of names is worse than either, I feel..
The rest of the series, that Thomas didn't include in this pull, removes all the DECLARE_MUTEX() users. So its temporary awkward-ness.
Quoted 10 lines · Peter Zijlstra
Quoted 9 lines · Linus Torvalds
Quoted 4 lines · Thomas Gleixner
This patch just provides the
DEFINE_SEMAPHOREmacro which is required for the various subsystem cleanups I sent out, so we can finally get rid of init_MUTEX[_LOCKED] in 2.6.37.Why is it called
DEFINE_SEMAPHORE(), when two lines later the we haveDECLARE_MUTEX()?
Quoted 6 lines
Quoted 3 lines
IOW, the whole DEFINE vs DECLARE thing seems confused. I'm not saying one is better than the other (maybe "define" is), but the mixing of names is worse than either, I feel..
The rest of the series, that Thomas didn't include in this pull, removes all the
DECLARE_MUTEX()users. So its temporary awkward-ness.
and DEFINE_MUTEX() is needed upstream so that we can spread those patches into a dozen maintainer trees. Once those flow upstream DECLARE_MUTEX() will be removed.
Thanks,
Ingo
Quoted 12 lines · Ingo Molnar
Quoted 10 lines · Peter Zijlstra
Quoted 9 lines · Linus Torvalds
Quoted 4 lines · Thomas Gleixner
This patch just provides the
DEFINE_SEMAPHOREmacro which is required for the various subsystem cleanups I sent out, so we can finally get rid of init_MUTEX[_LOCKED] in 2.6.37.Why is it called
DEFINE_SEMAPHORE(), when two lines later the we haveDECLARE_MUTEX()?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
IOW, the whole DEFINE vs DECLARE thing seems confused. I'm not saying one is better than the other (maybe "define" is), but the mixing of names is worse than either, I feel..
The rest of the series, that Thomas didn't include in this pull, removes all the
DECLARE_MUTEX()users. So its temporary awkward-ness.and
DEFINE_MUTEX()is needed upstream so that we can spread those
s/DEFINE_MUTEX/DEFINE_SEMAPHORE/
Quoted 2 lines
patches into a dozen maintainer trees. Once those flow upstream
DECLARE_MUTEX()will be removed.
Quoted 17 lines · Peter Zijlstra
Quoted 16 lines · Ingo Molnar
Quoted 14 lines · Peter Zijlstra
Quoted 12 lines · Linus Torvalds
Quoted 4 lines · Thomas Gleixner
This patch just provides the
DEFINE_SEMAPHOREmacro which is required for the various subsystem cleanups I sent out, so we can finally get rid of init_MUTEX[_LOCKED] in 2.6.37.Why is it called
DEFINE_SEMAPHORE(), when two lines later the we haveDECLARE_MUTEX()?IOW, the whole DEFINE vs DECLARE thing seems confused. I'm not saying one is better than the other (maybe "define" is), but the mixing of names is worse than either, I feel..
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
The rest of the series, that Thomas didn't include in this pull, removes all the
DECLARE_MUTEX()users. So its temporary awkward-ness.and
DEFINE_MUTEX()is needed upstream so that we can spread thoses/DEFINE_MUTEX/DEFINE_SEMAPHORE/
Heh, i was demonstrating Linus's point ;-)
Thanks,
Ingo
Quoted 8 lines · Linus Torvalds
Quoted 4 lines · Thomas Gleixner
This patch just provides the
DEFINE_SEMAPHOREmacro which is required for the various subsystem cleanups I sent out, so we can finally get rid of init_MUTEX[_LOCKED] in 2.6.37.Why is it called
DEFINE_SEMAPHORE(), when two lines later the we haveDECLARE_MUTEX()?
DECLARE_MUTEX is what we want to get rid of.
It's a misnomer as the semaphores are not longer used as mutexes and the instantiation of a variable is not the declaration.
Quoted 3 lines
IOW, the whole DEFINE vs DECLARE thing seems confused. I'm not saying one is better than the other (maybe "define" is), but the mixing of names is worse than either, I feel..
That's a temporary situaton until all users are gone, which will be in the 37 merge window.
Thanks,
tglx