Source file src/runtime/nonwindows_stub.go

     1  // Copyright 2017 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  //go:build !windows
     6  
     7  package runtime
     8  
     9  // osRelaxMinNS is the number of nanoseconds of idleness to tolerate
    10  // without performing an osRelax. Since osRelax may reduce the
    11  // precision of timers, this should be enough larger than the relaxed
    12  // timer precision to keep the timer error acceptable.
    13  const osRelaxMinNS = 0
    14  
    15  var haveHighResSleep = true
    16  
    17  // osRelax is called by the scheduler when transitioning to and from
    18  // all Ps being idle.
    19  func osRelax(relax bool) {}
    20  
    21  // enableWER is called by setTraceback("wer").
    22  // Windows Error Reporting (WER) is only supported on Windows.
    23  func enableWER() {}
    24  
    25  // winlibcall is not implemented on non-Windows systems,
    26  // but it is used in non-OS-specific parts of the runtime.
    27  // Define it as an empty struct to avoid wasting stack space.
    28  type winlibcall struct{}
    29  

View as plain text