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

Function do_unlock_umutex

freebsd/kern/kern_umtx.c:2512–2532  ·  view source on GitHub ↗

* Unlock a userland POSIX mutex. */

Source from the content-addressed store, hash-verified

2510 * Unlock a userland POSIX mutex.
2511 */
2512static int
2513do_unlock_umutex(struct thread *td, struct umutex *m, bool rb)
2514{
2515 uint32_t flags;
2516 int error;
2517
2518 error = fueword32(&m->m_flags, &flags);
2519 if (error == -1)
2520 return (EFAULT);
2521
2522 switch (flags & (UMUTEX_PRIO_INHERIT | UMUTEX_PRIO_PROTECT)) {
2523 case 0:
2524 return (do_unlock_normal(td, m, flags, rb));
2525 case UMUTEX_PRIO_INHERIT:
2526 return (do_unlock_pi(td, m, flags, rb));
2527 case UMUTEX_PRIO_PROTECT:
2528 return (do_unlock_pp(td, m, flags, rb));
2529 }
2530
2531 return (EINVAL);
2532}
2533
2534static int
2535do_cv_wait(struct thread *td, struct ucond *cv, struct umutex *m,

Callers 3

do_cv_waitFunction · 0.85
__umtx_op_unlock_umutexFunction · 0.85
umtx_handle_rbFunction · 0.85

Calls 4

fueword32Function · 0.85
do_unlock_normalFunction · 0.85
do_unlock_piFunction · 0.85
do_unlock_ppFunction · 0.85

Tested by

no test coverage detected