diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2014-02-12 22:21:38 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2014-02-12 22:21:38 +0400 |
| commit | e1ee04828d94e8673f13cd854245920cdea27acc (patch) | |
| tree | bef382570023906158fbe2ed10269eeb75019dfe /src/pkg/runtime/runtime.h | |
| parent | 3c3be622011747f6db4b4cf81ed3a975dfca2b51 (diff) | |
| download | go-e1ee04828d94e8673f13cd854245920cdea27acc.tar.xz | |
runtime: refactor chan code
1. Make internal chan functions static.
2. Move selgen local variable instead of a member of G struct.
3. Change "bool *pres/selected" parameter of chansend/chanrecv to "bool block",
which is simpler, faster and less code.
-37 lines total.
LGTM=rsc
R=golang-codereviews, dave, gobot, rsc
CC=bradfitz, golang-codereviews, iant, khr
https://golang.org/cl/58610043
Diffstat (limited to 'src/pkg/runtime/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index ff6a93aedb..ea42dbe59a 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -252,7 +252,6 @@ struct G uintptr stackguard0; // cannot move - also known to linker, libmach, runtime/cgo uintptr stackbase; // cannot move - also known to libmach, runtime/cgo uint32 panicwrap; // cannot move - also known to linker - uint32 selgen; // valid sudog pointer Defer* defer; Panic* panic; Gobuf sched; @@ -1071,9 +1070,6 @@ void runtime·osyield(void); void runtime·lockOSThread(void); void runtime·unlockOSThread(void); -Hchan* runtime·makechan_c(ChanType*, int64); -void runtime·chansend(ChanType*, Hchan*, byte*, bool*, void*); -void runtime·chanrecv(ChanType*, Hchan*, byte*, bool*, bool*); bool runtime·showframe(Func*, G*); void runtime·printcreatedby(G*); |
