Lines Matching refs:tid
33 void DfxPtrace::Detach(pid_t tid) in Detach() argument
35 if (tid > 0) { in Detach()
36 ptrace(PTRACE_CONT, tid, 0, 0); in Detach()
37 ptrace(PTRACE_DETACH, tid, nullptr, nullptr); in Detach()
41 bool DfxPtrace::Attach(pid_t tid, int timeout) in Attach() argument
43 if (tid <= 0) { in Attach()
47 if (ptrace(PTRACE_SEIZE, tid, 0, 0) != 0) { in Attach()
48 LOGW("Failed to seize tid(%d), errno=%d", tid, errno); in Attach()
52 if (ptrace(PTRACE_INTERRUPT, tid, 0, 0) != 0) { in Attach()
53 LOGW("Failed to interrupt tid(%d), errno=%d", tid, errno); in Attach()
54 ptrace(PTRACE_DETACH, tid, nullptr, nullptr); in Attach()
61 if (waitpid(tid, nullptr, WNOHANG) > 0) { in Attach()
67 ptrace(PTRACE_DETACH, tid, nullptr, nullptr); in Attach()
68 LOGW("Failed to wait tid(%d) attached.", tid); in Attach()