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

Function sigallowstop_impl

freebsd/kern/kern_sig.c:2815–2831  ·  view source on GitHub ↗

* Restores the STOP handling mode, typically permitting the delivery * of SIGSTOP for the current thread. This does not immediately * suspend if a stop was posted. Instead, the thread will suspend * either via ast() or a subsequent interruptible sleep. */

Source from the content-addressed store, hash-verified

2813 * either via ast() or a subsequent interruptible sleep.
2814 */
2815void
2816sigallowstop_impl(int prev)
2817{
2818 struct thread *td;
2819 int cflags;
2820
2821 KASSERT(prev != SIGDEFERSTOP_VAL_NCHG, ("failed sigallowstop"));
2822 KASSERT((prev & ~(TDF_SBDRY | TDF_SEINTR | TDF_SERESTART)) == 0,
2823 ("sigallowstop: incorrect previous mode %x", prev));
2824 td = curthread;
2825 cflags = sigdeferstop_curr_flags(td->td_flags);
2826 if (cflags != prev) {
2827 thread_lock(td);
2828 td->td_flags = (td->td_flags & ~cflags) | prev;
2829 thread_unlock(td);
2830 }
2831}
2832
2833/*
2834 * If the current process has received a signal (should be caught or cause

Callers 1

sigallowstopFunction · 0.85

Calls 1

sigdeferstop_curr_flagsFunction · 0.85

Tested by

no test coverage detected