semeventmulti-r0drv-os2.cpp revision 881b5ff6bc55e1fb0f4ef42f9782ccec79c0a138
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * InnoTek Portable Runtime - Multiple Release Event Semaphores, Ring-0 Driver, OS/2.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Permission is hereby granted, free of charge, to any person
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * obtaining a copy of this software and associated documentation
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * files (the "Software"), to deal in the Software without
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * restriction, including without limitation the rights to use,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * copy, modify, merge, publish, distribute, sublicense, and/or sell
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * copies of the Software, and to permit persons to whom the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Software is furnished to do so, subject to the following
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * conditions:
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * The above copyright notice and this permission notice shall be
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * included in all copies or substantial portions of the Software.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * OTHER DEALINGS IN THE SOFTWARE.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/*******************************************************************************
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync* Header Files *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync*******************************************************************************/
typedef struct RTSEMEVENTMULTIINTERNAL
PRTSEMEVENTMULTIINTERNAL pEventMultiInt = (PRTSEMEVENTMULTIINTERNAL)RTMemAlloc(sizeof(*pEventMultiInt));
if (pEventMultiInt)
return VINF_SUCCESS;
return VERR_NO_MEMORY;
return VERR_INVALID_HANDLE;
KernWakeup((ULONG)pEventMultiInt, WAKEUP_DATA | WAKEUP_BOOST, &cThreads, (ULONG)VERR_SEM_DESTROYED);
return VINF_SUCCESS;
return VINF_SUCCESS;
return VINF_SUCCESS;
static int rtSemEventMultiWait(RTSEMEVENTMULTI EventMultiSem, unsigned cMillies, bool fInterruptible)
int rc;
&ulData);
switch (rc)
case NO_ERROR:
return VINF_SUCCESS;
case ERROR_TIMEOUT:
case ERROR_INTERRUPT:
return rc;