equal
deleted
inserted
replaced
4874 // Transitions for _Event: |
4874 // Transitions for _Event: |
4875 // 0 :=> 1 |
4875 // 0 :=> 1 |
4876 // 1 :=> 1 |
4876 // 1 :=> 1 |
4877 // -1 :=> either 0 or 1; must signal target thread |
4877 // -1 :=> either 0 or 1; must signal target thread |
4878 // That is, we can safely transition _Event from -1 to either |
4878 // That is, we can safely transition _Event from -1 to either |
4879 // 0 or 1. Forcing 1 is slightly more efficient for back-to-back |
4879 // 0 or 1. |
4880 // unpark() calls. |
|
4881 // See also: "Semaphores in Plan 9" by Mullender & Cox |
4880 // See also: "Semaphores in Plan 9" by Mullender & Cox |
4882 // |
4881 // |
4883 // Note: Forcing a transition from "-1" to "1" on an unpark() means |
4882 // Note: Forcing a transition from "-1" to "1" on an unpark() means |
4884 // that it will take two back-to-back park() calls for the owning |
4883 // that it will take two back-to-back park() calls for the owning |
4885 // thread to block. This has the benefit of forcing a spurious return |
4884 // thread to block. This has the benefit of forcing a spurious return |