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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 Panic* link; // link to earlier panic | 650 Panic* link; // link to earlier panic |
651 bool recovered; // whether this panic is over | 651 bool recovered; // whether this panic is over |
652 }; | 652 }; |
653 | 653 |
654 /* | 654 /* |
655 * stack traces | 655 * stack traces |
656 */ | 656 */ |
657 typedef struct Stkframe Stkframe; | 657 typedef struct Stkframe Stkframe; |
658 struct Stkframe | 658 struct Stkframe |
659 { | 659 { |
660 » Func *fn;» // function being run | 660 » Func*» fn;» // function being run |
661 » uintptr pc;» // program counter within fn | 661 » uintptr»pc;» // program counter within fn |
662 » uintptr lr;» // program counter at caller aka link register | 662 » uintptr»lr;» // program counter at caller aka link register |
663 » uintptr sp;» // stack pointer at pc | 663 » uintptr»sp;» // stack pointer at pc |
664 » uintptr fp;» // stack pointer at caller aka frame pointer | 664 » uintptr»fp;» // stack pointer at caller aka frame pointer |
665 » byte* argp;» // pointer to function arguments | 665 » byte*» argp;» // pointer to function arguments |
666 » uintptr arglen;»// number of bytes at argp | 666 » uintptr»arglen;»// number of bytes at argp |
667 » byte *varp;» // pointer to local variables | 667 » byte*» varp;» // pointer to local variables |
668 » uintptr varlen;»// number of bytes at varp | 668 » uintptr»varlen;»// number of bytes at varp |
669 }; | 669 }; |
670 | 670 |
671 int32 runtime·gentraceback(uintptr, uintptr, uintptr, G*, int32, uintptr*, int
32, void(*)(Stkframe*, void*), void*); | 671 int32 runtime·gentraceback(uintptr, uintptr, uintptr, G*, int32, uintptr*, int
32, void(*)(Stkframe*, void*), void*); |
672 | 672 void» runtime·traceback(uintptr pc, uintptr sp, uintptr lr, G* gp); |
| 673 void» runtime·tracebackothers(G*); |
673 | 674 |
674 /* | 675 /* |
675 * external data | 676 * external data |
676 */ | 677 */ |
677 extern String runtime·emptystring; | 678 extern String runtime·emptystring; |
678 extern uintptr runtime·zerobase; | 679 extern uintptr runtime·zerobase; |
679 extern G* runtime·allg; | 680 extern G* runtime·allg; |
680 extern G* runtime·lastg; | 681 extern G* runtime·lastg; |
681 extern M* runtime·allm; | 682 extern M* runtime·allm; |
682 extern P** runtime·allp; | 683 extern P** runtime·allp; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 String runtime·gostring(byte*); | 732 String runtime·gostring(byte*); |
732 String runtime·gostringn(byte*, intgo); | 733 String runtime·gostringn(byte*, intgo); |
733 Slice runtime·gobytes(byte*, intgo); | 734 Slice runtime·gobytes(byte*, intgo); |
734 String runtime·gostringnocopy(byte*); | 735 String runtime·gostringnocopy(byte*); |
735 String runtime·gostringw(uint16*); | 736 String runtime·gostringw(uint16*); |
736 void runtime·initsig(void); | 737 void runtime·initsig(void); |
737 void runtime·sigenable(uint32 sig); | 738 void runtime·sigenable(uint32 sig); |
738 void runtime·sigdisable(uint32 sig); | 739 void runtime·sigdisable(uint32 sig); |
739 int32 runtime·gotraceback(bool *crash); | 740 int32 runtime·gotraceback(bool *crash); |
740 void runtime·goroutineheader(G*); | 741 void runtime·goroutineheader(G*); |
741 void runtime·traceback(uintptr pc, uintptr sp, uintptr lr, G* gp); | |
742 void runtime·tracebackothers(G*); | |
743 int32 runtime·open(int8*, int32, int32); | 742 int32 runtime·open(int8*, int32, int32); |
744 int32 runtime·read(int32, void*, int32); | 743 int32 runtime·read(int32, void*, int32); |
745 int32 runtime·write(int32, void*, int32); | 744 int32 runtime·write(int32, void*, int32); |
746 int32 runtime·close(int32); | 745 int32 runtime·close(int32); |
747 int32 runtime·mincore(void*, uintptr, byte*); | 746 int32 runtime·mincore(void*, uintptr, byte*); |
748 bool runtime·cas(uint32*, uint32, uint32); | 747 bool runtime·cas(uint32*, uint32, uint32); |
749 bool runtime·cas64(uint64*, uint64*, uint64); | 748 bool runtime·cas64(uint64*, uint64*, uint64); |
750 bool runtime·casp(void**, void*, void*); | 749 bool runtime·casp(void**, void*, void*); |
751 // Don't confuse with XADD x86 instruction, | 750 // Don't confuse with XADD x86 instruction, |
752 // this one is actually 'addx', that is, add-and-fetch. | 751 // this one is actually 'addx', that is, add-and-fetch. |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 extern float64 runtime·neginf; | 1028 extern float64 runtime·neginf; |
1030 extern uint64 ·nan; | 1029 extern uint64 ·nan; |
1031 extern uint64 ·posinf; | 1030 extern uint64 ·posinf; |
1032 extern uint64 ·neginf; | 1031 extern uint64 ·neginf; |
1033 #define ISNAN(f) ((f) != (f)) | 1032 #define ISNAN(f) ((f) != (f)) |
1034 | 1033 |
1035 enum | 1034 enum |
1036 { | 1035 { |
1037 UseSpanType = 1, | 1036 UseSpanType = 1, |
1038 }; | 1037 }; |
LEFT | RIGHT |