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

Function IPCNamespaceFromContext

pkg/sentry/kernel/context.go:82–87  ·  view source on GitHub ↗

IPCNamespaceFromContext returns the IPC namespace in which ctx is executing, or nil if there is no such IPC namespace. It takes a reference on the namespace.

(ctx context.Context)

Source from the content-addressed store, hash-verified

80// or nil if there is no such IPC namespace. It takes a reference on the
81// namespace.
82func IPCNamespaceFromContext(ctx context.Context) *IPCNamespace {
83 if v := ctx.Value(ipc.CtxIPCNamespace); v != nil {
84 return v.(*IPCNamespace)
85 }
86 return nil
87}
88
89// TaskFromContext returns the Task associated with ctx, or nil if there is no
90// such Task.

Callers 1

CreateTaskFunction · 0.92

Calls 1

ValueMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…