]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: mark functions as static where possible
authorMatthew Dempsky <mdempsky@google.com>
Fri, 8 Aug 2014 16:15:52 +0000 (20:15 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Fri, 8 Aug 2014 16:15:52 +0000 (20:15 +0400)
Update #8092

LGTM=dvyukov
R=golang-codereviews, minux, dvyukov
CC=golang-codereviews
https://golang.org/cl/122250043

src/pkg/runtime/cpuprof.goc
src/pkg/runtime/mheap.c
src/pkg/runtime/proc.c

index faaea29435be11085bc52e80a32cf4341ac3ca80..cd4b210e2363fec5fbe1b8cb25df15f3e487ae55 100644 (file)
@@ -314,7 +314,7 @@ flushlog(Profile *p)
 
 // getprofile blocks until the next block of profiling data is available
 // and returns it as a []byte.  It is called from the writing goroutine.
-Slice
+static Slice
 getprofile(Profile *p)
 {
        uint32 i, j, n;
index 908d668462d36756dbf86ed99a5b36d0c710a5cb..186fd48d47aefa3eba773b07a268bd433f82e5ee 100644 (file)
@@ -211,7 +211,7 @@ mheap_alloc(MHeap *h, uintptr npage, int32 sizeclass, bool large)
        return s;
 }
 
-void
+static void
 mheap_alloc_m(G *gp)
 {
        MHeap *h;
index cef41d95f2d498db38677d36755eb2b564562f4e..443bdda100d9cd1a23bb1c1900321d13e951451c 100644 (file)
@@ -1384,7 +1384,7 @@ top:
 // appropriate time. After calling dropg and arranging for gp to be
 // readied later, the caller can do other work but eventually should
 // call schedule to restart the scheduling of goroutines on this m.
-void
+static void
 dropg(void)
 {
        if(g->m->lockedg == nil) {