| 337 | } |
| 338 | |
| 339 | static void |
| 340 | ksem_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 |
no test coverage detected