Skip to content

Instantly share code, notes, and snippets.

@Subv
Created May 26, 2015 00:17
Show Gist options
  • Select an option

  • Save Subv/680d7cce5c72a3c2ed7a to your computer and use it in GitHub Desktop.

Select an option

Save Subv/680d7cce5c72a3c2ed7a to your computer and use it in GitHub Desktop.
EV = Event
T1.P = 0x1F
T2.P = 0x21
T3.P = 0x20
T2.Wait(EV)
T3.Wait(EV)
T1.Signal(EV)
T1.Wait(T2)
T1.Wait(T3)
Who runs?
-----------------------------
T2.Wait(EV)
T3.Wait(EV)
T1.Signal(EV)
T1.Wait(EV)
T1.Wait(T2)
T1.Wait(T3)
What happens?
Does the event get locked immediately after waking one of the threads, or does it wait until one of them runs?
-----------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment