Ignore:
Timestamp:
Jan 4, 2011, 1:31:59 AM (9 years ago)
Author:
gb
Message:

Android wants to pretend that Linux only supports 32 traditional
signals (and doesn't support RT signals.) Use traditional (non-RT)
signal numbers for CCL (so no #$SIGUSR2 for user code.)

That's bad enough, but they define #_pthread_sigmask in terms
of #_rt_sigprocmask, and get it wrong: #_pthread_sigmask always
fails. It's possible to waste lots of time tracking this down,
but it's been known for a long time:

<http://markmail.org/message/s657k4ogn7qtqghp#query:+page:1+mid:s657k4ogn7qtqghp+state:results>

Sadly, poor little Google can't afford to hire people who know
what they're doing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/arm-exceptions.c

    r14545 r14549  
    4343#include <sysexits.h>
    4444
     45
    4546/* a distinguished UUO at a distinguished address */
    4647extern void pseudo_sigreturn(ExceptionInformation *);
     
    5051#include "threads.h"
    5152
     53#ifdef ANDROID
     54#define pthread_sigmask(how,in,out) rt_sigprocmask(how,in,out,8)
     55#endif
    5256
    5357#ifdef LINUX
     
    13371341exit_signal_handler(TCR *tcr, int old_valence, natural old_last_lisp_frame)
    13381342{
     1343#ifndef ANDROID
    13391344  sigset_t mask;
    13401345  sigfillset(&mask);
     1346#else
     1347  int mask [] = {0,0};
     1348#endif
    13411349 
    1342   pthread_sigmask(SIG_SETMASK,&mask, NULL);
     1350  pthread_sigmask(SIG_SETMASK,(sigset_t *)&mask, NULL);
    13431351  tcr->valence = old_valence;
    13441352  tcr->pending_exception_context = NULL;
     
    17561764{
    17571765  struct sigaction sa;
     1766
     1767  sigfillset(&sa.sa_mask);
    17581768 
    17591769  sa.sa_sigaction = (void *)handler;
     
    17611771  sa.sa_flags =
    17621772    0 /* SA_RESTART */
     1773    | SA_NODEFER
    17631774    | SA_SIGINFO
    17641775#ifdef USE_SIGALTSTACK
     
    18201831  TCR *tcr = get_tcr(false);
    18211832  area *a;
     1833#ifndef ANDROID
    18221834  sigset_t mask;
    18231835 
    18241836  sigemptyset(&mask);
     1837#else
     1838  int mask[] = {0,0};
     1839#endif
    18251840
    18261841  if (tcr) {
     
    18361851  }
    18371852 
    1838   pthread_sigmask(SIG_SETMASK,&mask,NULL);
     1853  pthread_sigmask(SIG_SETMASK,(sigset_t *)&mask,NULL);
    18391854  pthread_exit(NULL);
    18401855}
Note: See TracChangeset for help on using the changeset viewer.