static int qemu_signalfd_compat(const sigset_t *mask)

{

    pthread_attr_t attr;

    pthread_t tid;

    struct sigfd_compat_info *info;

    int fds[2];



    info = malloc(sizeof(*info));

    if (info == NULL) {

        errno = ENOMEM;

        return -1;

    }



    if (pipe(fds) == -1) {

        free(info);

        return -1;

    }



    memcpy(&info->mask, mask, sizeof(*mask));

    info->fd = fds[1];



    pthread_attr_init(&attr);

    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);



    pthread_create(&tid, &attr, sigwait_compat, info);



    pthread_attr_destroy(&attr);



    return fds[0];

}

static int qemu_signalfd_compat(const sigset_t *mask)

{

    pthread_attr_t attr;

    pthread_t tid;

    struct sigfd_compat_info *info;

    int fds[2];



    info = malloc(sizeof(*info));

    if (info == NULL) {

        errno = ENOMEM;

        return -1;

    }



    if (pipe(fds) == -1) {

        free(info);

        return -1;

    }



    memcpy(&info->mask, mask, sizeof(*mask));

    info->fd = fds[1];



    pthread_attr_init(&attr);

    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);



    pthread_create(&tid, &attr, sigwait_compat, info);



    pthread_attr_destroy(&attr);



    return fds[0];

}

static int qemu_signalfd_compat(const sigset_t *mask)     pthread_attr_t attr;     pthread_t tid;     struct sigfd_compat_info *info;     int fds[2];     info = malloc(sizeof(*info));     if (info == NULL) {         errno = ENOMEM;         return -1;     if (pipe(fds) == -1) {         free(info);         return -1;     memcpy(&info->mask, mask, sizeof(*mask));     info->fd = fds[1];     pthread_attr_init(&attr);     pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);     pthread_create(&tid, &attr, sigwait_compat, info);     pthread_attr_destroy(&attr);     return fds[0];
static int FUNC_0(const sigset_t *VAR_0)

{

    pthread_attr_t attr;

    pthread_t tid;

    struct sigfd_compat_info *VAR_1;

    int VAR_2[2];



    VAR_1 = malloc(sizeof(*VAR_1));

    if (VAR_1 == NULL) {

        errno = ENOMEM;

        return -1;

    }



    if (pipe(VAR_2) == -1) {

        free(VAR_1);

        return -1;

    }



    memcpy(&VAR_1->VAR_0, VAR_0, sizeof(*VAR_0));

    VAR_1->fd = VAR_2[1];



    pthread_attr_init(&attr);

    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);



    pthread_create(&tid, &attr, sigwait_compat, VAR_1);



    pthread_attr_destroy(&attr);



    return VAR_2[0];

}

static int FUNC_0(const sigset_t *VAR_0)
{ pthread_attr_t attr; pthread_t tid; struct sigfd_compat_info *VAR_1; int VAR_2[2]; VAR_1 = malloc(sizeof(*VAR_1)); if (VAR_1 == NULL) { errno = ENOMEM; return -1; } if (pipe(VAR_2) == -1) { free(VAR_1); return -1; } memcpy(&VAR_1->VAR_0, VAR_0, sizeof(*VAR_0)); VAR_1->fd = VAR_2[1]; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_create(&tid, &attr, sigwait_compat, VAR_1); pthread_attr_destroy(&attr); return VAR_2[0]; }