| 162 | #endif |
| 163 | |
| 164 | void |
| 165 | ff_rw_init_flags(struct lock_object *lo, const char *name, int opts) |
| 166 | { |
| 167 | int flags; |
| 168 | |
| 169 | MPASS((opts & ~(RW_DUPOK | RW_NOPROFILE | RW_NOWITNESS | RW_QUIET | |
| 170 | RW_RECURSE)) == 0); |
| 171 | |
| 172 | flags = LO_UPGRADABLE; |
| 173 | if (opts & RW_DUPOK) |
| 174 | flags |= LO_DUPOK; |
| 175 | if (opts & RW_NOPROFILE) |
| 176 | flags |= LO_NOPROFILE; |
| 177 | if (!(opts & RW_NOWITNESS)) |
| 178 | flags |= LO_WITNESS; |
| 179 | if (opts & RW_RECURSE) |
| 180 | flags |= LO_RECURSABLE; |
| 181 | if (opts & RW_QUIET) |
| 182 | flags |= LO_QUIET; |
| 183 | |
| 184 | lock_init(lo, &lock_class_rw, name, NULL, flags); |
| 185 | } |
| 186 | |
| 187 | void _rw_destroy(volatile uintptr_t *c) |
| 188 | { |
nothing calls this directly
no test coverage detected