Exemplo n.º 1
0
 public void Wait(bool allowCallbacks, int count, uint timeoutUs)
 {
     if (CurrentCount >= count)
     {
         CurrentCount -= count;
     }
     else
     {
         KThread thread = Kernel.ActiveThread;
         thread.Wait(this, count, timeoutUs, allowCallbacks);
     }
 }
Exemplo n.º 2
0
 // timeoutUs may not be right
 public void Lock(uint timeoutUs)
 {
     if (Locked == false)
     {
         Locked = true;
     }
     else
     {
         KThread thread = Kernel.ActiveThread;
         thread.Wait(this, timeoutUs);
     }
 }