OLD | NEW |
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 int64 runtime·seek(int32 fd, int64 offset, int32 whence); |
11 int32 runtime·close(int32 fd); | 11 int32 runtime·close(int32 fd); |
12 void runtime·exits(int8* msg); | 12 void runtime·exits(int8* msg); |
13 intptr runtime·brk_(void*); | 13 intptr runtime·brk_(void*); |
14 int32 runtime·sleep(int32 ms); | 14 int32 runtime·sleep(int32 ms); |
15 int32 runtime·rfork(int32 flags, void *stk, M *mp, G *gp, void (*fn)(void)); | 15 int32 runtime·rfork(int32 flags, void *stk, M *mp, G *gp, void (*fn)(void)); |
16 int32 runtime·plan9_semacquire(uint32 *addr, int32 block); | 16 int32 runtime·plan9_semacquire(uint32 *addr, int32 block); |
17 int32 runtime·plan9_tsemacquire(uint32 *addr, int32 ms); | 17 int32 runtime·plan9_tsemacquire(uint32 *addr, int32 ms); |
18 int32 runtime·plan9_semrelease(uint32 *addr, int32 count); | 18 int32 runtime·plan9_semrelease(uint32 *addr, int32 count); |
19 int32» runtime·notify(void (*fn)(void*, byte*)); | 19 int32» runtime·notify(void (*fn)(void*, int8*)); |
20 int32 runtime·noted(int32); | 20 int32 runtime·noted(int32); |
21 void» runtime·gonote(void*, byte*); | 21 void» runtime·sigtramp(void*, int8*); |
| 22 int32» runtime·sighandler(void*, int8*, G*); |
| 23 void» runtime·sigpanic(void); |
| 24 void» runtime·goexitsall(int8*); |
22 void runtime·setfpmasks(void); | 25 void runtime·setfpmasks(void); |
23 | 26 |
24 /* open */ | 27 /* open */ |
25 enum | 28 enum |
26 { | 29 { |
27 OREAD = 0, | 30 OREAD = 0, |
28 OWRITE = 1, | 31 OWRITE = 1, |
29 ORDWR = 2, | 32 ORDWR = 2, |
30 OEXEC = 3, | 33 OEXEC = 3, |
31 OTRUNC = 16, | 34 OTRUNC = 16, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 uint32 what; | 75 uint32 what; |
73 } prof; | 76 } prof; |
74 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 */ |
75 int64 kcycles; /* cycles spent in kernel */ | 78 int64 kcycles; /* cycles spent in kernel */ |
76 int64 pcycles; /* cycles spent in process (kernel + user) */ | 79 int64 pcycles; /* cycles spent in process (kernel + user) */ |
77 uint32 pid; /* might as well put the pid here */ | 80 uint32 pid; /* might as well put the pid here */ |
78 uint32 clock; | 81 uint32 clock; |
79 /* top of stack is here */ | 82 /* top of stack is here */ |
80 }; | 83 }; |
81 | 84 |
82 #define»NSIG 1 | 85 #define»NSIG» 5» /* number of signals in runtime·SigTab array */ |
| 86 #define»ERRMAX» 128» /* max length of note string */ |
OLD | NEW |