TaskWithID returns the task with thread ID tid in PID namespace ns. If no task has that TID, TaskWithID returns nil.
(tid ThreadID)
| 282 | // TaskWithID returns the task with thread ID tid in PID namespace ns. If no |
| 283 | // task has that TID, TaskWithID returns nil. |
| 284 | func (ns *PIDNamespace) TaskWithID(tid ThreadID) *Task { |
| 285 | ns.owner.mu.RLock() |
| 286 | t := ns.tasks[tid] |
| 287 | ns.owner.mu.RUnlock() |
| 288 | return t |
| 289 | } |
| 290 | |
| 291 | // ID returns a non-zero ID that is unique across PID namespaces. |
| 292 | func (ns *PIDNamespace) ID() uint64 { |
no test coverage detected