Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| share/man/man9/locking.9 | ||
|---|---|---|
| 227 | No, it is worse. Sleeps are normally used with an interlock, while locking primitives use their thread lock. As result, the sleepq code rightfully asserts, see the sleepq_add() branch for sq != NULL. | |
| share/man/man9/locking.9 | ||
|---|---|---|
| 227 | Hmm, ok. It is a somewhat subtle constraint, e.g., one might put a sx at the beginning of a structure, and then the structure address cannot be used as a wait channel. (The sx implementation uses &sx->lock_object as the internal wait channel, which is the same as sx.) | |
| share/man/man9/locking.9 | ||
|---|---|---|
| 227 | This is exactly how the thing beat me, and it took some efforts to realize the cause. So I prefer to keep it in the documentation. | |
| share/man/man9/locking.9 | ||
|---|---|---|
| 227 | We could modify the sx implementation to use &sx->sx_lock as the wait channel instead, to make this scenario less likely. But sure, it is useful to document this anyway. | |