aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.h
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2012-09-18 21:15:46 +0400
committerDmitriy Vyukov <dvyukov@google.com>2012-09-18 21:15:46 +0400
commitf20fd87384d152ed91439e824333fbb78688e741 (patch)
tree555ce56d7b34e0eac187ef3e65d3dd8578054553 /src/pkg/runtime/runtime.h
parente4389c008a223213fc3f506756f38d695cf60d40 (diff)
downloadgo-f20fd87384d152ed91439e824333fbb78688e741.tar.xz
runtime: refactor goroutine blocking
The change is a preparation for the new scheduler. It introduces runtime.park() function, that will atomically unlock the mutex and park the goroutine. It will allow to remove the racy readyonstop flag that is difficult to implement w/o the global scheduler mutex. R=rsc, remyoudompheng, dave CC=golang-dev https://golang.org/cl/6501077
Diffstat (limited to 'src/pkg/runtime/runtime.h')
-rw-r--r--src/pkg/runtime/runtime.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index 20fb8ddfe1..96da29a00c 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -614,7 +614,8 @@ uint32 runtime·fastrand1(void);
void runtime·exit(int32);
void runtime·breakpoint(void);
void runtime·gosched(void);
-void runtime·tsleep(int64);
+void runtime·park(void(*)(Lock*), Lock*, int8*);
+void runtime·tsleep(int64, int8*);
M* runtime·newm(void);
void runtime·goexit(void);
void runtime·asmcgocall(void (*fn)(void*), void*);