aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os2_aix.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/os2_aix.go')
-rw-r--r--src/runtime/os2_aix.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/runtime/os2_aix.go b/src/runtime/os2_aix.go
index 9ad1caa816..2efc56554c 100644
--- a/src/runtime/os2_aix.go
+++ b/src/runtime/os2_aix.go
@@ -388,11 +388,11 @@ func exit1(code int32)
//go:nosplit
func exit(code int32) {
- _g_ := getg()
+ gp := getg()
// Check the validity of g because without a g during
// newosproc0.
- if _g_ != nil {
+ if gp != nil {
syscall1(&libc_exit, uintptr(code))
return
}
@@ -403,11 +403,11 @@ func write2(fd, p uintptr, n int32) int32
//go:nosplit
func write1(fd uintptr, p unsafe.Pointer, n int32) int32 {
- _g_ := getg()
+ gp := getg()
// Check the validity of g because without a g during
// newosproc0.
- if _g_ != nil {
+ if gp != nil {
r, errno := syscall3(&libc_write, uintptr(fd), uintptr(p), uintptr(n))
if int32(r) < 0 {
return -int32(errno)
@@ -493,11 +493,11 @@ func sigaction1(sig, new, old uintptr)
//go:nosplit
func sigaction(sig uintptr, new, old *sigactiont) {
- _g_ := getg()
+ gp := getg()
// Check the validity of g because without a g during
// runtime.libpreinit.
- if _g_ != nil {
+ if gp != nil {
r, err := syscall3(&libc_sigaction, sig, uintptr(unsafe.Pointer(new)), uintptr(unsafe.Pointer(old)))
if int32(r) == -1 {
println("Sigaction failed for sig: ", sig, " with error:", hex(err))
@@ -645,11 +645,11 @@ func pthread_attr_init1(attr uintptr) int32
//go:nosplit
func pthread_attr_init(attr *pthread_attr) int32 {
- _g_ := getg()
+ gp := getg()
// Check the validity of g because without a g during
// newosproc0.
- if _g_ != nil {
+ if gp != nil {
r, _ := syscall1(&libpthread_attr_init, uintptr(unsafe.Pointer(attr)))
return int32(r)
}
@@ -661,11 +661,11 @@ func pthread_attr_setdetachstate1(attr uintptr, state int32) int32
//go:nosplit
func pthread_attr_setdetachstate(attr *pthread_attr, state int32) int32 {
- _g_ := getg()
+ gp := getg()
// Check the validity of g because without a g during
// newosproc0.
- if _g_ != nil {
+ if gp != nil {
r, _ := syscall2(&libpthread_attr_setdetachstate, uintptr(unsafe.Pointer(attr)), uintptr(state))
return int32(r)
}
@@ -689,11 +689,11 @@ func pthread_attr_setstacksize1(attr uintptr, size uint64) int32
//go:nosplit
func pthread_attr_setstacksize(attr *pthread_attr, size uint64) int32 {
- _g_ := getg()
+ gp := getg()
// Check the validity of g because without a g during
// newosproc0.
- if _g_ != nil {
+ if gp != nil {
r, _ := syscall2(&libpthread_attr_setstacksize, uintptr(unsafe.Pointer(attr)), uintptr(size))
return int32(r)
}
@@ -705,11 +705,11 @@ func pthread_create1(tid, attr, fn, arg uintptr) int32
//go:nosplit
func pthread_create(tid *pthread, attr *pthread_attr, fn *funcDescriptor, arg unsafe.Pointer) int32 {
- _g_ := getg()
+ gp := getg()
// Check the validity of g because without a g during
// newosproc0.
- if _g_ != nil {
+ if gp != nil {
r, _ := syscall4(&libpthread_create, uintptr(unsafe.Pointer(tid)), uintptr(unsafe.Pointer(attr)), uintptr(unsafe.Pointer(fn)), uintptr(arg))
return int32(r)
}
@@ -723,11 +723,11 @@ func sigprocmask1(how, new, old uintptr)
//go:nosplit
func sigprocmask(how int32, new, old *sigset) {
- _g_ := getg()
+ gp := getg()
// Check the validity of m because it might be called during a cgo
// callback early enough where m isn't available yet.
- if _g_ != nil && _g_.m != nil {
+ if gp != nil && gp.m != nil {
r, err := syscall3(&libpthread_sigthreadmask, uintptr(how), uintptr(unsafe.Pointer(new)), uintptr(unsafe.Pointer(old)))
if int32(r) != 0 {
println("syscall sigthreadmask failed: ", hex(err))