diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-10-06 09:35:45 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-10-06 09:35:45 +0200 |
| commit | 6c7ca6e4d4e26e4c8cbe0d183966011b3b088a0a (patch) | |
| tree | fddeb87db026d64a1d8e597dd0c69d685f433597 /src/pkg/runtime/runtime.h | |
| parent | 04f99b387021a8ce32a8795360cba9beaf986a81 (diff) | |
| download | golang-6c7ca6e4d4e26e4c8cbe0d183966011b3b088a0a.tar.gz | |
Imported Upstream version 2011.09.21upstream-weekly/2011.09.21
Diffstat (limited to 'src/pkg/runtime/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 6feedcbc8..999511ac2 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -119,10 +119,10 @@ enum */ struct Lock { - uint32 key; #ifdef __WINDOWS__ - void* event; + M* waitm; // linked list of waiting M's #else + uint32 key; uint32 sema; // for OS X #endif }; @@ -212,6 +212,7 @@ struct G uintptr sigcode1; uintptr sigpc; uintptr gopc; // pc of go statement that created this goroutine + uintptr end[]; }; struct M { @@ -251,6 +252,13 @@ struct M uint32 freglo[16]; // D[i] lsb and F[i] uint32 freghi[16]; // D[i] msb and F[i+16] uint32 fflag; // floating point compare flags + +#ifdef __WINDOWS__ + void* thread; // thread handle + void* event; // event for signalling + M* nextwaitm; // next M waiting for lock +#endif + uintptr end[]; }; struct Stktop @@ -307,7 +315,8 @@ struct WinCall void (*fn)(void*); uintptr n; // number of parameters void* args; // parameters - uintptr r; // return value + uintptr r1; // return values + uintptr r2; uintptr err; // error number }; |
