aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os3_solaris.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/os3_solaris.go')
-rw-r--r--src/runtime/os3_solaris.go20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/runtime/os3_solaris.go b/src/runtime/os3_solaris.go
index 6ba11afd93..4b65139eb8 100644
--- a/src/runtime/os3_solaris.go
+++ b/src/runtime/os3_solaris.go
@@ -522,6 +522,11 @@ func sysconf(name int32) int64 {
func usleep1(usec uint32)
//go:nosplit
+func usleep_no_g(µs uint32) {
+ usleep1(µs)
+}
+
+//go:nosplit
func usleep(µs uint32) {
usleep1(µs)
}
@@ -569,18 +574,15 @@ func setNonblock(fd int32) {
func osyield1()
//go:nosplit
-func osyield() {
- _g_ := getg()
-
- // Check the validity of m because we might be called in cgo callback
- // path early enough where there isn't a m available yet.
- if _g_ != nil && _g_.m != nil {
- sysvicall0(&libc_sched_yield)
- return
- }
+func osyield_no_g() {
osyield1()
}
+//go:nosplit
+func osyield() {
+ sysvicall0(&libc_sched_yield)
+}
+
//go:linkname executablePath os.executablePath
var executablePath string