Commit f611ae1c authored by Russ Cox's avatar Russ Cox

runtime: include os_*.h in the generated Go structs

Adding the #include to defs.c makes it get processed
by cmd/dist, which writes out Go equivalent for all the
C data structures defined in defs.c.

This in turn makes it necessary to define the Plink type,
used in os_plan9.h, in os_plan9.go. Rename it to _Plink
to avoid being exported.

LGTM=0intro, iant
R=golang-codereviews, iant, 0intro
CC=golang-codereviews, r
https://golang.org/cl/132490043
parent 3de7ba18
......@@ -13,3 +13,4 @@
#include "chan.h"
#include "mprof.h"
#include "defs_GOOS_GOARCH.h"
#include "os_GOOS.h"
......@@ -26,3 +26,5 @@ func errstr() string
// The size of the note handler frame varies among architectures,
// but 512 bytes should be enough for every implementation.
const stackSystem = 512
type _Plink uintptr
......@@ -59,15 +59,15 @@ enum
};
typedef struct Tos Tos;
typedef intptr Plink;
typedef intptr _Plink;
struct Tos {
struct /* Per process profiling */
{
Plink *pp; /* known to be 0(ptr) */
Plink *next; /* known to be 4(ptr) */
Plink *last;
Plink *first;
_Plink *pp; /* known to be 0(ptr) */
_Plink *next; /* known to be 4(ptr) */
_Plink *last;
_Plink *first;
uint32 pid;
uint32 what;
} prof;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment