From: Russ Cox Date: Wed, 10 Feb 2010 00:56:22 +0000 (-0800) Subject: fix NaCl build for latest runtime changes X-Git-Tag: weekly.2010-02-17~53 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2b4a9fa176c64fe99fc4b94000d25cd4545fe50f;p=gostls13.git fix NaCl build for latest runtime changes R=iant CC=golang-dev https://golang.org/cl/206052 --- diff --git a/src/pkg/runtime/nacl/386/sys.s b/src/pkg/runtime/nacl/386/sys.s index 3b1a349854..356d85eff0 100644 --- a/src/pkg/runtime/nacl/386/sys.s +++ b/src/pkg/runtime/nacl/386/sys.s @@ -19,6 +19,7 @@ #define SYS_mutex_create 70 #define SYS_mutex_lock 71 #define SYS_mutex_unlock 73 +#define SYS_gettimeofday 40 #define SYSCALL(x) $(0x10000+SYS_/**/x * 32) @@ -79,6 +80,22 @@ TEXT ·mmap(SB),7,$24 INT $3 RET +TEXT gettime(SB),7,$32 + LEAL 8(SP), BX + MOVL BX, 0(SP) + MOVL $0, 4(SP) + CALL SYSCALL(gettimeofday) + + MOVL 8(SP), BX // sec + MOVL sec+0(FP), DI + MOVL BX, (DI) + MOVL $0, 4(DI) // zero extend 32 -> 64 bits + + MOVL 12(SP), BX // usec + MOVL usec+4(FP), DI + MOVL BX, (DI) + RET + // setldt(int entry, int address, int limit) TEXT setldt(SB),7,$32 // entry is ignored - nacl tells us the diff --git a/src/pkg/runtime/nacl/thread.c b/src/pkg/runtime/nacl/thread.c index 906f0bbeee..4112eaa993 100644 --- a/src/pkg/runtime/nacl/thread.c +++ b/src/pkg/runtime/nacl/thread.c @@ -87,6 +87,10 @@ unlock(Lock *l) xunlock(l->sema>>1); } +void +destroylock(Lock *l) +{ +} // One-time notifications. //