diff options
Diffstat (limited to 'src/pkg/runtime/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 24591995c8..61e33eb95e 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -52,6 +52,7 @@ typedef struct G G; typedef struct Gobuf Gobuf; typedef union Lock Lock; typedef struct M M; +typedef struct P P; typedef struct Mem Mem; typedef union Note Note; typedef struct Slice Slice; @@ -312,6 +313,17 @@ struct M uintptr end[]; }; +struct P +{ + Lock; + + // Queue of runnable goroutines. + G** runq; + int32 runqhead; + int32 runqtail; + int32 runqsize; +}; + // The m->locked word holds a single bit saying whether // external calls to LockOSThread are in effect, and then a counter // of the internal nesting depth of lockOSThread / unlockOSThread. |
