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
#include "chan.h"
#include "mprof.h"
#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
// 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
};
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;