lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 26 Oct 2008 16:20:14 +0100
From:	"Leon Woestenberg" <leon.woestenberg@...il.com>
To:	"Peter Zijlstra" <peterz@...radead.org>
Cc:	"Marcin Slusarz" <marcin.slusarz@...il.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Linus Torvalds" <torvalds@...ux-foundation.org>,
	"Matthew Wilcox" <willy@...ux.intel.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Rename DECLARE_MUTEX to DEFINE_SEMAPHORE

Hello,

On Sun, Oct 26, 2008 at 3:41 PM, Peter Zijlstra <peterz@...radead.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@...radead.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ