libc: Fix the definition of SIGRTMAX
After this change, SIGRTMAX will be set to 64 (instead of 32 currently). Note that this doesn't change the fact that our sigset_t is still defined as a 32-bit unsigned integer, so most functions that deal with this type won't support real-time signals though. Change-Id: Ie1e2f97d646f1664f05a0ac9cac4a43278c3cfa8
This commit is contained in:
parent
be5755969d
commit
5c8c00a95a
@ -1858,7 +1858,13 @@ int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
|
|||||||
*/
|
*/
|
||||||
int ret, old_errno = errno;
|
int ret, old_errno = errno;
|
||||||
|
|
||||||
ret = __rt_sigprocmask(how, set, oset, _NSIG / 8);
|
/* Use NSIG which corresponds to the number of signals in
|
||||||
|
* our 32-bit sigset_t implementation. As such, this function, or
|
||||||
|
* anything that deals with sigset_t cannot manage real-time signals
|
||||||
|
* (signo >= 32). We might want to introduce sigset_rt_t as an
|
||||||
|
* extension to do so in the future.
|
||||||
|
*/
|
||||||
|
ret = __rt_sigprocmask(how, set, oset, NSIG / 8);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
ret = errno;
|
ret = errno;
|
||||||
|
|
||||||
|
@ -16,6 +16,9 @@ Differences between current and Android 2.3:
|
|||||||
|
|
||||||
- <unistd.h>: Add ftruncate64().
|
- <unistd.h>: Add ftruncate64().
|
||||||
|
|
||||||
|
- <signal.h>: Changed the definition of SIGRTMAX to 64. However, note that
|
||||||
|
sigset_t is only 32-bit and cannot deal with real-time signals.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Differences between Android 2.3 and Android 2.2:
|
Differences between Android 2.3 and Android 2.2:
|
||||||
|
|
||||||
|
@ -42,12 +42,15 @@ __BEGIN_DECLS
|
|||||||
|
|
||||||
typedef int sig_atomic_t;
|
typedef int sig_atomic_t;
|
||||||
|
|
||||||
/* crepy NIG / _NSIG handling, just to be safe */
|
/* _NSIG is used by the SIGRTMAX definition under <asm/signal.h>, however
|
||||||
#ifndef NSIG
|
* its definition is part of a #if __KERNEL__ .. #endif block in the original
|
||||||
# define NSIG _NSIG
|
* kernel headers and is thus not part of our cleaned-up versions.
|
||||||
#endif
|
*
|
||||||
|
* Looking at the current kernel sources, it is defined as 64 for all
|
||||||
|
* architectures except for the 'mips' one which set it to 128.
|
||||||
|
*/
|
||||||
#ifndef _NSIG
|
#ifndef _NSIG
|
||||||
# define _NSIG NSIG
|
# define _NSIG 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const char * const sys_siglist[];
|
extern const char * const sys_siglist[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user