mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix the signature for gopark.
gopark's signature was changed from having a string reason to a uint8. See: https://github.com/golang/go/commit/4d7cf3fedbc382215df5ff6167ee9782a9cc9375 This broke execution tracing of the sentry. Switching to the right signature makes tracing work again. Updates #220 PiperOrigin-RevId: 249565311 Change-Id: If77fd276cecb37d4003c8222f6de510b8031a074
This commit is contained in:
committed by
Shentubot
parent
79738d3958
commit
022bd0fd10
@@ -12,6 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build go1.11
|
||||
// +build !go1.13
|
||||
|
||||
// Package sleep allows goroutines to efficiently sleep on multiple sources of
|
||||
// notifications (wakers). It offers O(1) complexity, which is different from
|
||||
// multi-channel selects which have O(n) complexity (where n is the number of
|
||||
@@ -85,7 +88,7 @@ var (
|
||||
)
|
||||
|
||||
//go:linkname gopark runtime.gopark
|
||||
func gopark(unlockf func(uintptr, *uintptr) bool, wg *uintptr, reason string, traceEv byte, traceskip int)
|
||||
func gopark(unlockf func(uintptr, *uintptr) bool, wg *uintptr, reason uint8, traceEv byte, traceskip int)
|
||||
|
||||
//go:linkname goready runtime.goready
|
||||
func goready(g uintptr, traceskip int)
|
||||
@@ -179,7 +182,10 @@ func (s *Sleeper) nextWaker(block bool) *Waker {
|
||||
// commitSleep to decide whether to immediately
|
||||
// wake the caller up or to leave it sleeping.
|
||||
const traceEvGoBlockSelect = 24
|
||||
gopark(commitSleep, &s.waitingG, "sleeper", traceEvGoBlockSelect, 0)
|
||||
// See:runtime2.go in the go runtime package for
|
||||
// the values to pass as the waitReason here.
|
||||
const waitReasonSelect = 9
|
||||
gopark(commitSleep, &s.waitingG, waitReasonSelect, traceEvGoBlockSelect, 0)
|
||||
}
|
||||
|
||||
// Pull the shared list out and reverse it in the local
|
||||
|
||||
Reference in New Issue
Block a user