umtx_frop_pi will be used by Linux emulation layer.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/kern/kern_umtx.c | ||
---|---|---|
2100 | If exposing such function as the generic KPI, we should assert there that key is locked and busy. For that, you need to add corresponding primitives. |
sys/kern/kern_umtx.c | ||
---|---|---|
2107 | Shouldn't #endif go before this line? Otherwise uc is not defined. It might be better to define some helper e.g. UMTXQ_ASSERT_LOCKED_BUSY(key) and expand it into block as you write for INVARIANTS, otherwise keep it empty. |
sys/kern/kern_umtx.c | ||
---|---|---|
2105 | No, pass the key to UMTXQ_LOCKED_ASSERT_BUSY(), so that the INVARIANTS block above is not needed. |
sys/kern/kern_umtx.c | ||
---|---|---|
93 | arg should be key and not uc | |
99 | This is better, but please do #ifdef INVARIANTS #define UMTXQ_ASSERT_LOCKED_BUSY(key) <your definition> #else #define UMTXQ_ASSERT_LOCKED_BUSY(key) do {} while (0) #endif So that uc is not calculated for !INVARIANTS case. Also note a suggested name change |
sys/kern/kern_umtx.c | ||
---|---|---|
94 | UMTXQ_ASSERT_LOCKED_BUSY |
Are you suggesting to call UMTXQ_ASSERT_LOCKED_BUSY() by UMTXQ_LOCKED_ASSERT() instead? The assert does both lock and busy checks, so IMO the longer name is more correct.
no, I prefer to follow to the same style in code, naming, etc, that's why i named the macro like UMTXQ_LOCKED_ASSERT_BUSY. Thank you for your patience ))