int qemu_mutex_trylock(QemuMutex *mutex)

{

    int owned;



    owned = TryEnterCriticalSection(&mutex->lock);

    if (owned) {

        assert(mutex->owner == 0);

        mutex->owner = GetCurrentThreadId();

    }

    return !owned;

}

int qemu_mutex_trylock(QemuMutex *mutex)

{

    int owned;



    owned = TryEnterCriticalSection(&mutex->lock);

    if (owned) {

        assert(mutex->owner == 0);

        mutex->owner = GetCurrentThreadId();

    }

    return !owned;

}

    owned = TryEnterCriticalSection(&mutex->lock);     if (owned) {         assert(mutex->owner == 0);         mutex->owner = GetCurrentThreadId();
int FUNC_0(QemuMutex *VAR_0)

{

    int VAR_1;



    VAR_1 = TryEnterCriticalSection(&VAR_0->lock);

    if (VAR_1) {

        assert(VAR_0->owner == 0);

        VAR_0->owner = GetCurrentThreadId();

    }

    return !VAR_1;

}

int FUNC_0(QemuMutex *VAR_0)
{ int VAR_1; VAR_1 = TryEnterCriticalSection(&VAR_0->lock); if (VAR_1) { assert(VAR_0->owner == 0); VAR_0->owner = GetCurrentThreadId(); } return !VAR_1; }