vbox6: implement SUPSemEventMulti*() functions

Issue #4313
This commit is contained in:
Alexander Boettcher 2021-10-20 15:56:47 +02:00 committed by Christian Helmuth
parent 28db5cadee
commit 68878ca98a

View File

@ -81,28 +81,41 @@ int SUPSemEventMultiCreate(PSUPDRVSESSION pSession,
{
AssertPtrReturn(phEventMulti, VERR_INVALID_POINTER);
return RTSemEventMultiCreate((RTSEMEVENTMULTI*)phEventMulti);
return RTSemEventMultiCreate((RTSEMEVENTMULTI *)phEventMulti);
}
int SUPSemEventMultiClose(PSUPDRVSESSION pSession,
SUPSEMEVENTMULTI hEventMulti)
{
return RTSemEventMultiDestroy(reinterpret_cast<RTSEMEVENTMULTI>(hEventMulti));
return RTSemEventMultiDestroy((RTSEMEVENTMULTI)hEventMulti);
}
int SUPSemEventMultiSignal(PSUPDRVSESSION pSession,
SUPSEMEVENTMULTI hEventMulti) STOP
SUPSEMEVENTMULTI hEventMulti)
{
return RTSemEventMultiSignal((RTSEMEVENTMULTI)hEventMulti);
}
int SUPSemEventMultiReset(PSUPDRVSESSION pSession,
SUPSEMEVENTMULTI hEventMulti) STOP
SUPSEMEVENTMULTI hEventMulti)
{
return RTSemEventMultiReset((RTSEMEVENTMULTI)hEventMulti);
}
int SUPSemEventMultiWaitNoResume(PSUPDRVSESSION pSession,
SUPSEMEVENTMULTI hEventMulti,
uint32_t cMillies) STOP
uint32_t cMillies)
{
uint32_t fFlags = RTSEMWAIT_FLAGS_RELATIVE | RTSEMWAIT_FLAGS_MILLISECS | RTSEMWAIT_FLAGS_INTERRUPTIBLE;
if (cMillies == RT_INDEFINITE_WAIT)
fFlags |= RTSEMWAIT_FLAGS_INDEFINITE;
return RTSemEventMultiWaitEx((RTSEMEVENTMULTI)hEventMulti, fFlags, cMillies);
}
int SUPSemEventMultiWaitNsAbsIntr(PSUPDRVSESSION pSession,
@ -112,7 +125,10 @@ int SUPSemEventMultiWaitNsAbsIntr(PSUPDRVSESSION pSession,
int SUPSemEventMultiWaitNsRelIntr(PSUPDRVSESSION pSession,
SUPSEMEVENTMULTI hEventMulti,
uint64_t cNsTimeout) STOP
uint64_t cNsTimeout)
{
return RTSemEventMultiWaitNoResume((RTSEMEVENTMULTI)hEventMulti, cNsTimeout/1'000'000);
}
uint32_t SUPSemEventMultiGetResolution(PSUPDRVSESSION pSession)