The last argument to atomic_testandset/clear_long should be the bit position in the long, not full bitset index.
This completes a fix for 942951ba46ecd5ebab18de006a24dc52e2d3f745 started in D27886.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Actually atomic(9) says that it will do the mod:
atomic_testandset(p, v) bit = 1 << (v % (sizeof(*p) * NBBY)); tmp = (*p & bit) != 0; *p |= bit; return (tmp);