1 /* $Id: RTSemEventWaitNoResume-2-ex-generic.cpp $ */
3 * IPRT - RTSemEventWaitNoResume, generic implementation based
8 * Copyright (C) 2010-2017 Oracle Corporation
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 * The contents of this file may alternatively be used under the terms
19 * of the Common Development and Distribution License Version 1.0
20 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
21 * VirtualBox OSE distribution, in which case the provisions of the
22 * CDDL are applicable instead of those of the GPL.
24 * You may elect to license modified versions of this file under the
25 * terms and conditions of either the GPL or the CDDL or both.
29 /*********************************************************************************************************************************
31 *********************************************************************************************************************************/
32 #define LOG_GROUP RTLOGGROUP_SEM
33 #define RTSEMEVENT_WITHOUT_REMAPPING
34 #include <iprt/semaphore.h>
35 #include "internal/iprt.h"
38 #include <iprt/assert.h>
41 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem
, RTMSINTERVAL cMillies
)
44 if (cMillies
== RT_INDEFINITE_WAIT
)
45 rc
= RTSemEventWaitEx(hEventSem
, RTSEMWAIT_FLAGS_NORESUME
| RTSEMWAIT_FLAGS_INDEFINITE
, 0);
47 rc
= RTSemEventWaitEx(hEventSem
,
48 RTSEMWAIT_FLAGS_NORESUME
| RTSEMWAIT_FLAGS_RELATIVE
| RTSEMWAIT_FLAGS_MILLISECS
,
52 RT_EXPORT_SYMBOL(RTSemEventWaitNoResume
);