diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-08-03 16:54:30 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-08-03 16:54:30 +0200 |
commit | 28592ee1ea1f5cdffcf85472f9de0285d928cf12 (patch) | |
tree | 32944e18b23f7fe4a0818a694aa2a6dfb1835463 /src/pkg/runtime/plan9/os.h | |
parent | e836bee4716dc0d4d913537ad3ad1925a7ac32d0 (diff) | |
download | golang-upstream/59.tar.gz |
Imported Upstream version 59upstream/59
Diffstat (limited to 'src/pkg/runtime/plan9/os.h')
-rw-r--r-- | src/pkg/runtime/plan9/os.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/pkg/runtime/plan9/os.h b/src/pkg/runtime/plan9/os.h index 9444acc98..b2f7357ec 100644 --- a/src/pkg/runtime/plan9/os.h +++ b/src/pkg/runtime/plan9/os.h @@ -6,6 +6,14 @@ extern int32 runtime·write(int32 fd, void* buffer, int32 nbytes); extern void runtime·exits(int8* msg); extern int32 runtime·brk_(void*); +/* open */ +enum +{ + OREAD = 0, + OWRITE = 1, + ORDWR = 2 +}; + /* rfork */ enum { @@ -22,6 +30,28 @@ enum RFREND = (1<<13), RFNOMNT = (1<<14) }; + +typedef struct Tos Tos; +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; + uint32 pid; + uint32 what; + } prof; + uint64 cyclefreq; /* cycle clock frequency if there is one, 0 otherwise */ + int64 kcycles; /* cycles spent in kernel */ + int64 pcycles; /* cycles spent in process (kernel + user) */ + uint32 pid; /* might as well put the pid here */ + uint32 clock; + /* top of stack is here */ +}; + extern int32 runtime·rfork(int32 flags, void *stk, M *m, G *g, void (*fn)(void)); extern int32 runtime·plan9_semacquire(uint32 *addr, int32 block); extern int32 runtime·plan9_semrelease(uint32 *addr, int32 count); |