void sigaction_invoke(struct sigaction *action,

                      struct qemu_signalfd_siginfo *info)

{

    siginfo_t si = { 0 };

    si.si_signo = info->ssi_signo;

    si.si_errno = info->ssi_errno;

    si.si_code = info->ssi_code;



    /* Convert the minimal set of fields defined by POSIX.

     * Positive si_code values are reserved for kernel-generated

     * signals, where the valid siginfo fields are determined by

     * the signal number.  But according to POSIX, it is unspecified

     * whether SI_USER and SI_QUEUE have values less than or equal to

     * zero.

     */

    if (info->ssi_code == SI_USER || info->ssi_code == SI_QUEUE ||

        info->ssi_code <= 0) {

        /* SIGTERM, etc.  */

        si.si_pid = info->ssi_pid;

        si.si_uid = info->ssi_uid;

    } else if (info->ssi_signo == SIGILL || info->ssi_signo == SIGFPE ||

               info->ssi_signo == SIGSEGV || info->ssi_signo == SIGBUS) {

        si.si_addr = (void *)(uintptr_t)info->ssi_addr;

    } else if (info->ssi_signo == SIGCHLD) {

        si.si_pid = info->ssi_pid;

        si.si_status = info->ssi_status;

        si.si_uid = info->ssi_uid;

    }

    action->sa_sigaction(info->ssi_signo, &si, NULL);

}

void sigaction_invoke(struct sigaction *action,

                      struct qemu_signalfd_siginfo *info)

{

    siginfo_t si = { 0 };

    si.si_signo = info->ssi_signo;

    si.si_errno = info->ssi_errno;

    si.si_code = info->ssi_code;



    













    if (info->ssi_code == SI_USER || info->ssi_code == SI_QUEUE ||

        info->ssi_code <= 0) {

        

        si.si_pid = info->ssi_pid;

        si.si_uid = info->ssi_uid;

    } else if (info->ssi_signo == SIGILL || info->ssi_signo == SIGFPE ||

               info->ssi_signo == SIGSEGV || info->ssi_signo == SIGBUS) {

        si.si_addr = (void *)(uintptr_t)info->ssi_addr;

    } else if (info->ssi_signo == SIGCHLD) {

        si.si_pid = info->ssi_pid;

        si.si_status = info->ssi_status;

        si.si_uid = info->ssi_uid;

    }

    action->sa_sigaction(info->ssi_signo, &si, NULL);

}

    siginfo_t si = { 0 };
void FUNC_0(struct sigaction *VAR_0,

                      struct qemu_signalfd_siginfo *VAR_1)

{

    siginfo_t si = { 0 };

    si.si_signo = VAR_1->ssi_signo;

    si.si_errno = VAR_1->ssi_errno;

    si.si_code = VAR_1->ssi_code;



    













    if (VAR_1->ssi_code == SI_USER || VAR_1->ssi_code == SI_QUEUE ||

        VAR_1->ssi_code <= 0) {

        

        si.si_pid = VAR_1->ssi_pid;

        si.si_uid = VAR_1->ssi_uid;

    } else if (VAR_1->ssi_signo == SIGILL || VAR_1->ssi_signo == SIGFPE ||

               VAR_1->ssi_signo == SIGSEGV || VAR_1->ssi_signo == SIGBUS) {

        si.si_addr = (void *)(uintptr_t)VAR_1->ssi_addr;

    } else if (VAR_1->ssi_signo == SIGCHLD) {

        si.si_pid = VAR_1->ssi_pid;

        si.si_status = VAR_1->ssi_status;

        si.si_uid = VAR_1->ssi_uid;

    }

    VAR_0->sa_sigaction(VAR_1->ssi_signo, &si, NULL);

}

void FUNC_0(struct sigaction *VAR_0,
struct qemu_signalfd_siginfo *VAR_1)
{ siginfo_t si = { 0 }; si.si_signo = VAR_1->ssi_signo; si.si_errno = VAR_1->ssi_errno; si.si_code = VAR_1->ssi_code; if (VAR_1->ssi_code == SI_USER || VAR_1->ssi_code == SI_QUEUE ||
VAR_1->ssi_code <= 0) { si.si_pid = VAR_1->ssi_pid; si.si_uid = VAR_1->ssi_uid; } else if (VAR_1->ssi_signo == SIGILL || VAR_1->ssi_signo == SIGFPE || VAR_1->ssi_signo == SIGSEGV || VAR_1->ssi_signo == SIGBUS) { si.si_addr = (void *)(uintptr_t)VAR_1->ssi_addr; } else if (VAR_1->ssi_signo == SIGCHLD) { si.si_pid = VAR_1->ssi_pid; si.si_status = VAR_1->ssi_status; si.si_uid = VAR_1->ssi_uid; } VAR_0->sa_sigaction(VAR_1->ssi_signo, &si, NULL); }