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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 int32 runqtail; | 352 int32 runqtail; |
353 int32 runqsize; | 353 int32 runqsize; |
354 | 354 |
355 // Available G's (status == Gdead) | 355 // Available G's (status == Gdead) |
356 G* gfree; | 356 G* gfree; |
357 int32 gfreecnt; | 357 int32 gfreecnt; |
358 | 358 |
359 byte pad[64]; | 359 byte pad[64]; |
360 }; | 360 }; |
361 | 361 |
362 // The m->locked word holds a single bit saying whether | 362 // The m->locked word holds two pieces of state counting active calls to LockOST
hread/lockOSThread. |
363 // external calls to LockOSThread are in effect, and then a counter | 363 // The low bit (LockExternal) is a boolean reporting whether any LockOSThread ca
ll is active. |
364 // of the internal nesting depth of lockOSThread / unlockOSThread. | 364 // External locks are not recursive; a second lock is silently ignored. |
| 365 // The upper bits of m->lockedcount record the nesting depth of calls to lockOST
hread |
| 366 // (counting up by LockInternal), popped by unlockOSThread (counting down by Loc
kInternal). |
| 367 // Internal locks can be recursive. For instance, a lock for cgo can occur while
the main |
| 368 // goroutine is holding the lock during the initialization phase. |
365 enum | 369 enum |
366 { | 370 { |
367 LockExternal = 1, | 371 LockExternal = 1, |
368 LockInternal = 2, | 372 LockInternal = 2, |
369 }; | 373 }; |
370 | 374 |
371 struct Stktop | 375 struct Stktop |
372 { | 376 { |
373 // The offsets of these fields are known to (hard-coded in) libmach. | 377 // The offsets of these fields are known to (hard-coded in) libmach. |
374 uintptr stackguard; | 378 uintptr stackguard; |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 extern float64 runtime·neginf; | 1053 extern float64 runtime·neginf; |
1050 extern uint64 ·nan; | 1054 extern uint64 ·nan; |
1051 extern uint64 ·posinf; | 1055 extern uint64 ·posinf; |
1052 extern uint64 ·neginf; | 1056 extern uint64 ·neginf; |
1053 #define ISNAN(f) ((f) != (f)) | 1057 #define ISNAN(f) ((f) != (f)) |
1054 | 1058 |
1055 enum | 1059 enum |
1056 { | 1060 { |
1057 UseSpanType = 1, | 1061 UseSpanType = 1, |
1058 }; | 1062 }; |
OLD | NEW |