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

Function ksem_drop

freebsd/kern/uipc_sem.c:339–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339static void
340ksem_drop(struct ksem *ks)
341{
342
343 if (refcount_release(&ks->ks_ref)) {
344#ifdef MAC
345 mac_posixsem_destroy(ks);
346#endif
347 cv_destroy(&ks->ks_cv);
348 free(ks, M_KSEM);
349 mtx_lock(&ksem_count_lock);
350 nsems--;
351 mtx_unlock(&ksem_count_lock);
352 }
353}
354
355/*
356 * Determine if the credentials have sufficient permissions for read

Callers 2

ksem_closefFunction · 0.85
ksem_removeFunction · 0.85

Calls 6

refcount_releaseFunction · 0.85
mac_posixsem_destroyFunction · 0.85
cv_destroyFunction · 0.70
freeFunction · 0.70
mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected