From 6412ad5b2e1e497180ded0b4e5d9c99f9416d91a Mon Sep 17 00:00:00 2001 From: davidxu Date: Sun, 8 Aug 2004 22:26:11 +0000 Subject: 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 --- sys/kern/sys_process.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/kern') diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 9dad83a..7063ed3 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -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); -- cgit v1.1