MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ff_rw_init_flags

Function ff_rw_init_flags

lib/ff_lock.c:164–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162#endif
163
164void
165ff_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
187void _rw_destroy(volatile uintptr_t *c)
188{

Callers

nothing calls this directly

Calls 1

lock_initFunction · 0.85

Tested by

no test coverage detected