void qemu_mutex_init(QemuMutex *mutex)

{

    int err;

    pthread_mutexattr_t mutexattr;



    pthread_mutexattr_init(&mutexattr);

    pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_ERRORCHECK);

    err = pthread_mutex_init(&mutex->lock, &mutexattr);

    pthread_mutexattr_destroy(&mutexattr);

    if (err)

        error_exit(err, __func__);

}

void qemu_mutex_init(QemuMutex *mutex)

{

    int err;

    pthread_mutexattr_t mutexattr;



    pthread_mutexattr_init(&mutexattr);

    pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_ERRORCHECK);

    err = pthread_mutex_init(&mutex->lock, &mutexattr);

    pthread_mutexattr_destroy(&mutexattr);

    if (err)

        error_exit(err, __func__);

}

    pthread_mutexattr_t mutexattr;     pthread_mutexattr_init(&mutexattr);     pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_ERRORCHECK);     err = pthread_mutex_init(&mutex->lock, &mutexattr);     pthread_mutexattr_destroy(&mutexattr);
void FUNC_0(QemuMutex *VAR_0)

{

    int VAR_1;

    pthread_mutexattr_t mutexattr;



    pthread_mutexattr_init(&mutexattr);

    pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_ERRORCHECK);

    VAR_1 = pthread_mutex_init(&VAR_0->lock, &mutexattr);

    pthread_mutexattr_destroy(&mutexattr);

    if (VAR_1)

        error_exit(VAR_1, __func__);

}

void FUNC_0(QemuMutex *VAR_0)
{ int VAR_1; pthread_mutexattr_t mutexattr; pthread_mutexattr_init(&mutexattr); pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_ERRORCHECK); VAR_1 = pthread_mutex_init(&VAR_0->lock, &mutexattr); pthread_mutexattr_destroy(&mutexattr); if (VAR_1)
error_exit(VAR_1, __func__); }