LEFT | RIGHT |
1 // Copyright 2010 The Go Authors. All rights reserved. | 1 // Copyright 2010 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Plan 9-specific system calls | 5 // Plan 9-specific system calls |
6 int32 runtime·open(uint8 *file, int32 mode); | 6 int32 runtime·open(uint8 *file, int32 mode); |
7 int32 runtime·pread(int32 fd, void *buf, int32 nbytes, int64 offset); | 7 int32 runtime·pread(int32 fd, void *buf, int32 nbytes, int64 offset); |
8 int32 runtime·pwrite(int32 fd, void *buf, int32 nbytes, int64 offset); | 8 int32 runtime·pwrite(int32 fd, void *buf, int32 nbytes, int64 offset); |
9 int32 runtime·read(int32 fd, void *buf, int32 nbytes); | 9 int32 runtime·read(int32 fd, void *buf, int32 nbytes); |
| 10 int64 runtime·seek(int32 fd, int64 offset, int32 whence); |
10 int32 runtime·close(int32 fd); | 11 int32 runtime·close(int32 fd); |
11 void runtime·exits(int8* msg); | 12 void runtime·exits(int8* msg); |
12 intptr runtime·brk_(void*); | 13 intptr runtime·brk_(void*); |
13 int32 runtime·sleep(int32 ms); | 14 int32 runtime·sleep(int32 ms); |
14 int32» runtime·rfork(int32 flags, void *stk, M *m, G *g, void (*fn)(void)); | 15 int32» runtime·rfork(int32 flags, void *stk, M *mp, G *gp, void (*fn)(void)); |
15 int32 runtime·plan9_semacquire(uint32 *addr, int32 block); | 16 int32 runtime·plan9_semacquire(uint32 *addr, int32 block); |
16 int32 runtime·plan9_tsemacquire(uint32 *addr, int32 ms); | 17 int32 runtime·plan9_tsemacquire(uint32 *addr, int32 ms); |
17 int32 runtime·plan9_semrelease(uint32 *addr, int32 count); | 18 int32 runtime·plan9_semrelease(uint32 *addr, int32 count); |
18 int32 runtime·notify(void (*fn)(void*, int8*)); | 19 int32 runtime·notify(void (*fn)(void*, int8*)); |
19 int32 runtime·noted(int32); | 20 int32 runtime·noted(int32); |
20 void runtime·sigtramp(void*, int8*); | 21 void runtime·sigtramp(void*, int8*); |
21 int32 runtime·sighandler(void*, int8*, G*); | 22 int32 runtime·sighandler(void*, int8*, G*); |
22 void runtime·sigpanic(void); | 23 void runtime·sigpanic(void); |
23 void runtime·goexitsall(int8*); | 24 void runtime·goexitsall(int8*); |
| 25 void runtime·setfpmasks(void); |
24 | 26 |
25 /* open */ | 27 /* open */ |
26 enum | 28 enum |
27 { | 29 { |
28 OREAD = 0, | 30 OREAD = 0, |
29 OWRITE = 1, | 31 OWRITE = 1, |
30 ORDWR = 2, | 32 ORDWR = 2, |
31 OEXEC = 3, | 33 OEXEC = 3, |
32 OTRUNC = 16, | 34 OTRUNC = 16, |
33 OCEXEC = 32, | 35 OCEXEC = 32, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 uint32 what; | 75 uint32 what; |
74 } prof; | 76 } prof; |
75 uint64 cyclefreq; /* cycle clock frequency if there is one, 0 othe
rwise */ | 77 uint64 cyclefreq; /* cycle clock frequency if there is one, 0 othe
rwise */ |
76 int64 kcycles; /* cycles spent in kernel */ | 78 int64 kcycles; /* cycles spent in kernel */ |
77 int64 pcycles; /* cycles spent in process (kernel + user) */ | 79 int64 pcycles; /* cycles spent in process (kernel + user) */ |
78 uint32 pid; /* might as well put the pid here */ | 80 uint32 pid; /* might as well put the pid here */ |
79 uint32 clock; | 81 uint32 clock; |
80 /* top of stack is here */ | 82 /* top of stack is here */ |
81 }; | 83 }; |
82 | 84 |
83 #define»NSIG 5 | 85 #define»NSIG» 5» /* number of signals in runtime·SigTab array */ |
| 86 #define»ERRMAX» 128» /* max length of note string */ |
LEFT | RIGHT |