diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-11-01 23:12:31 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-11-01 23:12:31 +0000 |
commit | aac9c42f3e58cced50246227469b3c4a300c5678 (patch) | |
tree | a57c86f5faf4db4705df8e6820f9d771ccd8eeb0 /pkg/context/context.go | |
parent | 76d5839bc55623bce2cb80f4a1cf5cbed2a6a179 (diff) | |
parent | 9776edb3fa9e67a28182aedc9342ef9c1b556d7c (diff) |
Merge release-20211026.0-19-g9776edb3f (automated)
Diffstat (limited to 'pkg/context/context.go')
-rw-r--r-- | pkg/context/context.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/pkg/context/context.go b/pkg/context/context.go index f3031fc60..e86c14195 100644 --- a/pkg/context/context.go +++ b/pkg/context/context.go @@ -29,26 +29,6 @@ import ( "gvisor.dev/gvisor/pkg/log" ) -type contextID int - -// Globally accessible values from a context. These keys are defined in the -// context package to resolve dependency cycles by not requiring the caller to -// import packages usually required to get these information. -const ( - // CtxThreadGroupID is the current thread group ID when a context represents - // a task context. The value is represented as an int32. - CtxThreadGroupID contextID = iota -) - -// ThreadGroupIDFromContext returns the current thread group ID when ctx -// represents a task context. -func ThreadGroupIDFromContext(ctx Context) (tgid int32, ok bool) { - if tgid := ctx.Value(CtxThreadGroupID); tgid != nil { - return tgid.(int32), true - } - return 0, false -} - // A Context represents a thread of execution (hereafter "goroutine" to reflect // Go idiosyncrasy). It carries state associated with the goroutine across API // boundaries. |