|
| 1 | +Subject: [PATCH] remove 64bits syscall on 32bit linux |
| 2 | +--- |
| 3 | +Index: src/runtime/os_linux32.go |
| 4 | +IDEA additional info: |
| 5 | +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| 6 | +<+>UTF-8 |
| 7 | +=================================================================== |
| 8 | +diff --git a/src/runtime/os_linux32.go b/src/runtime/os_linux32.go |
| 9 | +--- a/src/runtime/os_linux32.go (revision 030384681641464bf71ed16500075c458363510f) |
| 10 | ++++ b/src/runtime/os_linux32.go (date 1771666707318) |
| 11 | +@@ -21,14 +21,14 @@ |
| 12 | + |
| 13 | + //go:nosplit |
| 14 | + func futex(addr unsafe.Pointer, op int32, val uint32, ts *timespec, addr2 unsafe.Pointer, val3 uint32) int32 { |
| 15 | +- if !isFutexTime32bitOnly.Load() { |
| 16 | +- ret := futex_time64(addr, op, val, ts, addr2, val3) |
| 17 | +- // futex_time64 is only supported on Linux 5.0+ |
| 18 | +- if ret != -_ENOSYS { |
| 19 | +- return ret |
| 20 | +- } |
| 21 | +- isFutexTime32bitOnly.Store(true) |
| 22 | +- } |
| 23 | ++ //if !isFutexTime32bitOnly.Load() { |
| 24 | ++ // ret := futex_time64(addr, op, val, ts, addr2, val3) |
| 25 | ++ // // futex_time64 is only supported on Linux 5.0+ |
| 26 | ++ // if ret != -_ENOSYS { |
| 27 | ++ // return ret |
| 28 | ++ // } |
| 29 | ++ // isFutexTime32bitOnly.Store(true) |
| 30 | ++ //} |
| 31 | + // Downgrade ts. |
| 32 | + var ts32 timespec32 |
| 33 | + var pts32 *timespec32 |
| 34 | +@@ -49,14 +49,14 @@ |
| 35 | + |
| 36 | + //go:nosplit |
| 37 | + func timer_settime(timerid int32, flags int32, new, old *itimerspec) int32 { |
| 38 | +- if !isSetTime32bitOnly.Load() { |
| 39 | +- ret := timer_settime64(timerid, flags, new, old) |
| 40 | +- // timer_settime64 is only supported on Linux 5.0+ |
| 41 | +- if ret != -_ENOSYS { |
| 42 | +- return ret |
| 43 | +- } |
| 44 | +- isSetTime32bitOnly.Store(true) |
| 45 | +- } |
| 46 | ++ //if !isSetTime32bitOnly.Load() { |
| 47 | ++ // ret := timer_settime64(timerid, flags, new, old) |
| 48 | ++ // // timer_settime64 is only supported on Linux 5.0+ |
| 49 | ++ // if ret != -_ENOSYS { |
| 50 | ++ // return ret |
| 51 | ++ // } |
| 52 | ++ // isSetTime32bitOnly.Store(true) |
| 53 | ++ //} |
| 54 | + |
| 55 | + var newts, oldts itimerspec32 |
| 56 | + var new32, old32 *itimerspec32 |
0 commit comments