| 112 | } while (0) |
| 113 | |
| 114 | static bool __always_inline |
| 115 | LK_CAN_SHARE(uintptr_t x, int flags, bool fp) |
| 116 | { |
| 117 | |
| 118 | if ((x & (LK_SHARE | LK_EXCLUSIVE_WAITERS | LK_EXCLUSIVE_SPINNERS)) == |
| 119 | LK_SHARE) |
| 120 | return (true); |
| 121 | if (fp || (!(x & LK_SHARE))) |
| 122 | return (false); |
| 123 | if ((curthread->td_lk_slocks != 0 && !(flags & LK_NODDLKTREAT)) || |
| 124 | (curthread->td_pflags & TDP_DEADLKTREAT)) |
| 125 | return (true); |
| 126 | return (false); |
| 127 | } |
| 128 | |
| 129 | #define LK_TRYOP(x) \ |
| 130 | ((x) & LK_NOWAIT) |
no outgoing calls
no test coverage detected