From e69012ce2a366e54bc86cd17f2fb1d73fc567a89 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Wed, 15 May 2013 11:10:26 +0400 Subject: runtime: use enums instead static vars for debugging Compiler can detect and delete dead code with enums, but can not with static vars. R=golang-dev, dave, r CC=golang-dev https://golang.org/cl/9377043 --- src/pkg/runtime/chan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pkg/runtime/chan.c') diff --git a/src/pkg/runtime/chan.c b/src/pkg/runtime/chan.c index fba36a4c34..0a01a403d2 100644 --- a/src/pkg/runtime/chan.c +++ b/src/pkg/runtime/chan.c @@ -11,8 +11,6 @@ #define MAXALIGN 7 #define NOSELGEN 1 -static int32 debug = 0; - typedef struct WaitQ WaitQ; typedef struct SudoG SudoG; typedef struct Select Select; @@ -58,6 +56,8 @@ uint32 runtime·Hchansize = sizeof(Hchan); enum { + debug = 0, + // Scase.kind CaseRecv, CaseSend, -- cgit v1.3-5-g9baa