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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 /* | 45 /* |
46 * defined types | 46 * defined types |
47 */ | 47 */ |
48 typedef uint8 bool; | 48 typedef uint8 bool; |
49 typedef uint8 byte; | 49 typedef uint8 byte; |
50 typedef struct Func Func; | 50 typedef struct Func Func; |
51 typedef struct G G; | 51 typedef struct G G; |
52 typedef struct Gobuf Gobuf; | 52 typedef struct Gobuf Gobuf; |
53 typedef union Lock Lock; | 53 typedef union Lock Lock; |
| 54 typedef struct M M; |
54 typedef struct P P; | 55 typedef struct P P; |
55 typedef struct M M; | |
56 typedef struct Mem Mem; | 56 typedef struct Mem Mem; |
57 typedef union Note Note; | 57 typedef union Note Note; |
58 typedef struct Slice Slice; | 58 typedef struct Slice Slice; |
59 typedef struct Stktop Stktop; | 59 typedef struct Stktop Stktop; |
60 typedef struct String String; | 60 typedef struct String String; |
| 61 typedef struct FuncVal FuncVal; |
61 typedef struct SigTab SigTab; | 62 typedef struct SigTab SigTab; |
62 typedef struct MCache MCache; | 63 typedef struct MCache MCache; |
63 typedef struct FixAlloc FixAlloc; | 64 typedef struct FixAlloc FixAlloc; |
64 typedef struct Iface Iface; | 65 typedef struct Iface Iface; |
65 typedef struct Itab Itab; | 66 typedef struct Itab Itab; |
66 typedef struct InterfaceType InterfaceType; | 67 typedef struct InterfaceType InterfaceType; |
67 typedef struct Eface Eface; | 68 typedef struct Eface Eface; |
68 typedef struct Type Type; | 69 typedef struct Type Type; |
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; |
79 typedef struct SEH SEH; | 80 typedef struct SEH SEH; |
80 typedef struct Timers Timers; | 81 typedef struct Timers Timers; |
81 typedef struct Timer Timer; | 82 typedef struct Timer Timer; |
82 typedef struct» GCStats»» GCStats; | 83 typedef»struct» GCStats»» GCStats; |
83 typedef struct» LFNode» » LFNode; | 84 typedef»struct» LFNode» » LFNode; |
84 typedef struct» ParFor» » ParFor; | 85 typedef»struct» ParFor» » ParFor; |
85 typedef struct» ParForThread» ParForThread; | 86 typedef»struct» ParForThread» ParForThread; |
86 typedef struct» CgoMal» » CgoMal; | 87 typedef»struct» CgoMal» » CgoMal; |
87 | 88 |
88 /* | 89 /* |
89 * Per-CPU declaration. | 90 * Per-CPU declaration. |
90 * | 91 * |
91 * "extern register" is a special storage class implemented by 6c, 8c, etc. | 92 * "extern register" is a special storage class implemented by 6c, 8c, etc. |
92 * On the ARM, it is an actual register; elsewhere it is a slot in thread- | 93 * On the ARM, it is an actual register; elsewhere it is a slot in thread- |
93 * local storage indexed by a segment register. See zasmhdr in | 94 * local storage indexed by a segment register. See zasmhdr in |
94 * src/cmd/dist/buildruntime.c for details, and be aware that the linker may | 95 * src/cmd/dist/buildruntime.c for details, and be aware that the linker may |
95 * make further OS-specific changes to the compiler's output. For example, | 96 * make further OS-specific changes to the compiler's output. For example, |
96 * 6l/linux rewrites 0(GS) as -16(FS). | 97 * 6l/linux rewrites 0(GS) as -16(FS). |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 union Note | 158 union Note |
158 { | 159 { |
159 uint32 key; // futex-based impl | 160 uint32 key; // futex-based impl |
160 M* waitm; // waiting M (sema-based impl) | 161 M* waitm; // waiting M (sema-based impl) |
161 }; | 162 }; |
162 struct String | 163 struct String |
163 { | 164 { |
164 byte* str; | 165 byte* str; |
165 intgo len; | 166 intgo len; |
166 }; | 167 }; |
| 168 struct FuncVal |
| 169 { |
| 170 void (*fn)(void); |
| 171 // variable-size, fn-specific data here |
| 172 }; |
167 struct Iface | 173 struct Iface |
168 { | 174 { |
169 Itab* tab; | 175 Itab* tab; |
170 void* data; | 176 void* data; |
171 }; | 177 }; |
172 struct Eface | 178 struct Eface |
173 { | 179 { |
174 Type* type; | 180 Type* type; |
175 void* data; | 181 void* data; |
176 }; | 182 }; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 }; | 216 }; |
211 struct G | 217 struct G |
212 { | 218 { |
213 uintptr stackguard; // cannot move - also known to linker, libmach,
runtime/cgo | 219 uintptr stackguard; // cannot move - also known to linker, libmach,
runtime/cgo |
214 uintptr stackbase; // cannot move - also known to libmach, runtime/
cgo | 220 uintptr stackbase; // cannot move - also known to libmach, runtime/
cgo |
215 Defer* defer; | 221 Defer* defer; |
216 Panic* panic; | 222 Panic* panic; |
217 Gobuf sched; | 223 Gobuf sched; |
218 uintptr gcstack; // if status==Gsyscall, gcstack = stackb
ase to use during gc | 224 uintptr gcstack; // if status==Gsyscall, gcstack = stackb
ase to use during gc |
219 uintptr gcsp; // if status==Gsyscall, gcsp = sched.sp to use d
uring gc | 225 uintptr gcsp; // if status==Gsyscall, gcsp = sched.sp to use d
uring gc |
| 226 byte* gcpc; // if status==Gsyscall, gcpc = sched.pc to use d
uring gc |
220 uintptr gcguard; // if status==Gsyscall, gcguard = stackg
uard to use during gc | 227 uintptr gcguard; // if status==Gsyscall, gcguard = stackg
uard to use during gc |
221 uintptr stack0; | 228 uintptr stack0; |
222 » byte*» entry;» » // initial function | 229 » FuncVal*» fnstart;» » // initial function |
223 G* alllink; // on allg | 230 G* alllink; // on allg |
224 void* param; // passed parameter on wakeup | 231 void* param; // passed parameter on wakeup |
225 int16 status; | 232 int16 status; |
226 int64 goid; | 233 int64 goid; |
227 uint32 selgen; // valid sudog pointer | 234 uint32 selgen; // valid sudog pointer |
228 int8* waitreason; // if status==Gwaiting | 235 int8* waitreason; // if status==Gwaiting |
229 G* schedlink; | 236 G* schedlink; |
230 bool ispanic; | 237 bool ispanic; |
231 bool issystem; | 238 bool issystem; |
232 int8 raceignore; // ignore race detection events | 239 int8 raceignore; // ignore race detection events |
(...skipping 20 matching lines...) Expand all Loading... |
253 Gobuf morebuf; // gobuf arg to morestack | 260 Gobuf morebuf; // gobuf arg to morestack |
254 | 261 |
255 // Fields not known to debuggers. | 262 // Fields not known to debuggers. |
256 uint32 moreframesize; // size arguments to morestack | 263 uint32 moreframesize; // size arguments to morestack |
257 uint32 moreargsize; | 264 uint32 moreargsize; |
258 uintptr cret; // return value from C | 265 uintptr cret; // return value from C |
259 uint64 procid; // for debuggers, but offset not hard-coded | 266 uint64 procid; // for debuggers, but offset not hard-coded |
260 G* gsignal; // signal-handling G | 267 G* gsignal; // signal-handling G |
261 uint32 tls[8]; // thread-local storage (for 386 extern register
) | 268 uint32 tls[8]; // thread-local storage (for 386 extern register
) |
262 G* curg; // current running goroutine | 269 G* curg; // current running goroutine |
263 » P*» p;» » » // attached P for executing Go code (nil
if not executing Go code) | 270 » P*» p;» » // attached P for executing Go code (nil if not
executing Go code) |
| 271 » P*» nextp; |
264 int32 id; | 272 int32 id; |
265 int32 mallocing; | 273 int32 mallocing; |
266 int32 throwing; | 274 int32 throwing; |
267 int32 gcing; | 275 int32 gcing; |
268 int32 locks; | 276 int32 locks; |
269 int32 nomemprof; | 277 int32 nomemprof; |
270 int32 dying; | 278 int32 dying; |
271 int32 profilehz; | 279 int32 profilehz; |
272 int32 helpgc; | 280 int32 helpgc; |
273 bool blockingsyscall; | 281 bool blockingsyscall; |
| 282 bool spinning; |
274 uint32 fastrand; | 283 uint32 fastrand; |
275 uint64 ncgocall; // number of cgo calls in total | 284 uint64 ncgocall; // number of cgo calls in total |
276 int32 ncgo; // number of cgo calls currently in progress | 285 int32 ncgo; // number of cgo calls currently in progress |
277 CgoMal* cgomal; | 286 CgoMal* cgomal; |
278 Note park; | 287 Note park; |
279 M* alllink; // on allm | 288 M* alllink; // on allm |
280 M* schedlink; | 289 M* schedlink; |
281 uint32 machport; // Return address for Mach IPC (OS X) | 290 uint32 machport; // Return address for Mach IPC (OS X) |
282 MCache *mcache; | 291 MCache *mcache; |
283 int32 stackinuse; | 292 int32 stackinuse; |
284 uint32 stackcachepos; | 293 uint32 stackcachepos; |
285 uint32 stackcachecnt; | 294 uint32 stackcachecnt; |
286 void* stackcache[StackCacheSize]; | 295 void* stackcache[StackCacheSize]; |
287 G* lockedg; | 296 G* lockedg; |
288 P* lockedp; | |
289 uintptr createstack[32]; // Stack that created this thread. | 297 uintptr createstack[32]; // Stack that created this thread. |
290 uint32 freglo[16]; // D[i] lsb and F[i] | 298 uint32 freglo[16]; // D[i] lsb and F[i] |
291 uint32 freghi[16]; // D[i] msb and F[i+16] | 299 uint32 freghi[16]; // D[i] msb and F[i+16] |
292 uint32 fflag; // floating point compare flags | 300 uint32 fflag; // floating point compare flags |
293 uint32 locked; // tracking for LockOSThread | 301 uint32 locked; // tracking for LockOSThread |
294 M* nextwaitm; // next M waiting for lock | 302 M* nextwaitm; // next M waiting for lock |
295 uintptr waitsema; // semaphore for parking on locks | 303 uintptr waitsema; // semaphore for parking on locks |
296 uint32 waitsemacount; | 304 uint32 waitsemacount; |
297 uint32 waitsemalock; | 305 uint32 waitsemalock; |
298 GCStats gcstats; | 306 GCStats gcstats; |
299 bool racecall; | 307 bool racecall; |
| 308 bool needextram; |
300 void* racepc; | 309 void* racepc; |
301 void (*waitunlockf)(Lock*); | 310 void (*waitunlockf)(Lock*); |
302 Lock* waitlock; | 311 Lock* waitlock; |
303 uint32 moreframesize_minalloc; | 312 uint32 moreframesize_minalloc; |
304 | 313 |
305 uintptr settype_buf[1024]; | 314 uintptr settype_buf[1024]; |
306 uintptr settype_bufsize; | 315 uintptr settype_bufsize; |
307 | 316 |
308 #ifdef GOOS_windows | 317 #ifdef GOOS_windows |
309 void* thread; // thread handle | 318 void* thread; // thread handle |
310 #endif | 319 #endif |
311 #ifdef GOOS_plan9 | 320 #ifdef GOOS_plan9 |
312 int8* notesig; | 321 int8* notesig; |
313 #endif | 322 #endif |
314 SEH* seh; | 323 SEH* seh; |
315 uintptr end[]; | 324 uintptr end[]; |
316 }; | 325 }; |
317 | 326 |
318 struct P | 327 struct P |
319 { | 328 { |
320 Lock; | 329 Lock; |
| 330 |
321 uint32 status; // one of Pidle/Prunning/... | 331 uint32 status; // one of Pidle/Prunning/... |
322 P* link; | 332 P* link; |
323 uint32 tick; // incremented on every scheduler or system call | 333 uint32 tick; // incremented on every scheduler or system call |
324 M* m; // back-link to associated M (nil if idle) | 334 M* m; // back-link to associated M (nil if idle) |
325 MCache* mcache; | 335 MCache* mcache; |
326 | 336 |
327 // Queue of runnable goroutines. | 337 // Queue of runnable goroutines. |
328 G** runq; | 338 G** runq; |
329 int32 runqhead; | 339 int32 runqhead; |
330 int32 runqtail; | 340 int32 runqtail; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 struct Func | 387 struct Func |
378 { | 388 { |
379 String name; | 389 String name; |
380 String type; // go type string | 390 String type; // go type string |
381 String src; // src file name | 391 String src; // src file name |
382 Slice pcln; // pc/ln tab for this func | 392 Slice pcln; // pc/ln tab for this func |
383 uintptr entry; // entry pc | 393 uintptr entry; // entry pc |
384 uintptr pc0; // starting pc, ln for table | 394 uintptr pc0; // starting pc, ln for table |
385 int32 ln0; | 395 int32 ln0; |
386 int32 frame; // stack frame size | 396 int32 frame; // stack frame size |
387 » int32» args;» // number of 32-bit in/out args | 397 » int32» args;» // in/out args size |
388 » int32» locals;»// number of 32-bit locals | 398 » int32» locals;»// locals size |
389 }; | 399 }; |
390 | 400 |
391 // layout of Itab known to compilers | 401 // layout of Itab known to compilers |
392 struct Itab | 402 struct Itab |
393 { | 403 { |
394 InterfaceType* inter; | 404 InterfaceType* inter; |
395 Type* type; | 405 Type* type; |
396 Itab* link; | 406 Itab* link; |
397 int32 bad; | 407 int32 bad; |
398 int32 unused; | 408 int32 unused; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 // If this struct changes, adjust ../time/sleep.go:/runtimeTimer. | 450 // If this struct changes, adjust ../time/sleep.go:/runtimeTimer. |
441 struct Timer | 451 struct Timer |
442 { | 452 { |
443 int32 i; // heap index | 453 int32 i; // heap index |
444 | 454 |
445 // Timer wakes up at when, and then at when+period, ... (period > 0 only
) | 455 // Timer wakes up at when, and then at when+period, ... (period > 0 only
) |
446 // each time calling f(now, arg) in the timer goroutine, so f must be | 456 // each time calling f(now, arg) in the timer goroutine, so f must be |
447 // a well-behaved function and not block. | 457 // a well-behaved function and not block. |
448 int64 when; | 458 int64 when; |
449 int64 period; | 459 int64 period; |
450 » void» (*f)(int64, Eface); | 460 » FuncVal»*fv; |
451 Eface arg; | 461 Eface arg; |
452 }; | 462 }; |
453 | 463 |
454 // Lock-free stack node. | 464 // Lock-free stack node. |
455 struct LFNode | 465 struct LFNode |
456 { | 466 { |
457 LFNode *next; | 467 LFNode *next; |
458 uintptr pushcnt; | 468 uintptr pushcnt; |
459 }; | 469 }; |
460 | 470 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 /* | 586 /* |
577 * deferred subroutine calls | 587 * deferred subroutine calls |
578 */ | 588 */ |
579 struct Defer | 589 struct Defer |
580 { | 590 { |
581 int32 siz; | 591 int32 siz; |
582 bool special; // not part of defer frame | 592 bool special; // not part of defer frame |
583 bool free; // if special, free when done | 593 bool free; // if special, free when done |
584 byte* argp; // where args were copied from | 594 byte* argp; // where args were copied from |
585 byte* pc; | 595 byte* pc; |
586 » byte*» fn; | 596 » FuncVal*» fn; |
587 Defer* link; | 597 Defer* link; |
588 void* args[1]; // padded to actual size | 598 void* args[1]; // padded to actual size |
589 }; | 599 }; |
590 | 600 |
591 struct DeferChunk | 601 struct DeferChunk |
592 { | 602 { |
593 DeferChunk *prev; | 603 DeferChunk *prev; |
594 uintptr off; | 604 uintptr off; |
595 }; | 605 }; |
596 | 606 |
(...skipping 16 matching lines...) Expand all Loading... |
613 extern G* runtime·allg; | 623 extern G* runtime·allg; |
614 extern G* runtime·lastg; | 624 extern G* runtime·lastg; |
615 extern M* runtime·allm; | 625 extern M* runtime·allm; |
616 extern P** runtime·allp; | 626 extern P** runtime·allp; |
617 extern int32 runtime·gomaxprocs; | 627 extern int32 runtime·gomaxprocs; |
618 extern bool runtime·singleproc; | 628 extern bool runtime·singleproc; |
619 extern uint32 runtime·panicking; | 629 extern uint32 runtime·panicking; |
620 extern int32 runtime·gcwaiting; // gc is waiting to run | 630 extern int32 runtime·gcwaiting; // gc is waiting to run |
621 extern int8* runtime·goos; | 631 extern int8* runtime·goos; |
622 extern int32 runtime·ncpu; | 632 extern int32 runtime·ncpu; |
623 extern int32 runtime·gsignalstk; | |
624 extern bool runtime·iscgo; | 633 extern bool runtime·iscgo; |
625 extern void (*runtime·sysargs)(int32, uint8**); | 634 extern void (*runtime·sysargs)(int32, uint8**); |
626 extern uint32 runtime·maxstring; | 635 extern uint32 runtime·maxstring; |
| 636 extern uint32 runtime·Hchansize; |
627 | 637 |
628 /* | 638 /* |
629 * common functions and data | 639 * common functions and data |
630 */ | 640 */ |
631 int32 runtime·strcmp(byte*, byte*); | 641 int32 runtime·strcmp(byte*, byte*); |
632 byte* runtime·strstr(byte*, byte*); | 642 byte* runtime·strstr(byte*, byte*); |
633 int32 runtime·findnull(byte*); | 643 int32 runtime·findnull(byte*); |
634 int32 runtime·findnullw(uint16*); | 644 int32 runtime·findnullw(uint16*); |
635 void runtime·dump(byte*, int32); | 645 void runtime·dump(byte*, int32); |
636 int32 runtime·runetochar(byte*, int32); | 646 int32 runtime·runetochar(byte*, int32); |
637 int32 runtime·charntorune(int32*, uint8*, int32); | 647 int32 runtime·charntorune(int32*, uint8*, int32); |
638 | 648 |
639 /* | 649 /* |
640 * very low level c-called | 650 * very low level c-called |
641 */ | 651 */ |
642 #define FLUSH(x) USED(x) | 652 #define FLUSH(x) USED(x) |
643 | 653 |
644 void runtime·gogo(Gobuf*, uintptr); | 654 void runtime·gogo(Gobuf*, uintptr); |
645 void» runtime·gogocall(Gobuf*, void(*)(void)); | 655 void» runtime·gogocall(Gobuf*, void(*)(void), uintptr); |
| 656 void» runtime·gogocallfn(Gobuf*, FuncVal*); |
646 void runtime·gosave(Gobuf*); | 657 void runtime·gosave(Gobuf*); |
647 void runtime·lessstack(void); | 658 void runtime·lessstack(void); |
648 void runtime·goargs(void); | 659 void runtime·goargs(void); |
649 void runtime·goenvs(void); | 660 void runtime·goenvs(void); |
650 void runtime·goenvs_unix(void); | 661 void runtime·goenvs_unix(void); |
651 void* runtime·getu(void); | 662 void* runtime·getu(void); |
652 void runtime·throw(int8*); | 663 void runtime·throw(int8*); |
653 void runtime·panicstring(int8*); | 664 void runtime·panicstring(int8*); |
654 void runtime·prints(int8*); | 665 void runtime·prints(int8*); |
655 void runtime·printf(int8*, ...); | 666 void runtime·printf(int8*, ...); |
(...skipping 22 matching lines...) Expand all Loading... |
678 // this one is actually 'addx', that is, add-and-fetch. | 689 // this one is actually 'addx', that is, add-and-fetch. |
679 uint32 runtime·xadd(uint32 volatile*, int32); | 690 uint32 runtime·xadd(uint32 volatile*, int32); |
680 uint64 runtime·xadd64(uint64 volatile*, int64); | 691 uint64 runtime·xadd64(uint64 volatile*, int64); |
681 uint32 runtime·xchg(uint32 volatile*, uint32); | 692 uint32 runtime·xchg(uint32 volatile*, uint32); |
682 uint32 runtime·atomicload(uint32 volatile*); | 693 uint32 runtime·atomicload(uint32 volatile*); |
683 void runtime·atomicstore(uint32 volatile*, uint32); | 694 void runtime·atomicstore(uint32 volatile*, uint32); |
684 void runtime·atomicstore64(uint64 volatile*, uint64); | 695 void runtime·atomicstore64(uint64 volatile*, uint64); |
685 uint64 runtime·atomicload64(uint64 volatile*); | 696 uint64 runtime·atomicload64(uint64 volatile*); |
686 void* runtime·atomicloadp(void* volatile*); | 697 void* runtime·atomicloadp(void* volatile*); |
687 void runtime·atomicstorep(void* volatile*, void*); | 698 void runtime·atomicstorep(void* volatile*, void*); |
688 void» runtime·jmpdefer(byte*, void*); | 699 void» runtime·jmpdefer(FuncVal*, void*); |
689 void runtime·exit1(int32); | 700 void runtime·exit1(int32); |
690 void runtime·ready(G*); | 701 void runtime·ready(G*); |
691 byte* runtime·getenv(int8*); | 702 byte* runtime·getenv(int8*); |
692 int32 runtime·atoi(byte*); | 703 int32 runtime·atoi(byte*); |
693 void runtime·newosproc(M *mp, G *gp, void *stk, void (*fn)(void)); | 704 void runtime·newosproc(M *mp, G *gp, void *stk, void (*fn)(void)); |
694 void runtime·signalstack(byte*, int32); | |
695 G* runtime·malg(int32); | 705 G* runtime·malg(int32); |
696 void runtime·asminit(void); | 706 void runtime·asminit(void); |
| 707 void runtime·mpreinit(M*); |
697 void runtime·minit(void); | 708 void runtime·minit(void); |
698 void» runtime·mstart(void); | 709 void» runtime·unminit(void); |
| 710 void» runtime·signalstack(byte*, int32); |
699 Func* runtime·findfunc(uintptr); | 711 Func* runtime·findfunc(uintptr); |
700 int32 runtime·funcline(Func*, uintptr); | 712 int32 runtime·funcline(Func*, uintptr); |
701 void* runtime·stackalloc(uint32); | 713 void* runtime·stackalloc(uint32); |
702 void runtime·stackfree(void*, uintptr); | 714 void runtime·stackfree(void*, uintptr); |
703 MCache* runtime·allocmcache(void); | 715 MCache* runtime·allocmcache(void); |
704 void runtime·freemcache(MCache*); | 716 void runtime·freemcache(MCache*); |
705 void runtime·mallocinit(void); | 717 void runtime·mallocinit(void); |
706 void runtime·mprofinit(void); | 718 void runtime·mprofinit(void); |
707 bool runtime·ifaceeq_c(Iface, Iface); | 719 bool runtime·ifaceeq_c(Iface, Iface); |
708 bool runtime·efaceeq_c(Eface, Eface); | 720 bool runtime·efaceeq_c(Eface, Eface); |
709 uintptr runtime·ifacehash(Iface, uintptr); | 721 uintptr runtime·ifacehash(Iface, uintptr); |
710 uintptr runtime·efacehash(Eface, uintptr); | 722 uintptr runtime·efacehash(Eface, uintptr); |
711 void* runtime·malloc(uintptr size); | 723 void* runtime·malloc(uintptr size); |
712 void runtime·free(void *v); | 724 void runtime·free(void *v); |
713 bool» runtime·addfinalizer(void*, void(*fn)(void*), uintptr); | 725 bool» runtime·addfinalizer(void*, FuncVal *fn, uintptr); |
714 void runtime·runpanic(Panic*); | 726 void runtime·runpanic(Panic*); |
715 void* runtime·getcallersp(void*); | 727 void* runtime·getcallersp(void*); |
716 int32 runtime·mcount(void); | 728 int32 runtime·mcount(void); |
717 int32 runtime·gcount(void); | 729 int32 runtime·gcount(void); |
718 void runtime·mcall(void(*)(G*)); | 730 void runtime·mcall(void(*)(G*)); |
719 uint32 runtime·fastrand1(void); | 731 uint32 runtime·fastrand1(void); |
720 | 732 |
| 733 void runtime·setmg(M*, G*); |
| 734 void runtime·newextram(void); |
721 void runtime·exit(int32); | 735 void runtime·exit(int32); |
722 void runtime·breakpoint(void); | 736 void runtime·breakpoint(void); |
723 void runtime·gosched(void); | 737 void runtime·gosched(void); |
724 void runtime·park(void(*)(Lock*), Lock*, int8*); | 738 void runtime·park(void(*)(Lock*), Lock*, int8*); |
725 void runtime·tsleep(int64, int8*); | 739 void runtime·tsleep(int64, int8*); |
726 M* runtime·newm(void); | 740 M* runtime·newm(void); |
727 void runtime·goexit(void); | 741 void runtime·goexit(void); |
728 void runtime·asmcgocall(void (*fn)(void*), void*); | 742 void runtime·asmcgocall(void (*fn)(void*), void*); |
729 void runtime·entersyscall(void); | 743 void runtime·entersyscall(void); |
730 void runtime·entersyscallblock(void); | 744 void runtime·entersyscallblock(void); |
731 void runtime·exitsyscall(void); | 745 void runtime·exitsyscall(void); |
732 G*» runtime·newproc1(byte*, byte*, int32, int32, void*); | 746 G*» runtime·newproc1(FuncVal*, byte*, int32, int32, void*); |
733 bool runtime·sigsend(int32 sig); | 747 bool runtime·sigsend(int32 sig); |
734 int32 runtime·callers(int32, uintptr*, int32); | 748 int32 runtime·callers(int32, uintptr*, int32); |
735 int32 runtime·gentraceback(byte*, byte*, byte*, G*, int32, uintptr*, int32); | 749 int32 runtime·gentraceback(byte*, byte*, byte*, G*, int32, uintptr*, int32); |
736 int64 runtime·nanotime(void); | 750 int64 runtime·nanotime(void); |
737 void runtime·dopanic(int32); | 751 void runtime·dopanic(int32); |
738 void runtime·startpanic(void); | 752 void runtime·startpanic(void); |
739 void runtime·unwindstack(G*, byte*); | 753 void runtime·unwindstack(G*, byte*); |
740 void runtime·sigprof(uint8 *pc, uint8 *sp, uint8 *lr, G *gp); | 754 void runtime·sigprof(uint8 *pc, uint8 *sp, uint8 *lr, G *gp); |
741 void runtime·resetcpuprofiler(int32); | 755 void runtime·resetcpuprofiler(int32); |
742 void runtime·setcpuprofilerate(void(*)(uintptr*, int32), int32); | 756 void runtime·setcpuprofilerate(void(*)(uintptr*, int32), int32); |
743 void runtime·usleep(uint32); | 757 void runtime·usleep(uint32); |
744 int64 runtime·cputicks(void); | 758 int64 runtime·cputicks(void); |
745 G* runtime·netwait(uint32, uint32); | |
746 bool runtime·addtimer(Timer*); | |
747 bool runtime·deltimer(Timer*); | |
748 int64 runtime·tickspersecond(void); | 759 int64 runtime·tickspersecond(void); |
749 void runtime·blockevent(int64, int32); | 760 void runtime·blockevent(int64, int32); |
750 extern int64 runtime·blockprofilerate; | 761 extern int64 runtime·blockprofilerate; |
751 | 762 |
752 #pragma varargck argpos runtime·printf 1 | 763 #pragma varargck argpos runtime·printf 1 |
753 #pragma varargck type "d" int32 | 764 #pragma varargck type "d" int32 |
754 #pragma varargck type "d" uint32 | 765 #pragma varargck type "d" uint32 |
755 #pragma varargck type "D" int64 | 766 #pragma varargck type "D" int64 |
756 #pragma varargck type "D" uint64 | 767 #pragma varargck type "D" uint64 |
757 #pragma varargck type "x" int32 | 768 #pragma varargck type "x" int32 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 void runtime·munmap(byte*, uintptr); | 860 void runtime·munmap(byte*, uintptr); |
850 void runtime·madvise(byte*, uintptr, int32); | 861 void runtime·madvise(byte*, uintptr, int32); |
851 void runtime·memclr(byte*, uintptr); | 862 void runtime·memclr(byte*, uintptr); |
852 void runtime·setcallerpc(void*, void*); | 863 void runtime·setcallerpc(void*, void*); |
853 void* runtime·getcallerpc(void*); | 864 void* runtime·getcallerpc(void*); |
854 | 865 |
855 /* | 866 /* |
856 * runtime go-called | 867 * runtime go-called |
857 */ | 868 */ |
858 void runtime·printbool(bool); | 869 void runtime·printbool(bool); |
| 870 void runtime·printbyte(int8); |
859 void runtime·printfloat(float64); | 871 void runtime·printfloat(float64); |
860 void runtime·printint(int64); | 872 void runtime·printint(int64); |
861 void runtime·printiface(Iface); | 873 void runtime·printiface(Iface); |
862 void runtime·printeface(Eface); | 874 void runtime·printeface(Eface); |
863 void runtime·printstring(String); | 875 void runtime·printstring(String); |
864 void runtime·printpc(void*); | 876 void runtime·printpc(void*); |
865 void runtime·printpointer(void*); | 877 void runtime·printpointer(void*); |
866 void runtime·printuint(uint64); | 878 void runtime·printuint(uint64); |
867 void runtime·printhex(uint64); | 879 void runtime·printhex(uint64); |
868 void runtime·printslice(Slice); | 880 void runtime·printslice(Slice); |
869 void runtime·printcomplex(Complex128); | 881 void runtime·printcomplex(Complex128); |
870 void» reflect·call(byte*, byte*, uint32); | 882 void» reflect·call(FuncVal*, byte*, uint32); |
871 void runtime·panic(Eface); | 883 void runtime·panic(Eface); |
872 void runtime·panicindex(void); | 884 void runtime·panicindex(void); |
873 void runtime·panicslice(void); | 885 void runtime·panicslice(void); |
874 | 886 |
875 /* | 887 /* |
876 * runtime c-called (but written in Go) | 888 * runtime c-called (but written in Go) |
877 */ | 889 */ |
878 void runtime·printany(Eface); | 890 void runtime·printany(Eface); |
879 void runtime·newTypeAssertionError(String*, String*, String*, String*, Eface*
); | 891 void runtime·newTypeAssertionError(String*, String*, String*, String*, Eface*
); |
880 void runtime·newErrorString(String, Eface*); | 892 void runtime·newErrorString(String, Eface*); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 extern float64 runtime·neginf; | 955 extern float64 runtime·neginf; |
944 extern uint64 ·nan; | 956 extern uint64 ·nan; |
945 extern uint64 ·posinf; | 957 extern uint64 ·posinf; |
946 extern uint64 ·neginf; | 958 extern uint64 ·neginf; |
947 #define ISNAN(f) ((f) != (f)) | 959 #define ISNAN(f) ((f) != (f)) |
948 | 960 |
949 enum | 961 enum |
950 { | 962 { |
951 UseSpanType = 1, | 963 UseSpanType = 1, |
952 }; | 964 }; |
LEFT | RIGHT |