Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4851d019 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 9397

* changes:
  Fix Win32 libutils to get a working SDK build.
parents f3b19c40 429db150
Loading
Loading
Loading
Loading
+18 −1
Original line number Original line Diff line number Diff line
@@ -296,6 +296,19 @@ Mutex::Mutex(const char* name)
    // XXX: name not used for now
    // XXX: name not used for now
    HANDLE hMutex;
    HANDLE hMutex;


    assert(sizeof(hMutex) == sizeof(mState));

    hMutex = CreateMutex(NULL, FALSE, NULL);
    mState = (void*) hMutex;
}

Mutex::Mutex(int type, const char* name)
{
    // XXX: type and name not used for now
    HANDLE hMutex;

    assert(sizeof(hMutex) == sizeof(mState));

    hMutex = CreateMutex(NULL, FALSE, NULL);
    hMutex = CreateMutex(NULL, FALSE, NULL);
    mState = (void*) hMutex;
    mState = (void*) hMutex;
}
}
@@ -486,7 +499,11 @@ status_t Condition::wait(Mutex& mutex)


status_t Condition::waitRelative(Mutex& mutex, nsecs_t reltime)
status_t Condition::waitRelative(Mutex& mutex, nsecs_t reltime)
{
{
    return wait(mutex, systemTime()+reltime);
    WinCondition* condState = (WinCondition*) mState;
    HANDLE hMutex = (HANDLE) mutex.mState;
    nsecs_t absTime = systemTime()+reltime;

    return ((WinCondition*)mState)->wait(condState, hMutex, &absTime);
}
}


/*
/*