zsyscall_netbsd_arm.go 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368
  1. // mksyscall.pl -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build netbsd,arm
  4. package unix
  5. import (
  6. "syscall"
  7. "unsafe"
  8. )
  9. var _ syscall.Errno
  10. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  11. func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
  12. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  13. n = int(r0)
  14. if e1 != 0 {
  15. err = errnoErr(e1)
  16. }
  17. return
  18. }
  19. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  20. func setgroups(ngid int, gid *_Gid_t) (err error) {
  21. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  22. if e1 != 0 {
  23. err = errnoErr(e1)
  24. }
  25. return
  26. }
  27. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  28. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  29. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  30. wpid = int(r0)
  31. if e1 != 0 {
  32. err = errnoErr(e1)
  33. }
  34. return
  35. }
  36. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  37. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  38. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  39. fd = int(r0)
  40. if e1 != 0 {
  41. err = errnoErr(e1)
  42. }
  43. return
  44. }
  45. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  46. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  47. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  48. if e1 != 0 {
  49. err = errnoErr(e1)
  50. }
  51. return
  52. }
  53. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  54. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  55. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  56. if e1 != 0 {
  57. err = errnoErr(e1)
  58. }
  59. return
  60. }
  61. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  62. func socket(domain int, typ int, proto int) (fd int, err error) {
  63. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  64. fd = int(r0)
  65. if e1 != 0 {
  66. err = errnoErr(e1)
  67. }
  68. return
  69. }
  70. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  71. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  72. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  73. if e1 != 0 {
  74. err = errnoErr(e1)
  75. }
  76. return
  77. }
  78. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  79. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  80. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  81. if e1 != 0 {
  82. err = errnoErr(e1)
  83. }
  84. return
  85. }
  86. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  87. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  88. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  89. if e1 != 0 {
  90. err = errnoErr(e1)
  91. }
  92. return
  93. }
  94. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  95. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  96. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  97. if e1 != 0 {
  98. err = errnoErr(e1)
  99. }
  100. return
  101. }
  102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  103. func Shutdown(s int, how int) (err error) {
  104. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
  105. if e1 != 0 {
  106. err = errnoErr(e1)
  107. }
  108. return
  109. }
  110. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  111. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  112. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  113. if e1 != 0 {
  114. err = errnoErr(e1)
  115. }
  116. return
  117. }
  118. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  119. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  120. var _p0 unsafe.Pointer
  121. if len(p) > 0 {
  122. _p0 = unsafe.Pointer(&p[0])
  123. } else {
  124. _p0 = unsafe.Pointer(&_zero)
  125. }
  126. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  127. n = int(r0)
  128. if e1 != 0 {
  129. err = errnoErr(e1)
  130. }
  131. return
  132. }
  133. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  134. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  135. var _p0 unsafe.Pointer
  136. if len(buf) > 0 {
  137. _p0 = unsafe.Pointer(&buf[0])
  138. } else {
  139. _p0 = unsafe.Pointer(&_zero)
  140. }
  141. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  142. if e1 != 0 {
  143. err = errnoErr(e1)
  144. }
  145. return
  146. }
  147. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  148. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  149. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  150. n = int(r0)
  151. if e1 != 0 {
  152. err = errnoErr(e1)
  153. }
  154. return
  155. }
  156. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  157. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  158. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  159. n = int(r0)
  160. if e1 != 0 {
  161. err = errnoErr(e1)
  162. }
  163. return
  164. }
  165. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  166. func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
  167. r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
  168. n = int(r0)
  169. if e1 != 0 {
  170. err = errnoErr(e1)
  171. }
  172. return
  173. }
  174. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  175. func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
  176. var _p0 unsafe.Pointer
  177. if len(mib) > 0 {
  178. _p0 = unsafe.Pointer(&mib[0])
  179. } else {
  180. _p0 = unsafe.Pointer(&_zero)
  181. }
  182. _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
  183. if e1 != 0 {
  184. err = errnoErr(e1)
  185. }
  186. return
  187. }
  188. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  189. func utimes(path string, timeval *[2]Timeval) (err error) {
  190. var _p0 *byte
  191. _p0, err = BytePtrFromString(path)
  192. if err != nil {
  193. return
  194. }
  195. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  196. if e1 != 0 {
  197. err = errnoErr(e1)
  198. }
  199. return
  200. }
  201. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  202. func futimes(fd int, timeval *[2]Timeval) (err error) {
  203. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  204. if e1 != 0 {
  205. err = errnoErr(e1)
  206. }
  207. return
  208. }
  209. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  210. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  211. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  212. val = int(r0)
  213. if e1 != 0 {
  214. err = errnoErr(e1)
  215. }
  216. return
  217. }
  218. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  219. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  220. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  221. n = int(r0)
  222. if e1 != 0 {
  223. err = errnoErr(e1)
  224. }
  225. return
  226. }
  227. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  228. func Madvise(b []byte, behav int) (err error) {
  229. var _p0 unsafe.Pointer
  230. if len(b) > 0 {
  231. _p0 = unsafe.Pointer(&b[0])
  232. } else {
  233. _p0 = unsafe.Pointer(&_zero)
  234. }
  235. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
  236. if e1 != 0 {
  237. err = errnoErr(e1)
  238. }
  239. return
  240. }
  241. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  242. func Mlock(b []byte) (err error) {
  243. var _p0 unsafe.Pointer
  244. if len(b) > 0 {
  245. _p0 = unsafe.Pointer(&b[0])
  246. } else {
  247. _p0 = unsafe.Pointer(&_zero)
  248. }
  249. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  250. if e1 != 0 {
  251. err = errnoErr(e1)
  252. }
  253. return
  254. }
  255. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  256. func Mlockall(flags int) (err error) {
  257. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  258. if e1 != 0 {
  259. err = errnoErr(e1)
  260. }
  261. return
  262. }
  263. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  264. func Mprotect(b []byte, prot int) (err error) {
  265. var _p0 unsafe.Pointer
  266. if len(b) > 0 {
  267. _p0 = unsafe.Pointer(&b[0])
  268. } else {
  269. _p0 = unsafe.Pointer(&_zero)
  270. }
  271. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  272. if e1 != 0 {
  273. err = errnoErr(e1)
  274. }
  275. return
  276. }
  277. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  278. func Msync(b []byte, flags int) (err error) {
  279. var _p0 unsafe.Pointer
  280. if len(b) > 0 {
  281. _p0 = unsafe.Pointer(&b[0])
  282. } else {
  283. _p0 = unsafe.Pointer(&_zero)
  284. }
  285. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  286. if e1 != 0 {
  287. err = errnoErr(e1)
  288. }
  289. return
  290. }
  291. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  292. func Munlock(b []byte) (err error) {
  293. var _p0 unsafe.Pointer
  294. if len(b) > 0 {
  295. _p0 = unsafe.Pointer(&b[0])
  296. } else {
  297. _p0 = unsafe.Pointer(&_zero)
  298. }
  299. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  300. if e1 != 0 {
  301. err = errnoErr(e1)
  302. }
  303. return
  304. }
  305. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  306. func Munlockall() (err error) {
  307. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  308. if e1 != 0 {
  309. err = errnoErr(e1)
  310. }
  311. return
  312. }
  313. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  314. func pipe() (fd1 int, fd2 int, err error) {
  315. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  316. fd1 = int(r0)
  317. fd2 = int(r1)
  318. if e1 != 0 {
  319. err = errnoErr(e1)
  320. }
  321. return
  322. }
  323. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  324. func getdents(fd int, buf []byte) (n int, err error) {
  325. var _p0 unsafe.Pointer
  326. if len(buf) > 0 {
  327. _p0 = unsafe.Pointer(&buf[0])
  328. } else {
  329. _p0 = unsafe.Pointer(&_zero)
  330. }
  331. r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  332. n = int(r0)
  333. if e1 != 0 {
  334. err = errnoErr(e1)
  335. }
  336. return
  337. }
  338. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  339. func ioctl(fd int, req uint, arg uintptr) (err error) {
  340. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  341. if e1 != 0 {
  342. err = errnoErr(e1)
  343. }
  344. return
  345. }
  346. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  347. func Access(path string, mode uint32) (err error) {
  348. var _p0 *byte
  349. _p0, err = BytePtrFromString(path)
  350. if err != nil {
  351. return
  352. }
  353. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  354. if e1 != 0 {
  355. err = errnoErr(e1)
  356. }
  357. return
  358. }
  359. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  360. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  361. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  362. if e1 != 0 {
  363. err = errnoErr(e1)
  364. }
  365. return
  366. }
  367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  368. func Chdir(path string) (err error) {
  369. var _p0 *byte
  370. _p0, err = BytePtrFromString(path)
  371. if err != nil {
  372. return
  373. }
  374. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  375. if e1 != 0 {
  376. err = errnoErr(e1)
  377. }
  378. return
  379. }
  380. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  381. func Chflags(path string, flags int) (err error) {
  382. var _p0 *byte
  383. _p0, err = BytePtrFromString(path)
  384. if err != nil {
  385. return
  386. }
  387. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  388. if e1 != 0 {
  389. err = errnoErr(e1)
  390. }
  391. return
  392. }
  393. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  394. func Chmod(path string, mode uint32) (err error) {
  395. var _p0 *byte
  396. _p0, err = BytePtrFromString(path)
  397. if err != nil {
  398. return
  399. }
  400. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  401. if e1 != 0 {
  402. err = errnoErr(e1)
  403. }
  404. return
  405. }
  406. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  407. func Chown(path string, uid int, gid int) (err error) {
  408. var _p0 *byte
  409. _p0, err = BytePtrFromString(path)
  410. if err != nil {
  411. return
  412. }
  413. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  414. if e1 != 0 {
  415. err = errnoErr(e1)
  416. }
  417. return
  418. }
  419. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  420. func Chroot(path string) (err error) {
  421. var _p0 *byte
  422. _p0, err = BytePtrFromString(path)
  423. if err != nil {
  424. return
  425. }
  426. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  427. if e1 != 0 {
  428. err = errnoErr(e1)
  429. }
  430. return
  431. }
  432. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  433. func Close(fd int) (err error) {
  434. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  435. if e1 != 0 {
  436. err = errnoErr(e1)
  437. }
  438. return
  439. }
  440. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  441. func Dup(fd int) (nfd int, err error) {
  442. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  443. nfd = int(r0)
  444. if e1 != 0 {
  445. err = errnoErr(e1)
  446. }
  447. return
  448. }
  449. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  450. func Dup2(from int, to int) (err error) {
  451. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  452. if e1 != 0 {
  453. err = errnoErr(e1)
  454. }
  455. return
  456. }
  457. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  458. func Exit(code int) {
  459. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  460. return
  461. }
  462. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  463. func Fchdir(fd int) (err error) {
  464. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  465. if e1 != 0 {
  466. err = errnoErr(e1)
  467. }
  468. return
  469. }
  470. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  471. func Fchflags(fd int, flags int) (err error) {
  472. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  473. if e1 != 0 {
  474. err = errnoErr(e1)
  475. }
  476. return
  477. }
  478. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  479. func Fchmod(fd int, mode uint32) (err error) {
  480. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  481. if e1 != 0 {
  482. err = errnoErr(e1)
  483. }
  484. return
  485. }
  486. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  487. func Fchown(fd int, uid int, gid int) (err error) {
  488. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  489. if e1 != 0 {
  490. err = errnoErr(e1)
  491. }
  492. return
  493. }
  494. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  495. func Flock(fd int, how int) (err error) {
  496. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  497. if e1 != 0 {
  498. err = errnoErr(e1)
  499. }
  500. return
  501. }
  502. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  503. func Fpathconf(fd int, name int) (val int, err error) {
  504. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  505. val = int(r0)
  506. if e1 != 0 {
  507. err = errnoErr(e1)
  508. }
  509. return
  510. }
  511. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  512. func Fstat(fd int, stat *Stat_t) (err error) {
  513. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  514. if e1 != 0 {
  515. err = errnoErr(e1)
  516. }
  517. return
  518. }
  519. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  520. func Fsync(fd int) (err error) {
  521. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  522. if e1 != 0 {
  523. err = errnoErr(e1)
  524. }
  525. return
  526. }
  527. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  528. func Ftruncate(fd int, length int64) (err error) {
  529. _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
  530. if e1 != 0 {
  531. err = errnoErr(e1)
  532. }
  533. return
  534. }
  535. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  536. func Getegid() (egid int) {
  537. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  538. egid = int(r0)
  539. return
  540. }
  541. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  542. func Geteuid() (uid int) {
  543. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  544. uid = int(r0)
  545. return
  546. }
  547. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  548. func Getgid() (gid int) {
  549. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  550. gid = int(r0)
  551. return
  552. }
  553. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  554. func Getpgid(pid int) (pgid int, err error) {
  555. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  556. pgid = int(r0)
  557. if e1 != 0 {
  558. err = errnoErr(e1)
  559. }
  560. return
  561. }
  562. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  563. func Getpgrp() (pgrp int) {
  564. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  565. pgrp = int(r0)
  566. return
  567. }
  568. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  569. func Getpid() (pid int) {
  570. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  571. pid = int(r0)
  572. return
  573. }
  574. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  575. func Getppid() (ppid int) {
  576. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  577. ppid = int(r0)
  578. return
  579. }
  580. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  581. func Getpriority(which int, who int) (prio int, err error) {
  582. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  583. prio = int(r0)
  584. if e1 != 0 {
  585. err = errnoErr(e1)
  586. }
  587. return
  588. }
  589. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  590. func Getrlimit(which int, lim *Rlimit) (err error) {
  591. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  592. if e1 != 0 {
  593. err = errnoErr(e1)
  594. }
  595. return
  596. }
  597. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  598. func Getrusage(who int, rusage *Rusage) (err error) {
  599. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  600. if e1 != 0 {
  601. err = errnoErr(e1)
  602. }
  603. return
  604. }
  605. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  606. func Getsid(pid int) (sid int, err error) {
  607. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  608. sid = int(r0)
  609. if e1 != 0 {
  610. err = errnoErr(e1)
  611. }
  612. return
  613. }
  614. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  615. func Gettimeofday(tv *Timeval) (err error) {
  616. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  617. if e1 != 0 {
  618. err = errnoErr(e1)
  619. }
  620. return
  621. }
  622. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  623. func Getuid() (uid int) {
  624. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  625. uid = int(r0)
  626. return
  627. }
  628. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  629. func Issetugid() (tainted bool) {
  630. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  631. tainted = bool(r0 != 0)
  632. return
  633. }
  634. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  635. func Kill(pid int, signum syscall.Signal) (err error) {
  636. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  637. if e1 != 0 {
  638. err = errnoErr(e1)
  639. }
  640. return
  641. }
  642. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  643. func Kqueue() (fd int, err error) {
  644. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  645. fd = int(r0)
  646. if e1 != 0 {
  647. err = errnoErr(e1)
  648. }
  649. return
  650. }
  651. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  652. func Lchown(path string, uid int, gid int) (err error) {
  653. var _p0 *byte
  654. _p0, err = BytePtrFromString(path)
  655. if err != nil {
  656. return
  657. }
  658. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  659. if e1 != 0 {
  660. err = errnoErr(e1)
  661. }
  662. return
  663. }
  664. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  665. func Link(path string, link string) (err error) {
  666. var _p0 *byte
  667. _p0, err = BytePtrFromString(path)
  668. if err != nil {
  669. return
  670. }
  671. var _p1 *byte
  672. _p1, err = BytePtrFromString(link)
  673. if err != nil {
  674. return
  675. }
  676. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  677. if e1 != 0 {
  678. err = errnoErr(e1)
  679. }
  680. return
  681. }
  682. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  683. func Listen(s int, backlog int) (err error) {
  684. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  685. if e1 != 0 {
  686. err = errnoErr(e1)
  687. }
  688. return
  689. }
  690. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  691. func Lstat(path string, stat *Stat_t) (err error) {
  692. var _p0 *byte
  693. _p0, err = BytePtrFromString(path)
  694. if err != nil {
  695. return
  696. }
  697. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  698. if e1 != 0 {
  699. err = errnoErr(e1)
  700. }
  701. return
  702. }
  703. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  704. func Mkdir(path string, mode uint32) (err error) {
  705. var _p0 *byte
  706. _p0, err = BytePtrFromString(path)
  707. if err != nil {
  708. return
  709. }
  710. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  711. if e1 != 0 {
  712. err = errnoErr(e1)
  713. }
  714. return
  715. }
  716. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  717. func Mkfifo(path string, mode uint32) (err error) {
  718. var _p0 *byte
  719. _p0, err = BytePtrFromString(path)
  720. if err != nil {
  721. return
  722. }
  723. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  724. if e1 != 0 {
  725. err = errnoErr(e1)
  726. }
  727. return
  728. }
  729. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  730. func Mknod(path string, mode uint32, dev int) (err error) {
  731. var _p0 *byte
  732. _p0, err = BytePtrFromString(path)
  733. if err != nil {
  734. return
  735. }
  736. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  737. if e1 != 0 {
  738. err = errnoErr(e1)
  739. }
  740. return
  741. }
  742. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  743. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  744. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  745. if e1 != 0 {
  746. err = errnoErr(e1)
  747. }
  748. return
  749. }
  750. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  751. func Open(path string, mode int, perm uint32) (fd int, err error) {
  752. var _p0 *byte
  753. _p0, err = BytePtrFromString(path)
  754. if err != nil {
  755. return
  756. }
  757. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  758. fd = int(r0)
  759. if e1 != 0 {
  760. err = errnoErr(e1)
  761. }
  762. return
  763. }
  764. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  765. func Pathconf(path string, name int) (val int, err error) {
  766. var _p0 *byte
  767. _p0, err = BytePtrFromString(path)
  768. if err != nil {
  769. return
  770. }
  771. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  772. val = int(r0)
  773. if e1 != 0 {
  774. err = errnoErr(e1)
  775. }
  776. return
  777. }
  778. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  779. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  780. var _p0 unsafe.Pointer
  781. if len(p) > 0 {
  782. _p0 = unsafe.Pointer(&p[0])
  783. } else {
  784. _p0 = unsafe.Pointer(&_zero)
  785. }
  786. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
  787. n = int(r0)
  788. if e1 != 0 {
  789. err = errnoErr(e1)
  790. }
  791. return
  792. }
  793. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  794. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  795. var _p0 unsafe.Pointer
  796. if len(p) > 0 {
  797. _p0 = unsafe.Pointer(&p[0])
  798. } else {
  799. _p0 = unsafe.Pointer(&_zero)
  800. }
  801. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
  802. n = int(r0)
  803. if e1 != 0 {
  804. err = errnoErr(e1)
  805. }
  806. return
  807. }
  808. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  809. func read(fd int, p []byte) (n int, err error) {
  810. var _p0 unsafe.Pointer
  811. if len(p) > 0 {
  812. _p0 = unsafe.Pointer(&p[0])
  813. } else {
  814. _p0 = unsafe.Pointer(&_zero)
  815. }
  816. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  817. n = int(r0)
  818. if e1 != 0 {
  819. err = errnoErr(e1)
  820. }
  821. return
  822. }
  823. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  824. func Readlink(path string, buf []byte) (n int, err error) {
  825. var _p0 *byte
  826. _p0, err = BytePtrFromString(path)
  827. if err != nil {
  828. return
  829. }
  830. var _p1 unsafe.Pointer
  831. if len(buf) > 0 {
  832. _p1 = unsafe.Pointer(&buf[0])
  833. } else {
  834. _p1 = unsafe.Pointer(&_zero)
  835. }
  836. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  837. n = int(r0)
  838. if e1 != 0 {
  839. err = errnoErr(e1)
  840. }
  841. return
  842. }
  843. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  844. func Rename(from string, to string) (err error) {
  845. var _p0 *byte
  846. _p0, err = BytePtrFromString(from)
  847. if err != nil {
  848. return
  849. }
  850. var _p1 *byte
  851. _p1, err = BytePtrFromString(to)
  852. if err != nil {
  853. return
  854. }
  855. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  856. if e1 != 0 {
  857. err = errnoErr(e1)
  858. }
  859. return
  860. }
  861. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  862. func Revoke(path string) (err error) {
  863. var _p0 *byte
  864. _p0, err = BytePtrFromString(path)
  865. if err != nil {
  866. return
  867. }
  868. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  869. if e1 != 0 {
  870. err = errnoErr(e1)
  871. }
  872. return
  873. }
  874. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  875. func Rmdir(path string) (err error) {
  876. var _p0 *byte
  877. _p0, err = BytePtrFromString(path)
  878. if err != nil {
  879. return
  880. }
  881. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  882. if e1 != 0 {
  883. err = errnoErr(e1)
  884. }
  885. return
  886. }
  887. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  888. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  889. r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
  890. newoffset = int64(int64(r1)<<32 | int64(r0))
  891. if e1 != 0 {
  892. err = errnoErr(e1)
  893. }
  894. return
  895. }
  896. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  897. func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  898. _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  899. if e1 != 0 {
  900. err = errnoErr(e1)
  901. }
  902. return
  903. }
  904. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  905. func Setegid(egid int) (err error) {
  906. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  907. if e1 != 0 {
  908. err = errnoErr(e1)
  909. }
  910. return
  911. }
  912. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  913. func Seteuid(euid int) (err error) {
  914. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  915. if e1 != 0 {
  916. err = errnoErr(e1)
  917. }
  918. return
  919. }
  920. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  921. func Setgid(gid int) (err error) {
  922. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  923. if e1 != 0 {
  924. err = errnoErr(e1)
  925. }
  926. return
  927. }
  928. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  929. func Setpgid(pid int, pgid int) (err error) {
  930. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  931. if e1 != 0 {
  932. err = errnoErr(e1)
  933. }
  934. return
  935. }
  936. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  937. func Setpriority(which int, who int, prio int) (err error) {
  938. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  939. if e1 != 0 {
  940. err = errnoErr(e1)
  941. }
  942. return
  943. }
  944. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  945. func Setregid(rgid int, egid int) (err error) {
  946. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  947. if e1 != 0 {
  948. err = errnoErr(e1)
  949. }
  950. return
  951. }
  952. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  953. func Setreuid(ruid int, euid int) (err error) {
  954. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  955. if e1 != 0 {
  956. err = errnoErr(e1)
  957. }
  958. return
  959. }
  960. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  961. func Setrlimit(which int, lim *Rlimit) (err error) {
  962. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  963. if e1 != 0 {
  964. err = errnoErr(e1)
  965. }
  966. return
  967. }
  968. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  969. func Setsid() (pid int, err error) {
  970. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  971. pid = int(r0)
  972. if e1 != 0 {
  973. err = errnoErr(e1)
  974. }
  975. return
  976. }
  977. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  978. func Settimeofday(tp *Timeval) (err error) {
  979. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  980. if e1 != 0 {
  981. err = errnoErr(e1)
  982. }
  983. return
  984. }
  985. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  986. func Setuid(uid int) (err error) {
  987. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  988. if e1 != 0 {
  989. err = errnoErr(e1)
  990. }
  991. return
  992. }
  993. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  994. func Stat(path string, stat *Stat_t) (err error) {
  995. var _p0 *byte
  996. _p0, err = BytePtrFromString(path)
  997. if err != nil {
  998. return
  999. }
  1000. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1001. if e1 != 0 {
  1002. err = errnoErr(e1)
  1003. }
  1004. return
  1005. }
  1006. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1007. func Symlink(path string, link string) (err error) {
  1008. var _p0 *byte
  1009. _p0, err = BytePtrFromString(path)
  1010. if err != nil {
  1011. return
  1012. }
  1013. var _p1 *byte
  1014. _p1, err = BytePtrFromString(link)
  1015. if err != nil {
  1016. return
  1017. }
  1018. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1019. if e1 != 0 {
  1020. err = errnoErr(e1)
  1021. }
  1022. return
  1023. }
  1024. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1025. func Sync() (err error) {
  1026. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1027. if e1 != 0 {
  1028. err = errnoErr(e1)
  1029. }
  1030. return
  1031. }
  1032. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1033. func Truncate(path string, length int64) (err error) {
  1034. var _p0 *byte
  1035. _p0, err = BytePtrFromString(path)
  1036. if err != nil {
  1037. return
  1038. }
  1039. _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
  1040. if e1 != 0 {
  1041. err = errnoErr(e1)
  1042. }
  1043. return
  1044. }
  1045. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1046. func Umask(newmask int) (oldmask int) {
  1047. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1048. oldmask = int(r0)
  1049. return
  1050. }
  1051. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1052. func Unlink(path string) (err error) {
  1053. var _p0 *byte
  1054. _p0, err = BytePtrFromString(path)
  1055. if err != nil {
  1056. return
  1057. }
  1058. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1059. if e1 != 0 {
  1060. err = errnoErr(e1)
  1061. }
  1062. return
  1063. }
  1064. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1065. func Unmount(path string, flags int) (err error) {
  1066. var _p0 *byte
  1067. _p0, err = BytePtrFromString(path)
  1068. if err != nil {
  1069. return
  1070. }
  1071. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1072. if e1 != 0 {
  1073. err = errnoErr(e1)
  1074. }
  1075. return
  1076. }
  1077. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1078. func write(fd int, p []byte) (n int, err error) {
  1079. var _p0 unsafe.Pointer
  1080. if len(p) > 0 {
  1081. _p0 = unsafe.Pointer(&p[0])
  1082. } else {
  1083. _p0 = unsafe.Pointer(&_zero)
  1084. }
  1085. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1086. n = int(r0)
  1087. if e1 != 0 {
  1088. err = errnoErr(e1)
  1089. }
  1090. return
  1091. }
  1092. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1093. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1094. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
  1095. ret = uintptr(r0)
  1096. if e1 != 0 {
  1097. err = errnoErr(e1)
  1098. }
  1099. return
  1100. }
  1101. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1102. func munmap(addr uintptr, length uintptr) (err error) {
  1103. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1104. if e1 != 0 {
  1105. err = errnoErr(e1)
  1106. }
  1107. return
  1108. }
  1109. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1110. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1111. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1112. n = int(r0)
  1113. if e1 != 0 {
  1114. err = errnoErr(e1)
  1115. }
  1116. return
  1117. }
  1118. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1119. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1120. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1121. n = int(r0)
  1122. if e1 != 0 {
  1123. err = errnoErr(e1)
  1124. }
  1125. return
  1126. }
  1127. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1128. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  1129. var _p0 *byte
  1130. _p0, err = BytePtrFromString(path)
  1131. if err != nil {
  1132. return
  1133. }
  1134. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  1135. if e1 != 0 {
  1136. err = errnoErr(e1)
  1137. }
  1138. return
  1139. }