syscall: remove calls to Entersyscall & Exitsyscall in Getdents
The syscall for Getdents in syscall/libcall_linux.go called Entersyscall and Exitsyscall, causing the runtime_sched counts for goroutines to be incorrect. Inconsistent counts caused checkdead in runtime/proc.c to panic. Fixes golang/go#11406 Reviewed-on: https://go-review.googlesource.com/11761 From-SVN: r225745
This commit is contained in:
parent
c5d9ec5670
commit
51cef06e02
@ -223,7 +223,6 @@ func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
} else {
|
||||
p = (*byte)(unsafe.Pointer(&_zero))
|
||||
}
|
||||
Entersyscall()
|
||||
s := SYS_GETDENTS64
|
||||
if s == 0 {
|
||||
s = SYS_GETDENTS
|
||||
@ -233,7 +232,6 @@ func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
if n < 0 {
|
||||
err = errno
|
||||
}
|
||||
Exitsyscall()
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user