Patchwork libgo patch committed: Remove closedchan function

login
register
mail settings
Submitter Ian Taylor
Date March 27, 2011, 6:07 p.m.
Message ID <mcr4o6ofndg.fsf@google.com>
Download mbox | patch
Permalink /patch/88521/
State New
Headers show

Comments

Ian Taylor - March 27, 2011, 6:07 p.m.
With the removal of the predeclared function 'closed' from Go, and the
update to the current Go library, the 'closedchan' function is no longer
needed.  This patch removes it from libgo.  Bootstrapped and ran Go
testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

Patch

diff -r b5434877887e libgo/runtime/go-reflect-chan.c
--- a/libgo/runtime/go-reflect-chan.c	Sun Mar 27 10:51:19 2011 -0700
+++ b/libgo/runtime/go-reflect-chan.c	Sun Mar 27 11:02:17 2011 -0700
@@ -120,17 +120,6 @@ 
     }
 }
 
-extern _Bool chanclosed (unsigned char *)
-  asm ("libgo_reflect.reflect.chanclosed");
-
-_Bool
-chanclosed (unsigned char *ch)
-{
-  struct __go_channel *channel = (struct __go_channel *) ch;
-
-  return __go_builtin_closed (channel);
-}
-
 extern void chanclose (unsigned char *)
   asm ("libgo_reflect.reflect.chanclose");