1
0
mirror of https://github.com/golang/go synced 2024-11-25 03:47:57 -07:00

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
This commit is contained in:
Hector Chu 2011-10-03 19:08:59 +01:00
parent d573ad2671
commit 85916146ea
2 changed files with 10 additions and 13 deletions

View File

@ -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

View File

@ -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--;