int32 runtime·pread(int32 fd, void *buf, int32 nbytes, int64 offset);
int32 runtime·pwrite(int32 fd, void *buf, int32 nbytes, int64 offset);
int64 runtime·seek(int32 fd, int64 offset, int32 whence);
void runtime·exits(int8* msg);
intptr runtime·brk_(void*);
int32 runtime·sleep(int32 ms);
int32 runtime·rfork(int32 flags, void *stk, M *mp, G *gp, void (*fn)(void));
int32 runtime·plan9_semacquire(uint32 *addr, int32 block);
int32 runtime·plan9_tsemacquire(uint32 *addr, int32 ms);
int32 runtime·plan9_semrelease(uint32 *addr, int32 count);
int32 runtime·notify(void (*fn)(void*, int8*));
int32 runtime·noted(int32);
void runtime·sigtramp(void*, int8*);
void runtime·sigpanic(void);
void runtime·goexitsall(int8*);
void runtime·setfpmasks(void);
enum
{
OREAD = 0,
OWRITE = 1,
ORDWR = 2,
OEXEC = 3,
OTRUNC = 16,
OCEXEC = 32,
ORCLOSE = 64,
OEXCL = 0x1000
};
enum
{
RFNAMEG = (1<<0),
RFENVG = (1<<1),
RFFDG = (1<<2),
RFNOTEG = (1<<3),
RFPROC = (1<<4),
RFMEM = (1<<5),
RFNOWAIT = (1<<6),
RFCNAMEG = (1<<10),
RFCENVG = (1<<11),
RFCFDG = (1<<12),
RFREND = (1<<13),
RFNOMNT = (1<<14)
};
enum
{
NCONT = 0,
NDFLT = 1
};
typedef struct Tos Tos;
typedef intptr Plink;
struct Tos {
struct
{
Plink *pp;
Plink *next;
Plink *last;
Plink *first;
uint32 pid;
uint32 what;
} prof;
uint64 cyclefreq;
int64 kcycles;
int64 pcycles;
uint32 pid;
uint32 clock;
};
#define NSIG 14
#define ERRMAX 128
#define SIGRFAULT 2
#define SIGWFAULT 3
#define SIGINTDIV 4
#define SIGFLOAT 5
#define SIGTRAP 6