Add pl_flags to ptrace_lwpinfo, two flags PL_FLAG_SA and PL_FLAG_BOUND
indicate that a thread is in UTS critical region. Reviewed by: deischen Approved by: marcel
This commit is contained in:
parent
b337473ecd
commit
6412ad5b2e
@ -807,6 +807,13 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
|
||||
else
|
||||
pl->pl_event = 0;
|
||||
}
|
||||
if (td2->td_pflags & TDP_SA) {
|
||||
pl->pl_flags = PL_FLAG_SA;
|
||||
if (td2->td_upcall && !TD_CAN_UNBIND(td2))
|
||||
pl->pl_flags |= PL_FLAG_BOUND;
|
||||
} else {
|
||||
pl->pl_flags = 0;
|
||||
}
|
||||
_PRELE(p);
|
||||
PROC_UNLOCK(p);
|
||||
return (0);
|
||||
|
@ -89,6 +89,9 @@ struct ptrace_lwpinfo {
|
||||
int pl_event; /* Event that stopped the LWP. */
|
||||
#define PL_EVENT_NONE 0
|
||||
#define PL_EVENT_SIGNAL 1
|
||||
int pl_flags; /* LWP flags. */
|
||||
#define PL_FLAG_SA 0x01 /* M:N thread */
|
||||
#define PL_FLAG_BOUND 0x02 /* M:N bound thread */
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
Loading…
Reference in New Issue
Block a user