static void host_signal_handler(int host_signum, siginfo_t *info,

                                void *puc)

{

    int sig;

    target_siginfo_t tinfo;



    /* the CPU emulator uses some host signals to detect exceptions,

       we forward to it some signals */

    if ((host_signum == SIGSEGV || host_signum == SIGBUS)

        && info->si_code > 0) {

        if (cpu_signal_handler(host_signum, info, puc))

            return;

    }



    /* get target signal number */

    sig = host_to_target_signal(host_signum);

    if (sig < 1 || sig > TARGET_NSIG)

        return;

#if defined(DEBUG_SIGNAL)

    fprintf(stderr, "qemu: got signal %d\n", sig);

#endif

    host_to_target_siginfo_noswap(&tinfo, info);

    if (queue_signal(thread_env, sig, &tinfo) == 1) {

        /* interrupt the virtual CPU as soon as possible */

        cpu_interrupt(thread_env, CPU_INTERRUPT_EXIT);

    }

}

static void host_signal_handler(int host_signum, siginfo_t *info,

                                void *puc)

{

    int sig;

    target_siginfo_t tinfo;



    



    if ((host_signum == SIGSEGV || host_signum == SIGBUS)

        && info->si_code > 0) {

        if (cpu_signal_handler(host_signum, info, puc))

            return;

    }



    

    sig = host_to_target_signal(host_signum);

    if (sig < 1 || sig > TARGET_NSIG)

        return;

#if defined(DEBUG_SIGNAL)

    fprintf(stderr, "qemu: got signal %d\n", sig);

#endif

    host_to_target_siginfo_noswap(&tinfo, info);

    if (queue_signal(thread_env, sig, &tinfo) == 1) {

        

        cpu_interrupt(thread_env, CPU_INTERRUPT_EXIT);

    }

}

static void FUNC_0(int VAR_0, siginfo_t *VAR_1,

                                void *VAR_2)

{

    int VAR_3;

    target_siginfo_t tinfo;



    



    if ((VAR_0 == SIGSEGV || VAR_0 == SIGBUS)

        && VAR_1->si_code > 0) {

        if (cpu_signal_handler(VAR_0, VAR_1, VAR_2))

            return;

    }



    

    VAR_3 = host_to_target_signal(VAR_0);

    if (VAR_3 < 1 || VAR_3 > TARGET_NSIG)

        return;

#if defined(DEBUG_SIGNAL)

    fprintf(stderr, "qemu: got signal %d\n", VAR_3);

#endif

    host_to_target_siginfo_noswap(&tinfo, VAR_1);

    if (queue_signal(thread_env, VAR_3, &tinfo) == 1) {

        

        cpu_interrupt(thread_env, CPU_INTERRUPT_EXIT);

    }

}

static void FUNC_0(int VAR_0, siginfo_t *VAR_1,
void *VAR_2)
{ int VAR_3; target_siginfo_t tinfo; if ((VAR_0 == SIGSEGV || VAR_0 == SIGBUS)
&& VAR_1->si_code > 0) { if (cpu_signal_handler(VAR_0, VAR_1, VAR_2))
return; } VAR_3 = host_to_target_signal(VAR_0); if (VAR_3 < 1 || VAR_3 > TARGET_NSIG)
return; #if defined(DEBUG_SIGNAL)
fprintf(stderr, "qemu: got signal %d\n", VAR_3); #endif
host_to_target_siginfo_noswap(&tinfo, VAR_1); if (queue_signal(thread_env, VAR_3, &tinfo) == 1) { cpu_interrupt(thread_env, CPU_INTERRUPT_EXIT); } }