diff --git a/src/pkg/runtime/linux/386/sys.s b/src/pkg/runtime/linux/386/sys.s index 7549c04798c..1b4f649bd73 100644 --- a/src/pkg/runtime/linux/386/sys.s +++ b/src/pkg/runtime/linux/386/sys.s @@ -52,23 +52,22 @@ TEXT runtime·read(SB),7,$0 CALL *runtime·_vdso(SB) RET -TEXT runtime·usleep(SB),7,$28 +TEXT runtime·usleep(SB),7,$8 MOVL $0, DX MOVL usec+0(FP), AX MOVL $1000000, CX DIVL CX - MOVL AX, 20(SP) - MOVL DX, 24(SP) + MOVL AX, 0(SP) + MOVL DX, 4(SP) // select(0, 0, 0, 0, &tv) - MOVL $0, 0(SP) - MOVL $0, 4(SP) - MOVL $0, 8(SP) - MOVL $0, 12(SP) - LEAL 20(SP), AX - MOVL AX, 16(SP) - MOVL $82, AX - SYSCALL + MOVL $142, AX + MOVL $0, BX + MOVL $0, CX + MOVL $0, DX + MOVL $0, SI + LEAL 0(SP), DI + CALL *runtime·_vdso(SB) RET TEXT runtime·raisesigpipe(SB),7,$12 diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index f050ee76618..36554120050 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -607,7 +607,6 @@ runtime·helpgc(void) M *m; int32 n, max; -return 0; // broken on linux/386 // Figure out how many CPUs to use. // Limited by gomaxprocs, number of actual CPUs, and MaxGcproc. max = runtime·gomaxprocs; @@ -616,7 +615,6 @@ return 0; // broken on linux/386 if(max > MaxGcproc) max = MaxGcproc; - // We're going to use one CPU no matter what. // Figure out the max number of additional CPUs. max--;