golang.org/x/exp@v0.0.0-20240506185415-9bf2ced13842/trace/internal/event/requirements.go (about) 1 // Copyright 2023 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated by "gen.bash" from internal/trace/v2; DO NOT EDIT. 6 7 //go:build go1.21 8 9 package event 10 11 // SchedReqs is a set of constraints on what the scheduling 12 // context must look like. 13 type SchedReqs struct { 14 Thread Constraint 15 Proc Constraint 16 Goroutine Constraint 17 } 18 19 // Constraint represents a various presence requirements. 20 type Constraint uint8 21 22 const ( 23 MustNotHave Constraint = iota 24 MayHave 25 MustHave 26 ) 27 28 // UserGoReqs is a common requirement among events that are running 29 // or are close to running user code. 30 var UserGoReqs = SchedReqs{Thread: MustHave, Proc: MustHave, Goroutine: MustHave}