github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sync/goyield_go113_unsafe.go (about)

     1  // Copyright 2020 The gVisor Authors.
     2  //
     3  // Use of this source code is governed by a BSD-style
     4  // license that can be found in the LICENSE file.
     5  
     6  //go:build go1.13 && !go1.14
     7  // +build go1.13,!go1.14
     8  
     9  package sync
    10  
    11  import (
    12  	"runtime"
    13  )
    14  
    15  func goyield() {
    16  	// goyield is not available until Go 1.14.
    17  	runtime.Gosched()
    18  }