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 5package event 6 7// SchedReqs is a set of constraints on what the scheduling 8// context must look like. 9type SchedReqs struct { 10 Thread Constraint 11 Proc Constraint 12 Goroutine Constraint 13} 14 15// Constraint represents a various presence requirements. 16type Constraint uint8 17 18const ( 19 MustNotHave Constraint = iota 20 MayHave 21 MustHave 22) 23 24// UserGoReqs is a common requirement among events that are running 25// or are close to running user code. 26var UserGoReqs = SchedReqs{Thread: MustHave, Proc: MustHave, Goroutine: MustHave} 27