runtime: do not generate code during runtime in windows NewCallback
Update #5494
R=golang-dev, minux.ma, rsc, iant
CC=golang-dev
https://golang.org/cl/10368043
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index f62ee81..f5da54a 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -78,6 +78,7 @@
typedef struct Complex128 Complex128;
typedef struct WinCall WinCall;
typedef struct SEH SEH;
+typedef struct WinCallbackContext WinCallbackContext;
typedef struct Timers Timers;
typedef struct Timer Timer;
typedef struct GCStats GCStats;
@@ -444,6 +445,13 @@
void* prev;
void* handler;
};
+// describes how to handle callback
+struct WinCallbackContext
+{
+ void* gobody; // Go function to call
+ uintptr argsize; // callback arguments size (in bytes)
+ uintptr restorestack; // adjust stack on return by (in bytes) (386 only)
+};
#ifdef GOOS_windows
enum {