Re: [PATCH] timers for kFreeBSD
El 26 de març de 2012 21:30, Robert Millan <email@example.com> ha escrit:
> That doesn't mean the 34..64 range is reserved AFAICT. Unless I
> missed something, when someone in upstream comes up with a new signal
> that has a specific meaning in the kernel, they will use 34 and our
> existing binaries would break.
> If we're going to abuse unreserved space, wouldn't it be safer to use
> something close to __SIGRTMIN?
> Besides, upstream explicitly reserves SIGTHR (32) for libpthread and
> SIGLIBRT (33) for librt (for the same purpose as my patch, in fact).
> Wouldn't it be less confusing if we follow upstream on this, at least
> for 32 and 33?
Actually, none of this is relevant to this patch now. My initial
version added a new signal (35) but it can be done like NPTL instead.
/* The signal used for asynchronous cancelation. */
#define SIGCANCEL __SIGRTMIN
/* Signal needed for the kernel-supported POSIX timer implementation.
We can reuse the cancellation signal since we can distinguish
cancellation from timer expirations. */
#define SIGTIMER SIGCANCEL
(for LinuxThreads, PTHREAD_SIGBASE+1 rather than __SIGRTMIN, it works fine here)