LEFT | RIGHT |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 /* | 5 /* |
6 * basic types | 6 * basic types |
7 */ | 7 */ |
8 typedef signed char int8; | 8 typedef signed char int8; |
9 typedef unsigned char uint8; | 9 typedef unsigned char uint8; |
10 typedef signed short int16; | 10 typedef signed short int16; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 typedef struct String String; | 59 typedef struct String String; |
60 typedef struct FuncVal FuncVal; | 60 typedef struct FuncVal FuncVal; |
61 typedef struct SigTab SigTab; | 61 typedef struct SigTab SigTab; |
62 typedef struct MCache MCache; | 62 typedef struct MCache MCache; |
63 typedef struct FixAlloc FixAlloc; | 63 typedef struct FixAlloc FixAlloc; |
64 typedef struct Iface Iface; | 64 typedef struct Iface Iface; |
65 typedef struct Itab Itab; | 65 typedef struct Itab Itab; |
66 typedef struct InterfaceType InterfaceType; | 66 typedef struct InterfaceType InterfaceType; |
67 typedef struct Eface Eface; | 67 typedef struct Eface Eface; |
68 typedef struct Type Type; | 68 typedef struct Type Type; |
| 69 typedef struct PtrType PtrType; |
69 typedef struct ChanType ChanType; | 70 typedef struct ChanType ChanType; |
70 typedef struct MapType MapType; | 71 typedef struct MapType MapType; |
71 typedef struct Defer Defer; | 72 typedef struct Defer Defer; |
72 typedef struct DeferChunk DeferChunk; | 73 typedef struct DeferChunk DeferChunk; |
73 typedef struct Panic Panic; | 74 typedef struct Panic Panic; |
74 typedef struct Hmap Hmap; | 75 typedef struct Hmap Hmap; |
75 typedef struct Hchan Hchan; | 76 typedef struct Hchan Hchan; |
76 typedef struct Complex64 Complex64; | 77 typedef struct Complex64 Complex64; |
77 typedef struct Complex128 Complex128; | 78 typedef struct Complex128 Complex128; |
78 typedef struct WinCall WinCall; | 79 typedef struct WinCall WinCall; |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 | 366 |
366 int32 id; | 367 int32 id; |
367 uint32 status; // one of Pidle/Prunning/... | 368 uint32 status; // one of Pidle/Prunning/... |
368 P* link; | 369 P* link; |
369 uint32 schedtick; // incremented on every scheduler call | 370 uint32 schedtick; // incremented on every scheduler call |
370 uint32 syscalltick; // incremented on every system call | 371 uint32 syscalltick; // incremented on every system call |
371 M* m; // back-link to associated M (nil if idle) | 372 M* m; // back-link to associated M (nil if idle) |
372 MCache* mcache; | 373 MCache* mcache; |
373 | 374 |
374 // Queue of runnable goroutines. | 375 // Queue of runnable goroutines. |
375 uintptr magic1; | |
376 uint32 runqhead; | 376 uint32 runqhead; |
377 uintptr magic2; | |
378 uint32 runqtail; | 377 uint32 runqtail; |
379 uintptr magic3; | |
380 G* runq[256]; | 378 G* runq[256]; |
381 | 379 |
382 // Available G's (status == Gdead) | 380 // Available G's (status == Gdead) |
383 G* gfree; | 381 G* gfree; |
384 int32 gfreecnt; | 382 int32 gfreecnt; |
385 | 383 |
386 byte pad[64]; | 384 byte pad[64]; |
387 }; | 385 }; |
388 | 386 |
389 // The m->locked word holds two pieces of state counting active calls to LockOST
hread/lockOSThread. | 387 // The m->locked word holds two pieces of state counting active calls to LockOST
hread/lockOSThread. |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 int32 runtime·funcline(Func*, uintptr, String*); | 803 int32 runtime·funcline(Func*, uintptr, String*); |
806 int32 runtime·funcarglen(Func*, uintptr); | 804 int32 runtime·funcarglen(Func*, uintptr); |
807 int32 runtime·funcspdelta(Func*, uintptr); | 805 int32 runtime·funcspdelta(Func*, uintptr); |
808 int8* runtime·funcname(Func*); | 806 int8* runtime·funcname(Func*); |
809 int32 runtime·pcdatavalue(Func*, int32, uintptr); | 807 int32 runtime·pcdatavalue(Func*, int32, uintptr); |
810 void* runtime·stackalloc(uint32); | 808 void* runtime·stackalloc(uint32); |
811 void runtime·stackfree(void*, uintptr); | 809 void runtime·stackfree(void*, uintptr); |
812 MCache* runtime·allocmcache(void); | 810 MCache* runtime·allocmcache(void); |
813 void runtime·freemcache(MCache*); | 811 void runtime·freemcache(MCache*); |
814 void runtime·mallocinit(void); | 812 void runtime·mallocinit(void); |
815 void runtime·mprofinit(void); | |
816 bool runtime·ifaceeq_c(Iface, Iface); | 813 bool runtime·ifaceeq_c(Iface, Iface); |
817 bool runtime·efaceeq_c(Eface, Eface); | 814 bool runtime·efaceeq_c(Eface, Eface); |
818 uintptr runtime·ifacehash(Iface, uintptr); | 815 uintptr runtime·ifacehash(Iface, uintptr); |
819 uintptr runtime·efacehash(Eface, uintptr); | 816 uintptr runtime·efacehash(Eface, uintptr); |
820 void* runtime·malloc(uintptr size); | 817 void* runtime·malloc(uintptr size); |
821 void runtime·free(void *v); | 818 void runtime·free(void *v); |
822 void runtime·runpanic(Panic*); | 819 void runtime·runpanic(Panic*); |
823 uintptr runtime·getcallersp(void*); | 820 uintptr runtime·getcallersp(void*); |
824 int32 runtime·mcount(void); | 821 int32 runtime·mcount(void); |
825 int32 runtime·gcount(void); | 822 int32 runtime·gcount(void); |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 extern float64 runtime·neginf; | 1055 extern float64 runtime·neginf; |
1059 extern uint64 ·nan; | 1056 extern uint64 ·nan; |
1060 extern uint64 ·posinf; | 1057 extern uint64 ·posinf; |
1061 extern uint64 ·neginf; | 1058 extern uint64 ·neginf; |
1062 #define ISNAN(f) ((f) != (f)) | 1059 #define ISNAN(f) ((f) != (f)) |
1063 | 1060 |
1064 enum | 1061 enum |
1065 { | 1062 { |
1066 UseSpanType = 1, | 1063 UseSpanType = 1, |
1067 }; | 1064 }; |
LEFT | RIGHT |