diff options
| author | Shenghou Ma <minux.ma@gmail.com> | 2012-08-10 10:05:26 +0800 |
|---|---|---|
| committer | Shenghou Ma <minux.ma@gmail.com> | 2012-08-10 10:05:26 +0800 |
| commit | 4f308edc864a87ff4f6f9d6c531733cb1bf100f1 (patch) | |
| tree | 33667df64d6c50b4e1b266a3585a2f8b5d6acac9 /src/pkg/runtime/sys_linux_arm.s | |
| parent | c5038c85933a69a1ddeae812d601eb11e71cdc58 (diff) | |
| download | go-4f308edc864a87ff4f6f9d6c531733cb1bf100f1.tar.xz | |
runtime: use sched_getaffinity for runtime.NumCPU() on Linux
Fixes #3921.
R=iant
CC=golang-dev
https://golang.org/cl/6448132
Diffstat (limited to 'src/pkg/runtime/sys_linux_arm.s')
| -rw-r--r-- | src/pkg/runtime/sys_linux_arm.s | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pkg/runtime/sys_linux_arm.s b/src/pkg/runtime/sys_linux_arm.s index 220f9adac7..0112cf9158 100644 --- a/src/pkg/runtime/sys_linux_arm.s +++ b/src/pkg/runtime/sys_linux_arm.s @@ -34,6 +34,7 @@ #define SYS_sched_yield (SYS_BASE + 158) #define SYS_select (SYS_BASE + 142) // newselect #define SYS_ugetrlimit (SYS_BASE + 191) +#define SYS_sched_getaffinity (SYS_BASE + 242) #define ARM_BASE (SYS_BASE + 0x0f0000) #define SYS_ARM_cacheflush (ARM_BASE + 2) @@ -393,3 +394,11 @@ TEXT runtime·osyield(SB),7,$0 MOVW $SYS_sched_yield, R7 SWI $0 RET + +TEXT runtime·sched_getaffinity(SB),7,$0 + MOVW 0(FP), R0 + MOVW 4(FP), R1 + MOVW 8(FP), R2 + MOVW $SYS_sched_getaffinity, R7 + SWI $0 + RET |
