public int WaitThread(HleThread HleThread, WakeUpCallbackDelegate WakeUpCallback, int ExpectedMinimumCount) { WaitingSemaphoreThreadList.Add( new WaitingSemaphoreThread() { HleThread = HleThread, ExpectedMinimumCount = ExpectedMinimumCount, WakeUpCallback = WakeUpCallback, } ); return UpdatedCurrentCount(); }
public int WaitThread(HleThread HleThread, WakeUpCallbackDelegate WakeUpCallback, int ExpectedMinimumCount) { WaitingSemaphoreThreadList.Add( new WaitingSemaphoreThread() { HleThread = HleThread, ExpectedMinimumCount = ExpectedMinimumCount, WakeUpCallback = WakeUpCallback, } ); return(UpdatedCurrentCount()); }
public void Receive(PspPointer* PointerToMessage, WakeUpCallbackDelegate WakeUpCallback) { lock (this) { Action Extract = () => { *PointerToMessage = Messages.Last.Value; Messages.RemoveLast(); if (WakeUpCallback != null) WakeUpCallback(); }; ExtractQueue.Enqueue(Extract); CheckQueue(); } }