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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 */ | 53 */ |
54 typedef uint8 bool; | 54 typedef uint8 bool; |
55 typedef uint8 byte; | 55 typedef uint8 byte; |
56 typedef struct Func Func; | 56 typedef struct Func Func; |
57 typedef struct G G; | 57 typedef struct G G; |
58 typedef struct Gobuf Gobuf; | 58 typedef struct Gobuf Gobuf; |
59 typedef struct SudoG SudoG; | 59 typedef struct SudoG SudoG; |
60 typedef struct Mutex Mutex; | 60 typedef struct Mutex Mutex; |
61 typedef struct M M; | 61 typedef struct M M; |
62 typedef struct P P; | 62 typedef struct P P; |
63 typedef struct» SchedType» SchedType; | 63 typedef»struct» SchedT» SchedT; |
64 typedef struct Note Note; | 64 typedef struct Note Note; |
65 typedef struct Slice Slice; | 65 typedef struct Slice Slice; |
66 typedef struct String String; | 66 typedef struct String String; |
67 typedef struct FuncVal FuncVal; | 67 typedef struct FuncVal FuncVal; |
68 typedef struct SigTab SigTab; | 68 typedef struct SigTab SigTab; |
69 typedef struct MCache MCache; | 69 typedef struct MCache MCache; |
70 typedef struct FixAlloc FixAlloc; | 70 typedef struct FixAlloc FixAlloc; |
71 typedef struct Iface Iface; | 71 typedef struct Iface Iface; |
72 typedef struct Itab Itab; | 72 typedef struct Itab Itab; |
73 typedef struct InterfaceType InterfaceType; | 73 typedef struct InterfaceType InterfaceType; |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 427 |
428 byte pad[64]; | 428 byte pad[64]; |
429 }; | 429 }; |
430 | 430 |
431 enum { | 431 enum { |
432 // The max value of GOMAXPROCS. | 432 // The max value of GOMAXPROCS. |
433 // There are no fundamental restrictions on the value. | 433 // There are no fundamental restrictions on the value. |
434 MaxGomaxprocs = 1<<8, | 434 MaxGomaxprocs = 1<<8, |
435 }; | 435 }; |
436 | 436 |
437 struct» SchedType | 437 struct» SchedT |
438 { | 438 { |
439 Mutex lock; | 439 Mutex lock; |
440 | 440 |
441 uint64 goidgen; | 441 uint64 goidgen; |
442 | 442 |
443 M* midle; // idle m's waiting for work | 443 M* midle; // idle m's waiting for work |
444 int32 nmidle; // number of idle m's waiting for work | 444 int32 nmidle; // number of idle m's waiting for work |
445 int32 nmidlelocked; // number of locked m's waiting for work | 445 int32 nmidlelocked; // number of locked m's waiting for work |
446 int32 mcount; // number of m's that have been created | 446 int32 mcount; // number of m's that have been created |
447 int32 maxmcount; // maximum number of m's allowed (or die) | 447 int32 maxmcount; // maximum number of m's allowed (or die) |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 extern int32 runtime·ncpu; | 746 extern int32 runtime·ncpu; |
747 extern bool runtime·iscgo; | 747 extern bool runtime·iscgo; |
748 extern void (*runtime·sysargs)(int32, uint8**); | 748 extern void (*runtime·sysargs)(int32, uint8**); |
749 extern uintptr runtime·maxstring; | 749 extern uintptr runtime·maxstring; |
750 extern uint32 runtime·cpuid_ecx; | 750 extern uint32 runtime·cpuid_ecx; |
751 extern uint32 runtime·cpuid_edx; | 751 extern uint32 runtime·cpuid_edx; |
752 extern DebugVars runtime·debug; | 752 extern DebugVars runtime·debug; |
753 extern uintptr runtime·maxstacksize; | 753 extern uintptr runtime·maxstacksize; |
754 extern Note runtime·signote; | 754 extern Note runtime·signote; |
755 extern ForceGCState runtime·forcegc; | 755 extern ForceGCState runtime·forcegc; |
756 extern» SchedType» runtime·sched; | 756 extern» SchedT» runtime·sched; |
757 extern int32 runtime·newprocs; | 757 extern int32 runtime·newprocs; |
758 | 758 |
759 /* | 759 /* |
760 * common functions and data | 760 * common functions and data |
761 */ | 761 */ |
762 int32 runtime·strcmp(byte*, byte*); | 762 int32 runtime·strcmp(byte*, byte*); |
763 int32 runtime·strncmp(byte*, byte*, uintptr); | 763 int32 runtime·strncmp(byte*, byte*, uintptr); |
764 byte* runtime·strstr(byte*, byte*); | 764 byte* runtime·strstr(byte*, byte*); |
765 intgo runtime·findnull(byte*); | 765 intgo runtime·findnull(byte*); |
766 intgo runtime·findnullw(uint16*); | 766 intgo runtime·findnullw(uint16*); |
(...skipping 30 matching lines...) Expand all Loading... |
797 | 797 |
798 void runtime·gogo(Gobuf*); | 798 void runtime·gogo(Gobuf*); |
799 void runtime·gostartcall(Gobuf*, void(*)(void), void*); | 799 void runtime·gostartcall(Gobuf*, void(*)(void), void*); |
800 void runtime·gostartcallfn(Gobuf*, FuncVal*); | 800 void runtime·gostartcallfn(Gobuf*, FuncVal*); |
801 void runtime·gosave(Gobuf*); | 801 void runtime·gosave(Gobuf*); |
802 void runtime·goargs(void); | 802 void runtime·goargs(void); |
803 void runtime·goenvs(void); | 803 void runtime·goenvs(void); |
804 void runtime·goenvs_unix(void); | 804 void runtime·goenvs_unix(void); |
805 void* runtime·getu(void); | 805 void* runtime·getu(void); |
806 void runtime·throw(int8*); | 806 void runtime·throw(int8*); |
807 void runtime·panicstring(int8*); | |
808 bool runtime·canpanic(G*); | 807 bool runtime·canpanic(G*); |
809 void runtime·prints(int8*); | 808 void runtime·prints(int8*); |
810 void runtime·printf(int8*, ...); | 809 void runtime·printf(int8*, ...); |
811 void runtime·snprintf(byte*, int32, int8*, ...); | 810 void runtime·snprintf(byte*, int32, int8*, ...); |
812 byte* runtime·mchr(byte*, byte, byte*); | 811 byte* runtime·mchr(byte*, byte, byte*); |
813 int32 runtime·mcmp(byte*, byte*, uintptr); | 812 int32 runtime·mcmp(byte*, byte*, uintptr); |
814 void runtime·memmove(void*, void*, uintptr); | 813 void runtime·memmove(void*, void*, uintptr); |
815 String runtime·catstring(String, String); | 814 String runtime·catstring(String, String); |
816 String runtime·gostring(byte*); | 815 String runtime·gostring(byte*); |
817 Slice runtime·makeStringSlice(intgo); | 816 Slice runtime·makeStringSlice(intgo); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 void runtime·gopanic(Eface); | 1056 void runtime·gopanic(Eface); |
1058 void runtime·panicindex(void); | 1057 void runtime·panicindex(void); |
1059 void runtime·panicslice(void); | 1058 void runtime·panicslice(void); |
1060 void runtime·panicdivide(void); | 1059 void runtime·panicdivide(void); |
1061 | 1060 |
1062 /* | 1061 /* |
1063 * runtime c-called (but written in Go) | 1062 * runtime c-called (but written in Go) |
1064 */ | 1063 */ |
1065 void runtime·printany(Eface); | 1064 void runtime·printany(Eface); |
1066 void runtime·newTypeAssertionError(String*, String*, String*, String*, Eface*
); | 1065 void runtime·newTypeAssertionError(String*, String*, String*, String*, Eface*
); |
1067 void runtime·newErrorString(String, Eface*); | |
1068 void runtime·newErrorCString(int8*, Eface*); | |
1069 void runtime·fadd64c(uint64, uint64, uint64*); | 1066 void runtime·fadd64c(uint64, uint64, uint64*); |
1070 void runtime·fsub64c(uint64, uint64, uint64*); | 1067 void runtime·fsub64c(uint64, uint64, uint64*); |
1071 void runtime·fmul64c(uint64, uint64, uint64*); | 1068 void runtime·fmul64c(uint64, uint64, uint64*); |
1072 void runtime·fdiv64c(uint64, uint64, uint64*); | 1069 void runtime·fdiv64c(uint64, uint64, uint64*); |
1073 void runtime·fneg64c(uint64, uint64*); | 1070 void runtime·fneg64c(uint64, uint64*); |
1074 void runtime·f32to64c(uint32, uint64*); | 1071 void runtime·f32to64c(uint32, uint64*); |
1075 void runtime·f64to32c(uint64, uint32*); | 1072 void runtime·f64to32c(uint64, uint32*); |
1076 void runtime·fcmp64c(uint64, uint64, int32*, bool*); | 1073 void runtime·fcmp64c(uint64, uint64, int32*, bool*); |
1077 void runtime·fintto64c(int64, uint64*); | 1074 void runtime·fintto64c(int64, uint64*); |
1078 void runtime·f64tointc(uint64, int64*, bool*); | 1075 void runtime·f64tointc(uint64, int64*, bool*); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 extern float64 runtime·neginf; | 1109 extern float64 runtime·neginf; |
1113 extern uint64 ·nan; | 1110 extern uint64 ·nan; |
1114 extern uint64 ·posinf; | 1111 extern uint64 ·posinf; |
1115 extern uint64 ·neginf; | 1112 extern uint64 ·neginf; |
1116 #define ISNAN(f) ((f) != (f)) | 1113 #define ISNAN(f) ((f) != (f)) |
1117 | 1114 |
1118 enum | 1115 enum |
1119 { | 1116 { |
1120 UseSpanType = 1, | 1117 UseSpanType = 1, |
1121 }; | 1118 }; |
LEFT | RIGHT |