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

Function sigfastblock_setpend1

freebsd/kern/kern_sig.c:4216–4245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4214}
4215
4216static void
4217sigfastblock_setpend1(struct thread *td)
4218{
4219 int res;
4220 uint32_t oldval;
4221
4222 if ((td->td_pflags & TDP_SIGFASTPENDING) == 0)
4223 return;
4224 res = fueword32((void *)td->td_sigblock_ptr, &oldval);
4225 if (res == -1) {
4226 sigfastblock_failed(td, true, false);
4227 return;
4228 }
4229 for (;;) {
4230 res = casueword32(td->td_sigblock_ptr, oldval, &oldval,
4231 oldval | SIGFASTBLOCK_PEND);
4232 if (res == -1) {
4233 sigfastblock_failed(td, true, true);
4234 return;
4235 }
4236 if (res == 0) {
4237 td->td_sigblock_val = oldval & ~SIGFASTBLOCK_FLAGS;
4238 td->td_pflags &= ~TDP_SIGFASTPENDING;
4239 break;
4240 }
4241 MPASS(res == 1);
4242 if (thread_check_susp(td, false) != 0)
4243 break;
4244 }
4245}
4246
4247void
4248sigfastblock_setpend(struct thread *td, bool resched)

Callers 1

sigfastblock_setpendFunction · 0.85

Calls 4

fueword32Function · 0.85
sigfastblock_failedFunction · 0.85
casueword32Function · 0.85
thread_check_suspFunction · 0.85

Tested by

no test coverage detected