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

Function sigqueue_flush

freebsd/kern/kern_sig.c:447–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445}
446
447void
448sigqueue_flush(sigqueue_t *sq)
449{
450 struct proc *p = sq->sq_proc;
451 ksiginfo_t *ksi;
452
453 KASSERT(sq->sq_flags & SQ_INIT, ("sigqueue not inited"));
454
455 if (p != NULL)
456 PROC_LOCK_ASSERT(p, MA_OWNED);
457
458 while ((ksi = TAILQ_FIRST(&sq->sq_list)) != NULL) {
459 TAILQ_REMOVE(&sq->sq_list, ksi, ksi_link);
460 ksi->ksi_sigq = NULL;
461 if (ksiginfo_tryfree(ksi) && p != NULL)
462 p->p_pendingcnt--;
463 }
464
465 SIGEMPTYSET(sq->sq_signals);
466 SIGEMPTYSET(sq->sq_kill);
467 SIGEMPTYSET(sq->sq_ptrace);
468}
469
470static void
471sigqueue_move_set(sigqueue_t *src, sigqueue_t *dst, const sigset_t *set)

Callers 3

sigqueue_delete_set_procFunction · 0.85
tdsigcleanupFunction · 0.85
exit1Function · 0.85

Calls 1

ksiginfo_tryfreeFunction · 0.85

Tested by

no test coverage detected