summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/cgo/gcc_util.c
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2013-03-04 21:27:36 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-03-04 21:27:36 +0100
commit04b08da9af0c450d645ab7389d1467308cfc2db8 (patch)
treedb247935fa4f2f94408edc3acd5d0d4f997aa0d8 /src/pkg/runtime/cgo/gcc_util.c
parent917c5fb8ec48e22459d77e3849e6d388f93d3260 (diff)
downloadgolang-upstream/1.1_hg20130304.tar.gz
Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304
Diffstat (limited to 'src/pkg/runtime/cgo/gcc_util.c')
-rw-r--r--src/pkg/runtime/cgo/gcc_util.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/pkg/runtime/cgo/gcc_util.c b/src/pkg/runtime/cgo/gcc_util.c
index e06b6f64d..20913d736 100644
--- a/src/pkg/runtime/cgo/gcc_util.c
+++ b/src/pkg/runtime/cgo/gcc_util.c
@@ -5,7 +5,7 @@
#include "libcgo.h"
/* Stub for calling malloc from Go */
-static void
+void
x_cgo_malloc(void *p)
{
struct a {
@@ -16,10 +16,8 @@ x_cgo_malloc(void *p)
a->ret = malloc(a->n);
}
-void (*_cgo_malloc)(void*) = x_cgo_malloc;
-
/* Stub for calling free from Go */
-static void
+void
x_cgo_free(void *p)
{
struct a {
@@ -29,11 +27,9 @@ x_cgo_free(void *p)
free(a->arg);
}
-void (*_cgo_free)(void*) = x_cgo_free;
-
/* Stub for creating a new thread */
-static void
-xlibcgo_thread_start(ThreadStart *arg)
+void
+x_cgo_thread_start(ThreadStart *arg)
{
ThreadStart *ts;
@@ -45,7 +41,5 @@ xlibcgo_thread_start(ThreadStart *arg)
}
*ts = *arg;
- libcgo_sys_thread_start(ts); /* OS-dependent half */
+ _cgo_sys_thread_start(ts); /* OS-dependent half */
}
-
-void (*libcgo_thread_start)(ThreadStart*) = xlibcgo_thread_start;