diff options
Diffstat (limited to 'src/pkg/runtime/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index a5a425b575..dfd88e001e 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -222,6 +222,29 @@ struct GCStats uint64 nosyield; uint64 nsleep; }; + +struct WinCall +{ + void (*fn)(void*); + uintptr n; // number of parameters + void* args; // parameters + uintptr r1; // return values + uintptr r2; + uintptr err; // error number +}; +struct SEH +{ + 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) +}; + struct G { // stackguard0 can be set to StackPreempt as opposed to stackguard @@ -327,6 +350,7 @@ struct M #ifdef GOOS_windows void* thread; // thread handle + WinCall wincall; #endif #ifdef GOOS_plan9 int8* notesig; @@ -432,28 +456,6 @@ struct Itab void (*fun[])(void); }; -struct WinCall -{ - void (*fn)(void*); - uintptr n; // number of parameters - void* args; // parameters - uintptr r1; // return values - uintptr r2; - uintptr err; // error number -}; -struct SEH -{ - 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 { Windows = 1 @@ -816,6 +818,7 @@ int32 runtime·gcount(void); void runtime·mcall(void(*)(G*)); uint32 runtime·fastrand1(void); void runtime·rewindmorestack(Gobuf*); +int32 runtime·timediv(int64, int32, int32*); void runtime·setmg(M*, G*); void runtime·newextram(void); |
