Support for i386 builds of glibc?
David Miller
davem@davemloft.net
Mon Mar 4 22:13:00 GMT 2013
From: "Maciej W. Rozycki" <macro@codesourcery.com>
Date: Mon, 4 Mar 2013 22:03:59 +0000
> On Mon, 4 Mar 2013, David Miller wrote:
>
>> > They could be easily emulated with the aid of global spinlocks, but
>> > given the decline of the i386 it's probably not worth the effort.
>>
>> This is a misnomer, you can't use global spinlocks as those are not
>> signal safe and will deadlock. Even the glibc testsuite will trigger
>> such deadlocks.
>
> I think "can't" is too strong a statement, signals are to userland what
> interrupts are to the kernel. The whole critical section could run with
> all signals blocked; if you wrote that the overhead might be prohibitive,
> then I would agree though.
You can't mess with signal state in the lock handlers, think about
siglongjmp and friends.
It's impossible even if you're willing to accept prohibitive cost.
More information about the Libc-alpha
mailing list