Commit 85916146 authored by Hector Chu's avatar Hector Chu

runtime: fix usleep on linux/386 and re-enable parallel gc

R=golang-dev, jsing, alex.brainman, cw, rsc
CC=golang-dev
https://golang.org/cl/5166047
parent d573ad26
...@@ -52,23 +52,22 @@ TEXT runtime·read(SB),7,$0 ...@@ -52,23 +52,22 @@ TEXT runtime·read(SB),7,$0
CALL *runtime·_vdso(SB) CALL *runtime·_vdso(SB)
RET RET
TEXT runtime·usleep(SB),7,$28 TEXT runtime·usleep(SB),7,$8
MOVL $0, DX MOVL $0, DX
MOVL usec+0(FP), AX MOVL usec+0(FP), AX
MOVL $1000000, CX MOVL $1000000, CX
DIVL CX DIVL CX
MOVL AX, 20(SP) MOVL AX, 0(SP)
MOVL DX, 24(SP) MOVL DX, 4(SP)
// select(0, 0, 0, 0, &tv) // select(0, 0, 0, 0, &tv)
MOVL $0, 0(SP) MOVL $142, AX
MOVL $0, 4(SP) MOVL $0, BX
MOVL $0, 8(SP) MOVL $0, CX
MOVL $0, 12(SP) MOVL $0, DX
LEAL 20(SP), AX MOVL $0, SI
MOVL AX, 16(SP) LEAL 0(SP), DI
MOVL $82, AX CALL *runtime·_vdso(SB)
SYSCALL
RET RET
TEXT runtime·raisesigpipe(SB),7,$12 TEXT runtime·raisesigpipe(SB),7,$12
......
...@@ -607,7 +607,6 @@ runtime·helpgc(void) ...@@ -607,7 +607,6 @@ runtime·helpgc(void)
M *m; M *m;
int32 n, max; int32 n, max;
return 0; // broken on linux/386
// Figure out how many CPUs to use. // Figure out how many CPUs to use.
// Limited by gomaxprocs, number of actual CPUs, and MaxGcproc. // Limited by gomaxprocs, number of actual CPUs, and MaxGcproc.
max = runtime·gomaxprocs; max = runtime·gomaxprocs;
...@@ -616,7 +615,6 @@ return 0; // broken on linux/386 ...@@ -616,7 +615,6 @@ return 0; // broken on linux/386
if(max > MaxGcproc) if(max > MaxGcproc)
max = MaxGcproc; max = MaxGcproc;
// We're going to use one CPU no matter what. // We're going to use one CPU no matter what.
// Figure out the max number of additional CPUs. // Figure out the max number of additional CPUs.
max--; max--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment