linux-mips-fnet
[Top] [All Lists]

Re: SA_* in Linux 2.0.x und 2.2.x

To: Ralf Baechle <ralf@uni-koblenz.de>
Subject: Re: SA_* in Linux 2.0.x und 2.2.x
From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
Date: 22 Aug 1999 09:13:19 +0200
Cc: linux-mips@fnet.fr
In-reply-to: Ralf Baechle's message of "Sun, 22 Aug 1999 01:33:32 +0200"
References: <u867297eol.fsf@arthur.rhein-neckar.de> <19990822013332.H25686@uni-koblenz.de>
User-agent: Gnus/5.070095 (Pterodactyl Gnus v0.95) XEmacs/21.1 (Arches)
>>>>> Ralf Baechle writes:

Ralf> On Sat, Aug 21, 1999 at 09:53:14AM +0200, Andreas Jaeger wrote:
>> Linux 2.2.11 has in include/asm-mips/signal.h:
>> 
>> #define SA_STACK        0x00000001
>> #define SA_RESETHAND    0x00000002
>> #define SA_RESTART      0x00000004
>> #define SA_SIGINFO      0x00000008
>> #define SA_NODEFER      0x00000010
>> #define SA_NOCLDWAIT    0x00010000      /* Not supported yet */
>> #define SA_NOCLDSTOP    0x00020000
>> 
>> #define SA_NOMASK       SA_NODEFER
>> #define SA_ONESHOT      SA_RESETHAND
>> 
>> but Linux 2.0.x uses:
>> 
>> #define SA_STACK        0x1
>> #define SA_ONSTACK      SA_STACK
>> #define SA_RESTART      0x4
>> #define SA_NOCLDSTOP    0x20000
>> /* Non ABI signals */
>> #define SA_INTERRUPT    0x01000000
>> #define SA_NOMASK       0x02000000
>> #define SA_ONESHOT      0x04000000
>> #define SA_SHIRQ        0x08000000
>> 
>> We now have different values for e.g.:
>> SA_ONESHOT/SA_RESETHAND (0x04000000 or 0x00000002)
>> SA_NOMASK/SA_NODEFER    (0x02000000 or 0x00000010)
>> 
>> Don't we have a compatibility problem here between Linux 2.0.x and
>> 2.2.x?  I've got to add these constants to glibc in a way that it
>> works on both platforms :-(.

Ralf> Hmm...  I just checked through my system.  The change happend in my
Ralf> commit of 2.1.76.  I think I made the change because I discovered
Ralf> that glibc and the kernel had different values for this constant, so
Ralf> if things were broken anyway I could just go ahead and use the ABI
Ralf> constants.  Something like that.
:-(

Ralf> Shouldn't the SV_* constants have the same values as their SA_*
Ralf> counterparts?

Which SV_* constants?

I fear we need to do some emulation in sigaction for the old flags to
support both Linux 2.0 and 2.2 kernels with the same glibc.

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

<Prev in Thread] Current Thread [Next in Thread>