OLD | NEW |
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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 | 366 |
367 int32 id; | 367 int32 id; |
368 uint32 status; // one of Pidle/Prunning/... | 368 uint32 status; // one of Pidle/Prunning/... |
369 P* link; | 369 P* link; |
370 uint32 schedtick; // incremented on every scheduler call | 370 uint32 schedtick; // incremented on every scheduler call |
371 uint32 syscalltick; // incremented on every system call | 371 uint32 syscalltick; // incremented on every system call |
372 M* m; // back-link to associated M (nil if idle) | 372 M* m; // back-link to associated M (nil if idle) |
373 MCache* mcache; | 373 MCache* mcache; |
374 | 374 |
375 // Queue of runnable goroutines. | 375 // Queue of runnable goroutines. |
376 » G**» runq; | 376 » uint32» runqhead; |
377 » int32» runqhead; | 377 » uint32» runqtail; |
378 » int32» runqtail; | 378 » G*» runq[256]; |
379 » int32» runqsize; | |
380 | 379 |
381 // Available G's (status == Gdead) | 380 // Available G's (status == Gdead) |
382 G* gfree; | 381 G* gfree; |
383 int32 gfreecnt; | 382 int32 gfreecnt; |
384 | 383 |
385 byte pad[64]; | 384 byte pad[64]; |
386 }; | 385 }; |
387 | 386 |
388 // 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. |
389 // The low bit (LockExternal) is a boolean reporting whether any LockOSThread ca
ll is active. | 388 // The low bit (LockExternal) is a boolean reporting whether any LockOSThread ca
ll is active. |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 extern float64 runtime·neginf; | 1055 extern float64 runtime·neginf; |
1057 extern uint64 ·nan; | 1056 extern uint64 ·nan; |
1058 extern uint64 ·posinf; | 1057 extern uint64 ·posinf; |
1059 extern uint64 ·neginf; | 1058 extern uint64 ·neginf; |
1060 #define ISNAN(f) ((f) != (f)) | 1059 #define ISNAN(f) ((f) != (f)) |
1061 | 1060 |
1062 enum | 1061 enum |
1063 { | 1062 { |
1064 UseSpanType = 1, | 1063 UseSpanType = 1, |
1065 }; | 1064 }; |
OLD | NEW |