Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(220)

Unified Diff: src/pkg/runtime/cgo/callbacks.c

Issue 7430045: runtime/cgo: refactor
Patch Set: diff -r 1a9cccfde340 https://go.googlecode.com/hg Created 12 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pkg/runtime/cgo/gcc_darwin_386.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/cgo/callbacks.c
===================================================================
--- a/src/pkg/runtime/cgo/callbacks.c
+++ b/src/pkg/runtime/cgo/callbacks.c
@@ -13,7 +13,9 @@
//
// We need to export the symbol crosscall2 in order to support
// callbacks from shared libraries.
-#pragma dynexport crosscall2 crosscall2
+//#pragma dynexport crosscall2 crosscall2
+
+#pragma cgo_import_static crosscall2
// Allocate memory. This allocates the requested number of bytes in
// memory controlled by the Go runtime. The allocated memory will be
@@ -77,3 +79,15 @@
{
runtime·cgocallback((void(*)(void))_cgo_panic_internal, a, n);
}
+
+#pragma cgo_import_static x_cgo_malloc
+#pragma cgo_import_static x_cgo_free
+#pragma cgo_import_static x_cgo_thread_start
+
+void x_cgo_malloc(void*);
+void x_cgo_free(void*);
+void x_cgo_thread_start(void*);
+
+void (*_cgo_malloc)(void*) = x_cgo_malloc;
+void (*_cgo_free)(void*) = x_cgo_free;
+void (*_cgo_thread_start)(void*) = x_cgo_thread_start;
« no previous file with comments | « no previous file | src/pkg/runtime/cgo/gcc_darwin_386.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b