diff options
| author | Russ Cox <rsc@golang.org> | 2014-08-27 23:32:49 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-08-27 23:32:49 -0400 |
| commit | 8ecb9a765e02a8b19d8fad2afa65aee2a068b01a (patch) | |
| tree | 66f7622c0f2b2c14943c0b0c5780d00987574e03 /src/pkg/runtime/proc.c | |
| parent | 299117eca0f28b6e379c4d5b7e43e2f13cf0cd36 (diff) | |
| download | go-8ecb9a765e02a8b19d8fad2afa65aee2a068b01a.tar.xz | |
runtime: rename Lock to Mutex
Mutex is consistent with package sync, and when in the
unexported Go form it avoids having a conflcit between
the type (now mutex) and the function (lock).
LGTM=iant
R=golang-codereviews, iant
CC=dvyukov, golang-codereviews, r
https://golang.org/cl/133140043
Diffstat (limited to 'src/pkg/runtime/proc.c')
| -rw-r--r-- | src/pkg/runtime/proc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index a692dfd2cf..8263202e93 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -26,7 +26,7 @@ typedef struct Sched Sched; struct Sched { - Lock lock; + Mutex lock; uint64 goidgen; @@ -46,7 +46,7 @@ struct Sched { int32 runqsize; // Global cache of dead G's. - Lock gflock; + Mutex gflock; G* gfree; int32 ngfree; @@ -84,7 +84,7 @@ int8* runtime·goos; int32 runtime·ncpu; static int32 newprocs; -static Lock allglock; // the following vars are protected by this lock or by stoptheworld +static Mutex allglock; // the following vars are protected by this lock or by stoptheworld G** runtime·allg; uintptr runtime·allglen; static uintptr allgcap; @@ -133,7 +133,7 @@ static void allgadd(G*); static void forcegchelper(void); static struct { - Lock lock; + Mutex lock; G* g; FuncVal fv; uint32 idle; @@ -1570,7 +1570,7 @@ runtime·parkunlock_c(G *gp, void *lock) // Puts the current goroutine into a waiting state and unlocks the lock. // The goroutine can be made runnable again by calling runtime·ready(gp). void -runtime·parkunlock(Lock *lock, String reason) +runtime·parkunlock(Mutex *lock, String reason) { runtime·park(runtime·parkunlock_c, lock, reason); } @@ -2399,7 +2399,7 @@ runtime·badreflectcall(void) // called from assembly } static struct { - Lock lock; + Mutex lock; void (*fn)(uintptr*, int32); int32 hz; } prof; |
