From: "Leon Woestenberg" <leon.woestenberg@gmail.com>
To: "Peter Zijlstra" <peterz@infradead.org>
Cc: "Marcin Slusarz" <marcin.slusarz@gmail.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Matthew Wilcox" <willy@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Rename DECLARE_MUTEX to DEFINE_SEMAPHORE
Date: Sun, 26 Oct 2008 16:20:14 +0100 [thread overview]
Message-ID: <c384c5ea0810260820ye9ebd70y587c013c7bef2579@mail.gmail.com> (raw)
In-Reply-To: <1225032063.32713.17.camel@twins>
Hello,
On Sun, Oct 26, 2008 at 3:41 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Sun, 2008-10-26 at 15:11 +0100, Leon Woestenberg wrote:
>> On Sun, Oct 26, 2008 at 2:39 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>> > On Sun, 2008-10-26 at 13:06 +0100, Marcin Slusarz wrote:
>> >> DECLARE_MUTEX is doubly misleading name (it actually _defines_ struct
>> >> _semaphore_ initialized to 1) and it can be confused with DEFINE_MUTEX
>> >> (which defines real struct mutex). Rename it.
>> >
>> > I'd prefer DEFINE_BINARY_SEM or somesuch
>> >
>> But it is not a binary semaphore, or is it?
>
>> #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
>
> I thought that 1 made it a binary sem.
>
I thought it only initialized the semaphore count to 1, but not
disallowing it to be upped. Maybe am I just plain wrong, and I should
be zapped to kernelnewbies instead. :-/
Regards,
--
Leon
next prev parent reply other threads:[~2008-10-26 15:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-26 12:06 Marcin Slusarz
2008-10-26 13:39 ` Peter Zijlstra
2008-10-26 14:11 ` Leon Woestenberg
2008-10-26 14:41 ` Peter Zijlstra
2008-10-26 15:20 ` Leon Woestenberg [this message]
2008-10-26 15:23 ` Marcin Slusarz
2008-10-26 16:41 ` Christoph Hellwig
2008-10-29 21:16 ` Marcin Slusarz
2008-10-29 21:22 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c384c5ea0810260820ye9ebd70y587c013c7bef2579@mail.gmail.com \
--to=leon.woestenberg@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.slusarz@gmail.com \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=willy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®