|
|
|
|
|
by haberman
3962 days ago
|
|
> A nice simplification of would be to use the current CPU number as your ID. I don't think that works unfortunately. The thread could be rescheduled on a different CPU in the middle of the read-side critical section. When the critical section is exited, it will decrement a different counter. Scan() will wait until every counter is zero, but this will never happen unless another critical section is also rescheduled in the reverse order. |
|