Re: adding extra signals for LinuxThreads (Re: Linux 2.1.69..)

H. Peter Anvin (hpa@transmeta.com)
7 Dec 1997 01:46:20 GMT


Followup to: <Pine.GSO.3.95.971206124215.23361B-100000@kielo>
By author: =?ISO-8859-1?Q?Erkki_Sepp=E4l=E4?= <es60850@uta.fi>
In newsgroup: linux.dev.kernel
>
> Hmm, I didn't think of that. But if there really is no another way to
> implement this, then this must be done sooner or later. Right?
> I don't think that adding another integer would introduce a major
> performance hit, but on the other hand, I don't know what I'm talking
> about :).
> Also I've heard that some level of posix introduces custom signals, how
> are they going to be handled? I don't know anything more about this
> matter..
>
> > There may also be binary compatibility problems to solve too.
>
> I guess that for ia32 platform there is no other way to 'blend' the code
> than to create a new system call, which accepts a 64-bit bitmask. And
> change libc too. Or maybe glibc2 already uses 64-bit masks, I don't know.
>

glibc uses a much larger mask than that. Either way, for most, but
not all platforms, there seems to be space:

i386 31; 16 is SIGSTKFLT which is never generated
alpha _NSIG is 32, but it uses 64-bit masks already so it
can be increased to 64 trivally
m68k 31, 16 (SIGSTKFLT)
mips 32-64 (yes, MIPS sets _NSIG to 65, not 64)
ppc 31, 16 (SIGSTKFLT)
sparc Trouble. Maybe we could overload SIGLOST or SIGSYS,
but I don't know. There seems to be a concept of
major and minor signal numbers on the sparc; SIGILL,
SIGEMT, SIGFPE and SIGBUS have minor numbers defined;
maybe piggybacking is possible?
sparc64 Same as sparc, but uses 64-bit masks for 64-bit
processes.

I personally don't see any problem with overloading/recycling
SIGSTKFLT if it is indeed a signal that's never used. sparc is
definitely trouble, though, but even a nonstandard signal overloading
would be better than using two signals specifically designated for the
end programmer.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables