MCPcopy
hub / github.com/google/gvisor / TaskWithID

Method TaskWithID

pkg/sentry/kernel/threads.go:284–289  ·  view source on GitHub ↗

TaskWithID returns the task with thread ID tid in PID namespace ns. If no task has that TID, TaskWithID returns nil.

(tid ThreadID)

Source from the content-addressed store, hash-verified

282// TaskWithID returns the task with thread ID tid in PID namespace ns. If no
283// task has that TID, TaskWithID returns nil.
284func (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.
292func (ns *PIDNamespace) ID() uint64 {

Callers 15

SchedGetparamFunction · 0.80
SchedGetschedulerFunction · 0.80
SchedSetschedulerFunction · 0.80
targetTaskFunction · 0.80
setAsyncOwnerFunction · 0.80
translatePIDFunction · 0.80
SchedSetaffinityFunction · 0.80
SchedGetaffinityFunction · 0.80
SetpgidFunction · 0.80
GetpgidFunction · 0.80
GetsidFunction · 0.80
GetpriorityFunction · 0.80

Calls 2

RLockMethod · 0.45
RUnlockMethod · 0.45

Tested by

no test coverage detected