<Member Name="Close" />
<Member Name="Dispose" />
<Member Name="Dispose(System.Boolean)" />
+ <Member Name="get_Handle" />
+ <Member Name="set_Handle(System.IntPtr)" />
<Member Name="get_SafeWaitHandle" />
<Member Name="set_SafeWaitHandle(Microsoft.Win32.SafeHandles.SafeWaitHandle)" />
+ <Member Name="SignalAndWait(System.Threading.WaitHandle,System.Threading.WaitHandle)" />
+ <Member Name="SignalAndWait(System.Threading.WaitHandle,System.Threading.WaitHandle,System.Int32,System.Boolean)" />
+ <Member Name="SignalAndWait(System.Threading.WaitHandle,System.Threading.WaitHandle,System.TimeSpan,System.Boolean)" />
<Member Name="WaitAny(System.Threading.WaitHandle[])" />
<Member Name="WaitAny(System.Threading.WaitHandle[],System.Int32)" />
+ <Member Name="WaitAny(System.Threading.WaitHandle[],System.Int32,System.Boolean)" />
<Member Name="WaitAny(System.Threading.WaitHandle[],System.TimeSpan)" />
+ <Member Name="WaitAny(System.Threading.WaitHandle[],System.TimeSpan,System.Boolean)" />
<Member Name="WaitAll(System.Threading.WaitHandle[])" />
<Member Name="WaitAll(System.Threading.WaitHandle[],System.Int32)" />
+ <Member Name="WaitAll(System.Threading.WaitHandle[],System.Int32,System.Boolean)" />
<Member Name="WaitAll(System.Threading.WaitHandle[],System.TimeSpan)" />
+ <Member Name="WaitAll(System.Threading.WaitHandle[],System.TimeSpan,System.Boolean)" />
<Member Name="WaitOne" />
<Member Name="WaitOne(System.Int32)" />
+ <Member Name="WaitOne(System.Int32,System.Boolean)" />
<Member Name="WaitOne(System.TimeSpan)" />
+ <Member Name="WaitOne(System.TimeSpan,System.Boolean)" />
<Member MemberType="Property" Name="SafeWaitHandle" />
</Type>
<Type Name="System.Threading.WaitHandleExtensions">
protected static readonly System.IntPtr InvalidHandle;
public const int WaitTimeout = 258;
protected WaitHandle() { }
+ [System.ObsoleteAttribute("Use the SafeWaitHandle property instead.")]
+ public virtual System.IntPtr Handle { [System.Security.SecuritySafeCriticalAttribute]get { return default(System.IntPtr); } [System.Security.SecurityCriticalAttribute]set { } }
public Microsoft.Win32.SafeHandles.SafeWaitHandle SafeWaitHandle { [System.Security.SecurityCriticalAttribute]get { throw null; } [System.Security.SecurityCriticalAttribute]set { } }
public virtual void Close() { }
public void Dispose() { }
[System.Security.SecuritySafeCriticalAttribute]
protected virtual void Dispose(bool explicitDisposing) { }
+ public static bool SignalAndWait(System.Threading.WaitHandle toSignal, System.Threading.WaitHandle toWaitOn) { return default(bool); }
+ public static bool SignalAndWait(System.Threading.WaitHandle toSignal, System.Threading.WaitHandle toWaitOn, int millisecondsTimeout, bool exitContext) { return default(bool); }
+ public static bool SignalAndWait(System.Threading.WaitHandle toSignal, System.Threading.WaitHandle toWaitOn, System.TimeSpan timeout, bool exitContext) { return default(bool); }
public static bool WaitAll(System.Threading.WaitHandle[] waitHandles) { throw null; }
public static bool WaitAll(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout) { throw null; }
+ public static bool WaitAll(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) { return default(bool); }
public static bool WaitAll(System.Threading.WaitHandle[] waitHandles, System.TimeSpan timeout) { throw null; }
+ public static bool WaitAll(System.Threading.WaitHandle[] waitHandles, System.TimeSpan timeout, bool exitContext) { return default(bool); }
public static int WaitAny(System.Threading.WaitHandle[] waitHandles) { throw null; }
public static int WaitAny(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout) { throw null; }
+ public static int WaitAny(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) { return default(int); }
public static int WaitAny(System.Threading.WaitHandle[] waitHandles, System.TimeSpan timeout) { throw null; }
+ public static int WaitAny(System.Threading.WaitHandle[] waitHandles, System.TimeSpan timeout, bool exitContext) { return default(int); }
public virtual bool WaitOne() { throw null; }
public virtual bool WaitOne(int millisecondsTimeout) { throw null; }
+ public virtual bool WaitOne(int millisecondsTimeout, bool exitContext) { return default(bool); }
public virtual bool WaitOne(System.TimeSpan timeout) { throw null; }
+ public virtual bool WaitOne(System.TimeSpan timeout, bool exitContext) { return default(bool); }
}
[System.Runtime.InteropServices.ComVisibleAttribute(false)]
public partial class WaitHandleCannotBeOpenedException : System.Exception
Argument_ResourceScopeWrongDirection = Resource type in the ResourceScope enum is going from a more restrictive resource type to a more general one. From: "{0}" To: "{1}"
Argument_BadResourceScopeTypeBits = Unknown value for the ResourceScope: {0} Too many resource type bits may be set.
Argument_BadResourceScopeVisibilityBits = Unknown value for the ResourceScope: {0} Too many resource visibility bits may be set.
-Argument_WaitHandleNameTooLong = The name can be no more than 260 characters in length.
+Argument_WaitHandleNameTooLong = The name can be no more than {0} characters in length.
Argument_EnumTypeDoesNotMatch = The argument type, '{0}', is not the same as the enum type '{1}'.
InvalidOperation_MethodBuilderBaked = The signature of the MethodBuilder can no longer be modified because an operation on the MethodBuilder caused the methodDef token to be created. For example, a call to SetCustomAttribute requires the methodDef token to emit the CustomAttribute token.
InvalidOperation_GenericParametersAlreadySet = The generic parameters are already defined on this MethodBuilder.
#else
if (System.IO.Path.MaxPath < name.Length)
{
- throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong", name));
+ throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong", Path.MaxPath), "name");
}
#endif
}
#else
if (System.IO.Path.MaxPath < name.Length)
{
- throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong", name));
+ throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong", Path.MaxPath), "name");
}
#endif
}
if(null != name && System.IO.Path.MaxPath < name.Length)
{
- throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong",name));
+ throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong", Path.MaxPath), "name");
}
Contract.EndContractBlock();
#if PLATFORM_UNIX
throw new PlatformNotSupportedException(Environment.GetResourceString("PlatformNotSupported_NamedSynchronizationPrimitives"));
#else
- if (name.Length > Path.MAX_PATH)
- throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong", name));
+ if (name.Length > Path.MaxPath)
+ throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong", Path.MaxPath), "name");
#endif
}
throw new ArgumentNullException("name", Environment.GetResourceString("ArgumentNull_WithParamName"));
if (name.Length == 0)
throw new ArgumentException(Environment.GetResourceString("Argument_EmptyName"), "name");
- if (name.Length > Path.MAX_PATH)
- throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong", name));
-
+ if (name.Length > Path.MaxPath)
+ throw new ArgumentException(Environment.GetResourceString("Argument_WaitHandleNameTooLong", Path.MaxPath), "name");
+
const int SYNCHRONIZE = 0x00100000;
const int SEMAPHORE_MODIFY_STATE = 0x00000002;
WaitHandle toSignal,
WaitHandle toWaitOn)
{
+#if PLATFORM_UNIX
+ throw new PlatformNotSupportedException();
+#else
return SignalAndWait(toSignal,toWaitOn,-1,false);
+#endif
}
public static bool SignalAndWait(
TimeSpan timeout,
bool exitContext)
{
+#if PLATFORM_UNIX
+ throw new PlatformNotSupportedException();
+#else
long tm = (long)timeout.TotalMilliseconds;
if (-1 > tm || (long) Int32.MaxValue < tm)
{
throw new ArgumentOutOfRangeException("timeout", Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegOrNegative1"));
}
return SignalAndWait(toSignal,toWaitOn,(int)tm,exitContext);
+#endif
}
[System.Security.SecuritySafeCritical] // auto-generated
int millisecondsTimeout,
bool exitContext)
{
+#if PLATFORM_UNIX
+ throw new PlatformNotSupportedException();
+#else
if(null == toSignal)
{
throw new ArgumentNullException("toSignal");
//Timeout
return false;
+#endif
}
private static void ThrowAbandonedMutexException()
}
FCIMPLEND
-#ifndef FEATURE_CORECLR
+#ifndef FEATURE_PAL
FCIMPL5(INT32, WaitHandleNative::CorSignalAndWaitOneNative, SafeHandle* safeWaitHandleSignalUNSAFE,SafeHandle* safeWaitHandleWaitUNSAFE, INT32 timeout, CLR_BOOL hasThreadAffinity, CLR_BOOL exitContext)
{
FCALL_CONTRACT;
Context* defaultContext = pThread->GetDomain()->GetDefaultContext();
_ASSERTE(defaultContext);
+#ifndef FEATURE_CORECLR
// DoSignalAndWait calls LeaveRuntime/EnterRuntime which may cause the current
// fiber to be re-scheduled.
ThreadAffinityAndCriticalRegionHolder affinityAndCriticalRegionHolder(hasThreadAffinity);
+#endif // !FEATURE_CORECLR
SafeHandleHolder shhSignal(&shSignal);
SafeHandleHolder shhWait(&shWait);
res = pThread->DoSignalAndWait(handles,timeout,TRUE /*alertable*/);
}
+#ifndef FEATURE_CORECLR
if (res == WAIT_OBJECT_0 && hasThreadAffinity) {
affinityAndCriticalRegionHolder.SuppressRelease();
}
_ASSERTE(hasThreadAffinity);
affinityAndCriticalRegionHolder.SuppressRelease();
}
+#endif // !FEATURE_CORECLR
retVal = res;
return retVal;
}
FCIMPLEND
-#endif // !FEATURE_CORECLR
+#endif // !FEATURE_PAL
public:
static FCDECL4(INT32, CorWaitOneNative, SafeHandle* safeWaitHandleUNSAFE, INT32 timeout, CLR_BOOL hasThreadAffinity, CLR_BOOL exitContext);
static FCDECL4(INT32, CorWaitMultipleNative, Object* waitObjectsUNSAFE, INT32 timeout, CLR_BOOL exitContext, CLR_BOOL waitForAll);
-#ifndef FEATURE_CORECLR
+#ifndef FEATURE_PAL
static FCDECL5(INT32, CorSignalAndWaitOneNative, SafeHandle* safeWaitHandleSignalUNSAFE, SafeHandle* safeWaitHandleWaitUNSAFE, INT32 timeout, CLR_BOOL hasThreadAffinity, CLR_BOOL exitContext);
#endif
};
FCFuncStart(gWaitHandleFuncs)
FCFuncElement("WaitOneNative", WaitHandleNative::CorWaitOneNative)
FCFuncElement("WaitMultiple", WaitHandleNative::CorWaitMultipleNative)
-#ifndef FEATURE_CORECLR
+#ifndef FEATURE_PAL
FCFuncElement("SignalAndWaitOne", WaitHandleNative::CorSignalAndWaitOneNative)
-#endif // !FEATURE_CORECLR
+#endif // !FEATURE_PAL
FCFuncEnd()
FCFuncStart(gNumberFuncs)
return ret;
}
-#ifndef FEATURE_CORECLR
+#ifndef FEATURE_PAL
//--------------------------------------------------------------------
// Only one style of wait for DoSignalAndWait since we don't support this on STA Threads
//--------------------------------------------------------------------
return ret;
}
-#endif // FEATURE_CORECLR
+#endif // !FEATURE_PAL
#ifdef FEATURE_SYNCHRONIZATIONCONTEXT_WAIT
DWORD Thread::DoSyncContextWait(OBJECTREF *pSyncCtxObj, int countHandles, HANDLE *handles, BOOL waitAll, DWORD millis)
DWORD DoAppropriateWait(AppropriateWaitFunc func, void *args, DWORD millis,
WaitMode mode, PendingSync *syncInfo = 0);
-#ifndef FEATURE_CORECLR
+#ifndef FEATURE_PAL
DWORD DoSignalAndWait(HANDLE *handles, DWORD millis, BOOL alertable,
PendingSync *syncState = 0);
-#endif
+#endif // !FEATURE_PAL
private:
void DoAppropriateWaitWorkerAlertableHelper(WaitMode mode);
DWORD DoAppropriateWaitWorker(int countHandles, HANDLE *handles, BOOL waitAll,
DWORD millis, WaitMode mode);
DWORD DoAppropriateWaitWorker(AppropriateWaitFunc func, void *args,
DWORD millis, WaitMode mode);
-#ifndef FEATURE_CORECLR
+#ifndef FEATURE_PAL
DWORD DoSignalAndWaitWorker(HANDLE* pHandles, DWORD millis,BOOL alertable);
-#endif
+#endif // !FEATURE_PAL
DWORD DoAppropriateAptStateWait(int numWaiters, HANDLE* pHandles, BOOL bWaitAll, DWORD timeout, WaitMode mode);
#ifdef FEATURE_SYNCHRONIZATIONCONTEXT_WAIT
DWORD DoSyncContextWait(OBJECTREF *pSyncCtxObj, int countHandles, HANDLE *handles, BOOL waitAll, DWORD millis);