Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147624302
D28089.id82077.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28089.id82077.diff
View Options
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -4213,7 +4213,7 @@
int res;
uint32_t oldval;
- if ((td->td_pflags & TDP_SIGFASTBLOCK) == 0)
+ if ((td->td_pflags & TDP_SIGFASTPENDING) == 0)
return;
res = fueword32((void *)td->td_sigblock_ptr, &oldval);
if (res == -1) {
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -204,6 +204,7 @@
struct thread *td;
struct proc *p;
int flags, sig;
+ bool resched_sigs;
td = curthread;
p = td->td_proc;
@@ -316,27 +317,24 @@
if (flags & TDF_NEEDSIGCHK || p->p_pendingcnt > 0 ||
!SIGISEMPTY(p->p_siglist)) {
sigfastblock_fetch(td);
- if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0 &&
- td->td_sigblock_val != 0) {
- sigfastblock_setpend(td, true);
- } else {
- PROC_LOCK(p);
- mtx_lock(&p->p_sigacts->ps_mtx);
- while ((sig = cursig(td)) != 0) {
- KASSERT(sig >= 0, ("sig %d", sig));
- postsig(sig);
- }
- mtx_unlock(&p->p_sigacts->ps_mtx);
- PROC_UNLOCK(p);
+ PROC_LOCK(p);
+ mtx_lock(&p->p_sigacts->ps_mtx);
+ while ((sig = cursig(td)) != 0) {
+ KASSERT(sig >= 0, ("sig %d", sig));
+ postsig(sig);
}
+ mtx_unlock(&p->p_sigacts->ps_mtx);
+ PROC_UNLOCK(p);
+ resched_sigs = true;
+ } else {
+ resched_sigs = false;
}
/*
* Handle deferred update of the fast sigblock value, after
* the postsig() loop was performed.
*/
- if (td->td_pflags & TDP_SIGFASTPENDING)
- sigfastblock_setpend(td, false);
+ sigfastblock_setpend(td, resched_sigs);
#ifdef KTRACE
KTRUSERRET(td);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 13, 10:22 AM (38 m, 14 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29609408
Default Alt Text
D28089.id82077.diff (1 KB)
Attached To
Mode
D28089: sigfastblock: do not skip cursig/postsig loop in ast()
Attached
Detach File
Event Timeline
Log In to Comment