internal static SRes Semaphore_Release1(CSemaphore p) { #if !DISABLE_TRACE Trace.MatchObjectWait(p, "Semaphore_Release"); #else p.Semaphore.Release(); #endif return(TSZ("Semaphore_Release")); }
internal static void Semaphore_Close(ref CSemaphore p) { if (p != null) { p.Semaphore.Close(); } p = null; }
internal static SRes Semaphore_Create(out CSemaphore p, uint initCount, uint maxCount) { p = new CSemaphore(); #if !DISABLE_TRACE Trace.MatchObjectCreate(p, "Semaphore_Create"); Trace.Match((int)initCount, (int)maxCount); #else p.Semaphore = new System.Threading.Semaphore(checked ((int)initCount), checked ((int)maxCount)); #endif return(TSZ("Semaphore_Create")); }
internal static void Semaphore_Close(ref CSemaphore p) { if (p != null) { #if !DISABLE_TRACE Trace.MatchObjectDestroy(p, "Semaphore_Close"); #elif BUILD_PORTABLE p.Semaphore.Dispose(); #else p.Semaphore.Close(); #endif } p = null; }
internal static SRes Semaphore_Release1(CSemaphore p) { p.Semaphore.Release(); return(TSZ("Semaphore_Release")); }
internal static SRes Semaphore_Create(out CSemaphore p, uint initCount, uint maxCount) { p = new CSemaphore(); p.Semaphore = new System.Threading.Semaphore(checked ((int)initCount), checked ((int)maxCount)); return(TSZ("Semaphore_Create")); }
internal static SRes Semaphore_Wait(CSemaphore p) { p.Semaphore.WaitOne(); return(TSZ("Semaphore_Wait")); }
internal static void Semaphore_Construct(out CSemaphore p) { p = null; }
internal static SRes Semaphore_Wait(CSemaphore p) { #if !DISABLE_TRACE Trace.MatchObjectWait(p, "Semaphore_Wait"); #else p.Semaphore.WaitOne(); #endif return TSZ("Semaphore_Wait"); }
internal static SRes Semaphore_Create(out CSemaphore p, uint initCount, uint maxCount) { p = new CSemaphore(); #if !DISABLE_TRACE Trace.MatchObjectCreate(p, "Semaphore_Create"); Trace.Match((int)initCount, (int)maxCount); #else p.Semaphore = new System.Threading.Semaphore(checked((int)initCount), checked((int)maxCount)); #endif return TSZ("Semaphore_Create"); }
internal static void Semaphore_Close(ref CSemaphore p) { if (p != null) { #if !DISABLE_TRACE Trace.MatchObjectDestroy(p, "Semaphore_Close"); #else p.Semaphore.Close(); #endif } p = null; }