qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] linux-user/signal.c: define __SIGRTMIN/MAX f


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU platforms
Date: Fri, 06 Jun 2014 11:48:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Il 06/06/2014 10:27, Riku Voipio ha scritto:
Hi,

On Wed, Jun 04, 2014 at 09:49:00AM +0200, Natanael Copa wrote:
The __SIGRTMIN and __SIGRTMAX are glibc internals and are not available
on all platforms, so we define those if they are missing. We also check
that those corresponds with the posix variables SIGRTMIN/SIGRTMAX which
may only be available during runtime.

This is needed for musl libc.

After all, the idea of asserts doesn't work on glibc it seems:

qemu-arm qemu-smoke/armel/busybox ls -ld .
qemu-arm: linux-user/signal.c:393: signal_init: Assertion `32 == 
(__libc_current_sigrtmin ())' failed.
Aborted

Quick test on my amd64/glibc 2.18 system:

printf("RTMIN: %d RTMAX: %d\n", SIGRTMIN, SIGRTMAX);
RTMIN: 34 RTMAX: 64

While: /usr/include/bits/signum.h
#define __SIGRTMIN  32

That's because glibc reserves two signals (one for cancellation, the other to implement set*id system calls). Basically you'd need to extend the hack of host_to_target_signal_table to all signals in the [__SIGRTMIN, SIGRTMIN) range, computing the table at run-time.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]