zsyscall_plan9_arm.go 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. // go run mksyscall.go -l32 -plan9 -tags plan9,arm syscall_plan9.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build plan9,arm
  4. package plan9
  5. import "unsafe"
  6. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  7. func fd2path(fd int, buf []byte) (err error) {
  8. var _p0 unsafe.Pointer
  9. if len(buf) > 0 {
  10. _p0 = unsafe.Pointer(&buf[0])
  11. } else {
  12. _p0 = unsafe.Pointer(&_zero)
  13. }
  14. r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  15. if int32(r0) == -1 {
  16. err = e1
  17. }
  18. return
  19. }
  20. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  21. func pipe(p *[2]int32) (err error) {
  22. r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  23. if int32(r0) == -1 {
  24. err = e1
  25. }
  26. return
  27. }
  28. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  29. func await(s []byte) (n int, err error) {
  30. var _p0 unsafe.Pointer
  31. if len(s) > 0 {
  32. _p0 = unsafe.Pointer(&s[0])
  33. } else {
  34. _p0 = unsafe.Pointer(&_zero)
  35. }
  36. r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)
  37. n = int(r0)
  38. if int32(r0) == -1 {
  39. err = e1
  40. }
  41. return
  42. }
  43. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  44. func open(path string, mode int) (fd int, err error) {
  45. var _p0 *byte
  46. _p0, err = BytePtrFromString(path)
  47. if err != nil {
  48. return
  49. }
  50. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  51. fd = int(r0)
  52. if int32(r0) == -1 {
  53. err = e1
  54. }
  55. return
  56. }
  57. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  58. func create(path string, mode int, perm uint32) (fd int, err error) {
  59. var _p0 *byte
  60. _p0, err = BytePtrFromString(path)
  61. if err != nil {
  62. return
  63. }
  64. r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  65. fd = int(r0)
  66. if int32(r0) == -1 {
  67. err = e1
  68. }
  69. return
  70. }
  71. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  72. func remove(path string) (err error) {
  73. var _p0 *byte
  74. _p0, err = BytePtrFromString(path)
  75. if err != nil {
  76. return
  77. }
  78. r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  79. if int32(r0) == -1 {
  80. err = e1
  81. }
  82. return
  83. }
  84. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  85. func stat(path string, edir []byte) (n int, err error) {
  86. var _p0 *byte
  87. _p0, err = BytePtrFromString(path)
  88. if err != nil {
  89. return
  90. }
  91. var _p1 unsafe.Pointer
  92. if len(edir) > 0 {
  93. _p1 = unsafe.Pointer(&edir[0])
  94. } else {
  95. _p1 = unsafe.Pointer(&_zero)
  96. }
  97. r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
  98. n = int(r0)
  99. if int32(r0) == -1 {
  100. err = e1
  101. }
  102. return
  103. }
  104. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  105. func bind(name string, old string, flag int) (err error) {
  106. var _p0 *byte
  107. _p0, err = BytePtrFromString(name)
  108. if err != nil {
  109. return
  110. }
  111. var _p1 *byte
  112. _p1, err = BytePtrFromString(old)
  113. if err != nil {
  114. return
  115. }
  116. r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
  117. if int32(r0) == -1 {
  118. err = e1
  119. }
  120. return
  121. }
  122. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  123. func mount(fd int, afd int, old string, flag int, aname string) (err error) {
  124. var _p0 *byte
  125. _p0, err = BytePtrFromString(old)
  126. if err != nil {
  127. return
  128. }
  129. var _p1 *byte
  130. _p1, err = BytePtrFromString(aname)
  131. if err != nil {
  132. return
  133. }
  134. r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)
  135. if int32(r0) == -1 {
  136. err = e1
  137. }
  138. return
  139. }
  140. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  141. func wstat(path string, edir []byte) (err error) {
  142. var _p0 *byte
  143. _p0, err = BytePtrFromString(path)
  144. if err != nil {
  145. return
  146. }
  147. var _p1 unsafe.Pointer
  148. if len(edir) > 0 {
  149. _p1 = unsafe.Pointer(&edir[0])
  150. } else {
  151. _p1 = unsafe.Pointer(&_zero)
  152. }
  153. r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
  154. if int32(r0) == -1 {
  155. err = e1
  156. }
  157. return
  158. }
  159. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  160. func chdir(path string) (err error) {
  161. var _p0 *byte
  162. _p0, err = BytePtrFromString(path)
  163. if err != nil {
  164. return
  165. }
  166. r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  167. if int32(r0) == -1 {
  168. err = e1
  169. }
  170. return
  171. }
  172. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  173. func Dup(oldfd int, newfd int) (fd int, err error) {
  174. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)
  175. fd = int(r0)
  176. if int32(r0) == -1 {
  177. err = e1
  178. }
  179. return
  180. }
  181. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  182. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  183. var _p0 unsafe.Pointer
  184. if len(p) > 0 {
  185. _p0 = unsafe.Pointer(&p[0])
  186. } else {
  187. _p0 = unsafe.Pointer(&_zero)
  188. }
  189. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  190. n = int(r0)
  191. if int32(r0) == -1 {
  192. err = e1
  193. }
  194. return
  195. }
  196. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  197. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  198. var _p0 unsafe.Pointer
  199. if len(p) > 0 {
  200. _p0 = unsafe.Pointer(&p[0])
  201. } else {
  202. _p0 = unsafe.Pointer(&_zero)
  203. }
  204. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  205. n = int(r0)
  206. if int32(r0) == -1 {
  207. err = e1
  208. }
  209. return
  210. }
  211. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  212. func Close(fd int) (err error) {
  213. r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  214. if int32(r0) == -1 {
  215. err = e1
  216. }
  217. return
  218. }
  219. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  220. func Fstat(fd int, edir []byte) (n int, err error) {
  221. var _p0 unsafe.Pointer
  222. if len(edir) > 0 {
  223. _p0 = unsafe.Pointer(&edir[0])
  224. } else {
  225. _p0 = unsafe.Pointer(&_zero)
  226. }
  227. r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
  228. n = int(r0)
  229. if int32(r0) == -1 {
  230. err = e1
  231. }
  232. return
  233. }
  234. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  235. func Fwstat(fd int, edir []byte) (err error) {
  236. var _p0 unsafe.Pointer
  237. if len(edir) > 0 {
  238. _p0 = unsafe.Pointer(&edir[0])
  239. } else {
  240. _p0 = unsafe.Pointer(&_zero)
  241. }
  242. r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
  243. if int32(r0) == -1 {
  244. err = e1
  245. }
  246. return
  247. }