Revision 3b46e624 linux-user/signal.c

b/linux-user/signal.c
108 108
    int i;
109 109
    unsigned long sigmask;
110 110
    uint32_t target_sigmask;
111
   
111

  
112 112
    sigmask = ((unsigned long *)s)[0];
113 113
    target_sigmask = 0;
114 114
    for(i = 0; i < 32; i++) {
......
171 171
        s1.sig[i] = tswapl(s->sig[i]);
172 172
    target_to_host_sigset_internal(d, &s1);
173 173
}
174
   
174

  
175 175
void host_to_target_old_sigset(target_ulong *old_sigset,
176 176
                               const sigset_t *sigset)
177 177
{
......
274 274
        j = host_to_target_signal_table[i];
275 275
        target_to_host_signal_table[j] = i;
276 276
    }
277
       
277

  
278 278
    /* set all host signal handlers. ALL signals are blocked during
279 279
       the handlers to serialize them. */
280 280
    sigfillset(&act.sa_mask);
......
283 283
    for(i = 1; i < NSIG; i++) {
284 284
        sigaction(i, &act, NULL);
285 285
    }
286
   
286

  
287 287
    memset(sigact_table, 0, sizeof(sigact_table));
288 288

  
289 289
    first_free = &sigqueue_table[0];
......
865 865

  
866 866
    target_to_host_sigset_internal(&set, &target_set);
867 867
    sigprocmask(SIG_SETMASK, &set, NULL);
868
   
868

  
869 869
    /* restore registers */
870 870
    if (restore_sigcontext(env, &frame->sc, &eax))
871 871
        goto badframe;
......
1933 1933
   	:"r" (&regs));
1934 1934
    /* Unreached */
1935 1935
#endif
1936
   
1936

  
1937 1937
    regs->PC[regs->current_tc] = regs->CP0_EPC;
1938 1938
    /* I am not sure this is right, but it seems to work
1939 1939
    * maybe a problem with nested signals ? */
......
1995 1995
    target_sigset_t target_old_set;
1996 1996
    struct emulated_sigaction *k;
1997 1997
    struct sigqueue *q;
1998
   
1998

  
1999 1999
    if (!signal_pending)
2000 2000
        return;
2001 2001

  
......
2018 2018
    k->first = q->next;
2019 2019
    if (!k->first)
2020 2020
        k->pending = 0;
2021
     
2021

  
2022 2022
    sig = gdb_handlesig (cpu_env, sig);
2023 2023
    if (!sig) {
2024 2024
        fprintf (stderr, "Lost signal\n");
......
2044 2044
           blocked during the handler */
2045 2045
        if (!(k->sa.sa_flags & TARGET_SA_NODEFER))
2046 2046
            sigaddset(&set, target_to_host_signal(sig));
2047
       
2047

  
2048 2048
        /* block signals in the handler using Linux */
2049 2049
        sigprocmask(SIG_BLOCK, &set, &old_set);
2050 2050
        /* save the previous blocked signal state to restore it at the

Also available in: Unified diff