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

Function mqueue_send_notification

freebsd/kern/uipc_mqueue.c:1818–1842  ·  view source on GitHub ↗

* Send realtime a signal to process which registered itself * successfully by mq_notify. */

Source from the content-addressed store, hash-verified

1816 * successfully by mq_notify.
1817 */
1818static void
1819mqueue_send_notification(struct mqueue *mq)
1820{
1821 struct mqueue_notifier *nt;
1822 struct thread *td;
1823 struct proc *p;
1824 int error;
1825
1826 mtx_assert(&mq->mq_mutex, MA_OWNED);
1827 nt = mq->mq_notifier;
1828 if (nt->nt_sigev.sigev_notify != SIGEV_NONE) {
1829 p = nt->nt_proc;
1830 error = sigev_findtd(p, &nt->nt_sigev, &td);
1831 if (error) {
1832 mq->mq_notifier = NULL;
1833 return;
1834 }
1835 if (!KSI_ONQ(&nt->nt_ksi)) {
1836 ksiginfo_set_sigev(&nt->nt_ksi, &nt->nt_sigev);
1837 tdsendsignal(p, td, nt->nt_ksi.ksi_signo, &nt->nt_ksi);
1838 }
1839 PROC_UNLOCK(p);
1840 }
1841 mq->mq_notifier = NULL;
1842}
1843
1844/*
1845 * Get a message. if waitok is false, thread will not be

Callers 3

_mqueue_sendFunction · 0.85
_mqueue_recvFunction · 0.85
kern_kmq_notifyFunction · 0.85

Calls 4

mtx_assertFunction · 0.85
sigev_findtdFunction · 0.85
ksiginfo_set_sigevFunction · 0.85
tdsendsignalFunction · 0.85

Tested by

no test coverage detected