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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 true = 1, | 124 true = 1, |
125 false = 0, | 125 false = 0, |
126 }; | 126 }; |
127 enum | 127 enum |
128 { | 128 { |
129 PtrSize = sizeof(void*), | 129 PtrSize = sizeof(void*), |
130 }; | 130 }; |
131 enum | 131 enum |
132 { | 132 { |
133 // Per-M stack segment cache size. | 133 // Per-M stack segment cache size. |
134 » StackCacheSize = 128, | 134 » StackCacheSize = 32, |
135 // Global <-> per-M stack segment cache transfer batch size. | 135 // Global <-> per-M stack segment cache transfer batch size. |
136 » StackCacheBatch = 32, | 136 » StackCacheBatch = 16, |
137 }; | 137 }; |
138 | 138 |
139 /* | 139 /* |
140 * structures | 140 * structures |
141 */ | 141 */ |
142 union Lock | 142 union Lock |
143 { | 143 { |
144 uint32 key; // futex-based impl | 144 uint32 key; // futex-based impl |
145 M* waitm; // linked list of waiting M's (sema-based impl) | 145 M* waitm; // linked list of waiting M's (sema-based impl) |
146 }; | 146 }; |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 void runtime·minit(void); | 647 void runtime·minit(void); |
648 Func* runtime·findfunc(uintptr); | 648 Func* runtime·findfunc(uintptr); |
649 int32 runtime·funcline(Func*, uintptr); | 649 int32 runtime·funcline(Func*, uintptr); |
650 void* runtime·stackalloc(uint32); | 650 void* runtime·stackalloc(uint32); |
651 void runtime·stackfree(void*, uintptr); | 651 void runtime·stackfree(void*, uintptr); |
652 MCache* runtime·allocmcache(void); | 652 MCache* runtime·allocmcache(void); |
653 void runtime·freemcache(MCache*); | 653 void runtime·freemcache(MCache*); |
654 void runtime·mallocinit(void); | 654 void runtime·mallocinit(void); |
655 bool runtime·ifaceeq_c(Iface, Iface); | 655 bool runtime·ifaceeq_c(Iface, Iface); |
656 bool runtime·efaceeq_c(Eface, Eface); | 656 bool runtime·efaceeq_c(Eface, Eface); |
657 uintptr»runtime·ifacehash(Iface); | 657 uintptr»runtime·ifacehash(Iface, uintptr); |
658 uintptr»runtime·efacehash(Eface); | 658 uintptr»runtime·efacehash(Eface, uintptr); |
659 void* runtime·malloc(uintptr size); | 659 void* runtime·malloc(uintptr size); |
660 void runtime·free(void *v); | 660 void runtime·free(void *v); |
661 bool runtime·addfinalizer(void*, void(*fn)(void*), uintptr); | 661 bool runtime·addfinalizer(void*, void(*fn)(void*), uintptr); |
662 void runtime·runpanic(Panic*); | 662 void runtime·runpanic(Panic*); |
663 void* runtime·getcallersp(void*); | 663 void* runtime·getcallersp(void*); |
664 int32 runtime·mcount(void); | 664 int32 runtime·mcount(void); |
665 int32 runtime·gcount(void); | 665 int32 runtime·gcount(void); |
666 void runtime·mcall(void(*)(G*)); | 666 void runtime·mcall(void(*)(G*)); |
667 uint32 runtime·fastrand1(void); | 667 uint32 runtime·fastrand1(void); |
668 | 668 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 extern float64 runtime·neginf; | 887 extern float64 runtime·neginf; |
888 extern uint64 ·nan; | 888 extern uint64 ·nan; |
889 extern uint64 ·posinf; | 889 extern uint64 ·posinf; |
890 extern uint64 ·neginf; | 890 extern uint64 ·neginf; |
891 #define ISNAN(f) ((f) != (f)) | 891 #define ISNAN(f) ((f) != (f)) |
892 | 892 |
893 enum | 893 enum |
894 { | 894 { |
895 UseSpanType = 1, | 895 UseSpanType = 1, |
896 }; | 896 }; |
LEFT | RIGHT |