[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTikcaVKnJxC18tUcJRTQwAukYhPdWMgGGrNaVjM_@mail.gmail.com>
Date: Tue, 17 Aug 2010 14:28:49 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Tony Luck <tony.luck@...el.com>
Cc: David Miller <davem@...emloft.net>,
Michel Lespinasse <walken@...gle.com>,
David Howells <dhowells@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: tasks getting stuck on mmap_sem?
Oh, and it strikes me when looking at the sparc rwsem-const.h that it
has some unsigned constants in it. I think
#define RWSEM_WAITING_BIAS 0xffff0000
is actually unsigned, because it's a hex constant that doesn't fit in
a signed int. So it's of type 'unsigned int' if I recall the C type
rules right.
(That's one of the really _subtle_ C type rules: hex constants
actually act differently from decimal constants).
So now RWSEM_ACTIVE_WRITE_BIAS is unsigned too.
The x86 constants are all explicitly signed.
Btw, Michel sent out an email saying:
FYI, I just verified that RWSEM_WAITING_BIAS is defined as signed on
all architectures except for ia64. So, this would be consistent with
the issue being observed only on ia64.
but I think he missed that subtlety of the C type system. Other architectures do
#define RWSEM_WAITING_BIAS (-0x00010000)
which is indeed signed, but Sparc is unsigned despite the lack of a "u".
Of course, maybe I only _think_ I know all the C typing rules. I might
be full of sh*t. It happens..I didn't actually look them up.
Linus
Linus
--
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