zsyscall_freebsd_386.go 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665
  1. // mksyscall.pl -l32 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
  2. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  3. // +build 386,freebsd
  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. use(unsafe.Pointer(_p0))
  197. if e1 != 0 {
  198. err = errnoErr(e1)
  199. }
  200. return
  201. }
  202. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  203. func futimes(fd int, timeval *[2]Timeval) (err error) {
  204. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  205. if e1 != 0 {
  206. err = errnoErr(e1)
  207. }
  208. return
  209. }
  210. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  211. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  212. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  213. val = int(r0)
  214. if e1 != 0 {
  215. err = errnoErr(e1)
  216. }
  217. return
  218. }
  219. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  220. func pipe() (r int, w int, err error) {
  221. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  222. r = int(r0)
  223. w = int(r1)
  224. if e1 != 0 {
  225. err = errnoErr(e1)
  226. }
  227. return
  228. }
  229. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  230. func Access(path string, mode uint32) (err error) {
  231. var _p0 *byte
  232. _p0, err = BytePtrFromString(path)
  233. if err != nil {
  234. return
  235. }
  236. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  237. use(unsafe.Pointer(_p0))
  238. if e1 != 0 {
  239. err = errnoErr(e1)
  240. }
  241. return
  242. }
  243. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  244. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  245. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  246. if e1 != 0 {
  247. err = errnoErr(e1)
  248. }
  249. return
  250. }
  251. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  252. func Chdir(path string) (err error) {
  253. var _p0 *byte
  254. _p0, err = BytePtrFromString(path)
  255. if err != nil {
  256. return
  257. }
  258. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  259. use(unsafe.Pointer(_p0))
  260. if e1 != 0 {
  261. err = errnoErr(e1)
  262. }
  263. return
  264. }
  265. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  266. func Chflags(path string, flags int) (err error) {
  267. var _p0 *byte
  268. _p0, err = BytePtrFromString(path)
  269. if err != nil {
  270. return
  271. }
  272. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  273. use(unsafe.Pointer(_p0))
  274. if e1 != 0 {
  275. err = errnoErr(e1)
  276. }
  277. return
  278. }
  279. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  280. func Chmod(path string, mode uint32) (err error) {
  281. var _p0 *byte
  282. _p0, err = BytePtrFromString(path)
  283. if err != nil {
  284. return
  285. }
  286. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  287. use(unsafe.Pointer(_p0))
  288. if e1 != 0 {
  289. err = errnoErr(e1)
  290. }
  291. return
  292. }
  293. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  294. func Chown(path string, uid int, gid int) (err error) {
  295. var _p0 *byte
  296. _p0, err = BytePtrFromString(path)
  297. if err != nil {
  298. return
  299. }
  300. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  301. use(unsafe.Pointer(_p0))
  302. if e1 != 0 {
  303. err = errnoErr(e1)
  304. }
  305. return
  306. }
  307. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  308. func Chroot(path string) (err error) {
  309. var _p0 *byte
  310. _p0, err = BytePtrFromString(path)
  311. if err != nil {
  312. return
  313. }
  314. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  315. use(unsafe.Pointer(_p0))
  316. if e1 != 0 {
  317. err = errnoErr(e1)
  318. }
  319. return
  320. }
  321. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  322. func Close(fd int) (err error) {
  323. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  324. if e1 != 0 {
  325. err = errnoErr(e1)
  326. }
  327. return
  328. }
  329. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  330. func Dup(fd int) (nfd int, err error) {
  331. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  332. nfd = 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 Dup2(from int, to int) (err error) {
  340. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  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 Exit(code int) {
  348. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  349. return
  350. }
  351. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  352. func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  353. var _p0 *byte
  354. _p0, err = BytePtrFromString(attrname)
  355. if err != nil {
  356. return
  357. }
  358. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
  359. use(unsafe.Pointer(_p0))
  360. ret = int(r0)
  361. if e1 != 0 {
  362. err = errnoErr(e1)
  363. }
  364. return
  365. }
  366. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  367. func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  368. var _p0 *byte
  369. _p0, err = BytePtrFromString(attrname)
  370. if err != nil {
  371. return
  372. }
  373. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
  374. use(unsafe.Pointer(_p0))
  375. ret = int(r0)
  376. if e1 != 0 {
  377. err = errnoErr(e1)
  378. }
  379. return
  380. }
  381. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  382. func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
  383. var _p0 *byte
  384. _p0, err = BytePtrFromString(attrname)
  385. if err != nil {
  386. return
  387. }
  388. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
  389. use(unsafe.Pointer(_p0))
  390. if e1 != 0 {
  391. err = errnoErr(e1)
  392. }
  393. return
  394. }
  395. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  396. func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  397. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  398. ret = int(r0)
  399. if e1 != 0 {
  400. err = errnoErr(e1)
  401. }
  402. return
  403. }
  404. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  405. func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  406. var _p0 *byte
  407. _p0, err = BytePtrFromString(file)
  408. if err != nil {
  409. return
  410. }
  411. var _p1 *byte
  412. _p1, err = BytePtrFromString(attrname)
  413. if err != nil {
  414. return
  415. }
  416. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  417. use(unsafe.Pointer(_p0))
  418. use(unsafe.Pointer(_p1))
  419. ret = int(r0)
  420. if e1 != 0 {
  421. err = errnoErr(e1)
  422. }
  423. return
  424. }
  425. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  426. func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  427. var _p0 *byte
  428. _p0, err = BytePtrFromString(file)
  429. if err != nil {
  430. return
  431. }
  432. var _p1 *byte
  433. _p1, err = BytePtrFromString(attrname)
  434. if err != nil {
  435. return
  436. }
  437. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  438. use(unsafe.Pointer(_p0))
  439. use(unsafe.Pointer(_p1))
  440. ret = int(r0)
  441. if e1 != 0 {
  442. err = errnoErr(e1)
  443. }
  444. return
  445. }
  446. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  447. func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
  448. var _p0 *byte
  449. _p0, err = BytePtrFromString(file)
  450. if err != nil {
  451. return
  452. }
  453. var _p1 *byte
  454. _p1, err = BytePtrFromString(attrname)
  455. if err != nil {
  456. return
  457. }
  458. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
  459. use(unsafe.Pointer(_p0))
  460. use(unsafe.Pointer(_p1))
  461. if e1 != 0 {
  462. err = errnoErr(e1)
  463. }
  464. return
  465. }
  466. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  467. func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  468. var _p0 *byte
  469. _p0, err = BytePtrFromString(file)
  470. if err != nil {
  471. return
  472. }
  473. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  474. use(unsafe.Pointer(_p0))
  475. ret = int(r0)
  476. if e1 != 0 {
  477. err = errnoErr(e1)
  478. }
  479. return
  480. }
  481. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  482. func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  483. var _p0 *byte
  484. _p0, err = BytePtrFromString(link)
  485. if err != nil {
  486. return
  487. }
  488. var _p1 *byte
  489. _p1, err = BytePtrFromString(attrname)
  490. if err != nil {
  491. return
  492. }
  493. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  494. use(unsafe.Pointer(_p0))
  495. use(unsafe.Pointer(_p1))
  496. ret = int(r0)
  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 ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  504. var _p0 *byte
  505. _p0, err = BytePtrFromString(link)
  506. if err != nil {
  507. return
  508. }
  509. var _p1 *byte
  510. _p1, err = BytePtrFromString(attrname)
  511. if err != nil {
  512. return
  513. }
  514. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  515. use(unsafe.Pointer(_p0))
  516. use(unsafe.Pointer(_p1))
  517. ret = int(r0)
  518. if e1 != 0 {
  519. err = errnoErr(e1)
  520. }
  521. return
  522. }
  523. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  524. func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
  525. var _p0 *byte
  526. _p0, err = BytePtrFromString(link)
  527. if err != nil {
  528. return
  529. }
  530. var _p1 *byte
  531. _p1, err = BytePtrFromString(attrname)
  532. if err != nil {
  533. return
  534. }
  535. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
  536. use(unsafe.Pointer(_p0))
  537. use(unsafe.Pointer(_p1))
  538. if e1 != 0 {
  539. err = errnoErr(e1)
  540. }
  541. return
  542. }
  543. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  544. func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  545. var _p0 *byte
  546. _p0, err = BytePtrFromString(link)
  547. if err != nil {
  548. return
  549. }
  550. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  551. use(unsafe.Pointer(_p0))
  552. ret = int(r0)
  553. if e1 != 0 {
  554. err = errnoErr(e1)
  555. }
  556. return
  557. }
  558. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  559. func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  560. _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
  561. if e1 != 0 {
  562. err = errnoErr(e1)
  563. }
  564. return
  565. }
  566. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  567. func Fchdir(fd int) (err error) {
  568. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  569. if e1 != 0 {
  570. err = errnoErr(e1)
  571. }
  572. return
  573. }
  574. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  575. func Fchflags(fd int, flags int) (err error) {
  576. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  577. if e1 != 0 {
  578. err = errnoErr(e1)
  579. }
  580. return
  581. }
  582. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  583. func Fchmod(fd int, mode uint32) (err error) {
  584. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  585. if e1 != 0 {
  586. err = errnoErr(e1)
  587. }
  588. return
  589. }
  590. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  591. func Fchown(fd int, uid int, gid int) (err error) {
  592. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  593. if e1 != 0 {
  594. err = errnoErr(e1)
  595. }
  596. return
  597. }
  598. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  599. func Flock(fd int, how int) (err error) {
  600. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  601. if e1 != 0 {
  602. err = errnoErr(e1)
  603. }
  604. return
  605. }
  606. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  607. func Fpathconf(fd int, name int) (val int, err error) {
  608. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  609. val = int(r0)
  610. if e1 != 0 {
  611. err = errnoErr(e1)
  612. }
  613. return
  614. }
  615. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  616. func Fstat(fd int, stat *Stat_t) (err error) {
  617. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  618. if e1 != 0 {
  619. err = errnoErr(e1)
  620. }
  621. return
  622. }
  623. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  624. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  625. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  626. if e1 != 0 {
  627. err = errnoErr(e1)
  628. }
  629. return
  630. }
  631. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  632. func Fsync(fd int) (err error) {
  633. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  634. if e1 != 0 {
  635. err = errnoErr(e1)
  636. }
  637. return
  638. }
  639. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  640. func Ftruncate(fd int, length int64) (err error) {
  641. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
  642. if e1 != 0 {
  643. err = errnoErr(e1)
  644. }
  645. return
  646. }
  647. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  648. func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
  649. var _p0 unsafe.Pointer
  650. if len(buf) > 0 {
  651. _p0 = unsafe.Pointer(&buf[0])
  652. } else {
  653. _p0 = unsafe.Pointer(&_zero)
  654. }
  655. r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  656. n = int(r0)
  657. if e1 != 0 {
  658. err = errnoErr(e1)
  659. }
  660. return
  661. }
  662. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  663. func Getdtablesize() (size int) {
  664. r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
  665. size = int(r0)
  666. return
  667. }
  668. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  669. func Getegid() (egid int) {
  670. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  671. egid = int(r0)
  672. return
  673. }
  674. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  675. func Geteuid() (uid int) {
  676. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  677. uid = int(r0)
  678. return
  679. }
  680. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  681. func Getgid() (gid int) {
  682. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  683. gid = int(r0)
  684. return
  685. }
  686. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  687. func Getpgid(pid int) (pgid int, err error) {
  688. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  689. pgid = int(r0)
  690. if e1 != 0 {
  691. err = errnoErr(e1)
  692. }
  693. return
  694. }
  695. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  696. func Getpgrp() (pgrp int) {
  697. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  698. pgrp = int(r0)
  699. return
  700. }
  701. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  702. func Getpid() (pid int) {
  703. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  704. pid = int(r0)
  705. return
  706. }
  707. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  708. func Getppid() (ppid int) {
  709. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  710. ppid = int(r0)
  711. return
  712. }
  713. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  714. func Getpriority(which int, who int) (prio int, err error) {
  715. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  716. prio = int(r0)
  717. if e1 != 0 {
  718. err = errnoErr(e1)
  719. }
  720. return
  721. }
  722. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  723. func Getrlimit(which int, lim *Rlimit) (err error) {
  724. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  725. if e1 != 0 {
  726. err = errnoErr(e1)
  727. }
  728. return
  729. }
  730. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  731. func Getrusage(who int, rusage *Rusage) (err error) {
  732. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  733. if e1 != 0 {
  734. err = errnoErr(e1)
  735. }
  736. return
  737. }
  738. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  739. func Getsid(pid int) (sid int, err error) {
  740. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  741. sid = int(r0)
  742. if e1 != 0 {
  743. err = errnoErr(e1)
  744. }
  745. return
  746. }
  747. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  748. func Gettimeofday(tv *Timeval) (err error) {
  749. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  750. if e1 != 0 {
  751. err = errnoErr(e1)
  752. }
  753. return
  754. }
  755. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  756. func Getuid() (uid int) {
  757. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  758. uid = int(r0)
  759. return
  760. }
  761. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  762. func Issetugid() (tainted bool) {
  763. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  764. tainted = bool(r0 != 0)
  765. return
  766. }
  767. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  768. func Kill(pid int, signum syscall.Signal) (err error) {
  769. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  770. if e1 != 0 {
  771. err = errnoErr(e1)
  772. }
  773. return
  774. }
  775. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  776. func Kqueue() (fd int, err error) {
  777. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  778. fd = int(r0)
  779. if e1 != 0 {
  780. err = errnoErr(e1)
  781. }
  782. return
  783. }
  784. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  785. func Lchown(path string, uid int, gid int) (err error) {
  786. var _p0 *byte
  787. _p0, err = BytePtrFromString(path)
  788. if err != nil {
  789. return
  790. }
  791. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  792. use(unsafe.Pointer(_p0))
  793. if e1 != 0 {
  794. err = errnoErr(e1)
  795. }
  796. return
  797. }
  798. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  799. func Link(path string, link string) (err error) {
  800. var _p0 *byte
  801. _p0, err = BytePtrFromString(path)
  802. if err != nil {
  803. return
  804. }
  805. var _p1 *byte
  806. _p1, err = BytePtrFromString(link)
  807. if err != nil {
  808. return
  809. }
  810. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  811. use(unsafe.Pointer(_p0))
  812. use(unsafe.Pointer(_p1))
  813. if e1 != 0 {
  814. err = errnoErr(e1)
  815. }
  816. return
  817. }
  818. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  819. func Listen(s int, backlog int) (err error) {
  820. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  821. if e1 != 0 {
  822. err = errnoErr(e1)
  823. }
  824. return
  825. }
  826. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  827. func Lstat(path string, stat *Stat_t) (err error) {
  828. var _p0 *byte
  829. _p0, err = BytePtrFromString(path)
  830. if err != nil {
  831. return
  832. }
  833. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  834. use(unsafe.Pointer(_p0))
  835. if e1 != 0 {
  836. err = errnoErr(e1)
  837. }
  838. return
  839. }
  840. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  841. func Mkdir(path string, mode uint32) (err error) {
  842. var _p0 *byte
  843. _p0, err = BytePtrFromString(path)
  844. if err != nil {
  845. return
  846. }
  847. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  848. use(unsafe.Pointer(_p0))
  849. if e1 != 0 {
  850. err = errnoErr(e1)
  851. }
  852. return
  853. }
  854. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  855. func Mkfifo(path string, mode uint32) (err error) {
  856. var _p0 *byte
  857. _p0, err = BytePtrFromString(path)
  858. if err != nil {
  859. return
  860. }
  861. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  862. use(unsafe.Pointer(_p0))
  863. if e1 != 0 {
  864. err = errnoErr(e1)
  865. }
  866. return
  867. }
  868. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  869. func Mknod(path string, mode uint32, dev int) (err error) {
  870. var _p0 *byte
  871. _p0, err = BytePtrFromString(path)
  872. if err != nil {
  873. return
  874. }
  875. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  876. use(unsafe.Pointer(_p0))
  877. if e1 != 0 {
  878. err = errnoErr(e1)
  879. }
  880. return
  881. }
  882. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  883. func Mlock(b []byte) (err error) {
  884. var _p0 unsafe.Pointer
  885. if len(b) > 0 {
  886. _p0 = unsafe.Pointer(&b[0])
  887. } else {
  888. _p0 = unsafe.Pointer(&_zero)
  889. }
  890. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  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 Mlockall(flags int) (err error) {
  898. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 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 Mprotect(b []byte, prot int) (err error) {
  906. var _p0 unsafe.Pointer
  907. if len(b) > 0 {
  908. _p0 = unsafe.Pointer(&b[0])
  909. } else {
  910. _p0 = unsafe.Pointer(&_zero)
  911. }
  912. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  913. if e1 != 0 {
  914. err = errnoErr(e1)
  915. }
  916. return
  917. }
  918. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  919. func Munlock(b []byte) (err error) {
  920. var _p0 unsafe.Pointer
  921. if len(b) > 0 {
  922. _p0 = unsafe.Pointer(&b[0])
  923. } else {
  924. _p0 = unsafe.Pointer(&_zero)
  925. }
  926. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  927. if e1 != 0 {
  928. err = errnoErr(e1)
  929. }
  930. return
  931. }
  932. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  933. func Munlockall() (err error) {
  934. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  935. if e1 != 0 {
  936. err = errnoErr(e1)
  937. }
  938. return
  939. }
  940. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  941. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  942. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  943. if e1 != 0 {
  944. err = errnoErr(e1)
  945. }
  946. return
  947. }
  948. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  949. func Open(path string, mode int, perm uint32) (fd int, err error) {
  950. var _p0 *byte
  951. _p0, err = BytePtrFromString(path)
  952. if err != nil {
  953. return
  954. }
  955. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  956. use(unsafe.Pointer(_p0))
  957. fd = int(r0)
  958. if e1 != 0 {
  959. err = errnoErr(e1)
  960. }
  961. return
  962. }
  963. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  964. func Pathconf(path string, name int) (val int, err error) {
  965. var _p0 *byte
  966. _p0, err = BytePtrFromString(path)
  967. if err != nil {
  968. return
  969. }
  970. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  971. use(unsafe.Pointer(_p0))
  972. val = int(r0)
  973. if e1 != 0 {
  974. err = errnoErr(e1)
  975. }
  976. return
  977. }
  978. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  979. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  980. var _p0 unsafe.Pointer
  981. if len(p) > 0 {
  982. _p0 = unsafe.Pointer(&p[0])
  983. } else {
  984. _p0 = unsafe.Pointer(&_zero)
  985. }
  986. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  987. n = int(r0)
  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 Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  995. var _p0 unsafe.Pointer
  996. if len(p) > 0 {
  997. _p0 = unsafe.Pointer(&p[0])
  998. } else {
  999. _p0 = unsafe.Pointer(&_zero)
  1000. }
  1001. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  1002. n = int(r0)
  1003. if e1 != 0 {
  1004. err = errnoErr(e1)
  1005. }
  1006. return
  1007. }
  1008. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1009. func read(fd int, p []byte) (n int, err error) {
  1010. var _p0 unsafe.Pointer
  1011. if len(p) > 0 {
  1012. _p0 = unsafe.Pointer(&p[0])
  1013. } else {
  1014. _p0 = unsafe.Pointer(&_zero)
  1015. }
  1016. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1017. n = int(r0)
  1018. if e1 != 0 {
  1019. err = errnoErr(e1)
  1020. }
  1021. return
  1022. }
  1023. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1024. func Readlink(path string, buf []byte) (n int, err error) {
  1025. var _p0 *byte
  1026. _p0, err = BytePtrFromString(path)
  1027. if err != nil {
  1028. return
  1029. }
  1030. var _p1 unsafe.Pointer
  1031. if len(buf) > 0 {
  1032. _p1 = unsafe.Pointer(&buf[0])
  1033. } else {
  1034. _p1 = unsafe.Pointer(&_zero)
  1035. }
  1036. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  1037. use(unsafe.Pointer(_p0))
  1038. n = int(r0)
  1039. if e1 != 0 {
  1040. err = errnoErr(e1)
  1041. }
  1042. return
  1043. }
  1044. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1045. func Rename(from string, to string) (err error) {
  1046. var _p0 *byte
  1047. _p0, err = BytePtrFromString(from)
  1048. if err != nil {
  1049. return
  1050. }
  1051. var _p1 *byte
  1052. _p1, err = BytePtrFromString(to)
  1053. if err != nil {
  1054. return
  1055. }
  1056. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1057. use(unsafe.Pointer(_p0))
  1058. use(unsafe.Pointer(_p1))
  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 Revoke(path string) (err error) {
  1066. var _p0 *byte
  1067. _p0, err = BytePtrFromString(path)
  1068. if err != nil {
  1069. return
  1070. }
  1071. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1072. use(unsafe.Pointer(_p0))
  1073. if e1 != 0 {
  1074. err = errnoErr(e1)
  1075. }
  1076. return
  1077. }
  1078. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1079. func Rmdir(path string) (err error) {
  1080. var _p0 *byte
  1081. _p0, err = BytePtrFromString(path)
  1082. if err != nil {
  1083. return
  1084. }
  1085. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1086. use(unsafe.Pointer(_p0))
  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 Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1094. r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
  1095. newoffset = int64(int64(r1)<<32 | int64(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 Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  1103. _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 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 Setegid(egid int) (err error) {
  1111. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  1112. if e1 != 0 {
  1113. err = errnoErr(e1)
  1114. }
  1115. return
  1116. }
  1117. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1118. func Seteuid(euid int) (err error) {
  1119. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  1120. if e1 != 0 {
  1121. err = errnoErr(e1)
  1122. }
  1123. return
  1124. }
  1125. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1126. func Setgid(gid int) (err error) {
  1127. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  1128. if e1 != 0 {
  1129. err = errnoErr(e1)
  1130. }
  1131. return
  1132. }
  1133. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1134. func Setlogin(name string) (err error) {
  1135. var _p0 *byte
  1136. _p0, err = BytePtrFromString(name)
  1137. if err != nil {
  1138. return
  1139. }
  1140. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1141. use(unsafe.Pointer(_p0))
  1142. if e1 != 0 {
  1143. err = errnoErr(e1)
  1144. }
  1145. return
  1146. }
  1147. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1148. func Setpgid(pid int, pgid int) (err error) {
  1149. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1150. if e1 != 0 {
  1151. err = errnoErr(e1)
  1152. }
  1153. return
  1154. }
  1155. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1156. func Setpriority(which int, who int, prio int) (err error) {
  1157. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1158. if e1 != 0 {
  1159. err = errnoErr(e1)
  1160. }
  1161. return
  1162. }
  1163. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1164. func Setregid(rgid int, egid int) (err error) {
  1165. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1166. if e1 != 0 {
  1167. err = errnoErr(e1)
  1168. }
  1169. return
  1170. }
  1171. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1172. func Setreuid(ruid int, euid int) (err error) {
  1173. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1174. if e1 != 0 {
  1175. err = errnoErr(e1)
  1176. }
  1177. return
  1178. }
  1179. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1180. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1181. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1182. if e1 != 0 {
  1183. err = errnoErr(e1)
  1184. }
  1185. return
  1186. }
  1187. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1188. func Setresuid(ruid int, euid int, suid int) (err error) {
  1189. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1190. if e1 != 0 {
  1191. err = errnoErr(e1)
  1192. }
  1193. return
  1194. }
  1195. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1196. func Setrlimit(which int, lim *Rlimit) (err error) {
  1197. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1198. if e1 != 0 {
  1199. err = errnoErr(e1)
  1200. }
  1201. return
  1202. }
  1203. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1204. func Setsid() (pid int, err error) {
  1205. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1206. pid = int(r0)
  1207. if e1 != 0 {
  1208. err = errnoErr(e1)
  1209. }
  1210. return
  1211. }
  1212. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1213. func Settimeofday(tp *Timeval) (err error) {
  1214. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1215. if e1 != 0 {
  1216. err = errnoErr(e1)
  1217. }
  1218. return
  1219. }
  1220. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1221. func Setuid(uid int) (err error) {
  1222. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1223. if e1 != 0 {
  1224. err = errnoErr(e1)
  1225. }
  1226. return
  1227. }
  1228. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1229. func Stat(path string, stat *Stat_t) (err error) {
  1230. var _p0 *byte
  1231. _p0, err = BytePtrFromString(path)
  1232. if err != nil {
  1233. return
  1234. }
  1235. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1236. use(unsafe.Pointer(_p0))
  1237. if e1 != 0 {
  1238. err = errnoErr(e1)
  1239. }
  1240. return
  1241. }
  1242. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1243. func Statfs(path string, stat *Statfs_t) (err error) {
  1244. var _p0 *byte
  1245. _p0, err = BytePtrFromString(path)
  1246. if err != nil {
  1247. return
  1248. }
  1249. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1250. use(unsafe.Pointer(_p0))
  1251. if e1 != 0 {
  1252. err = errnoErr(e1)
  1253. }
  1254. return
  1255. }
  1256. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1257. func Symlink(path string, link string) (err error) {
  1258. var _p0 *byte
  1259. _p0, err = BytePtrFromString(path)
  1260. if err != nil {
  1261. return
  1262. }
  1263. var _p1 *byte
  1264. _p1, err = BytePtrFromString(link)
  1265. if err != nil {
  1266. return
  1267. }
  1268. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1269. use(unsafe.Pointer(_p0))
  1270. use(unsafe.Pointer(_p1))
  1271. if e1 != 0 {
  1272. err = errnoErr(e1)
  1273. }
  1274. return
  1275. }
  1276. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1277. func Sync() (err error) {
  1278. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1279. if e1 != 0 {
  1280. err = errnoErr(e1)
  1281. }
  1282. return
  1283. }
  1284. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1285. func Truncate(path string, length int64) (err error) {
  1286. var _p0 *byte
  1287. _p0, err = BytePtrFromString(path)
  1288. if err != nil {
  1289. return
  1290. }
  1291. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
  1292. use(unsafe.Pointer(_p0))
  1293. if e1 != 0 {
  1294. err = errnoErr(e1)
  1295. }
  1296. return
  1297. }
  1298. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1299. func Umask(newmask int) (oldmask int) {
  1300. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1301. oldmask = int(r0)
  1302. return
  1303. }
  1304. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1305. func Undelete(path string) (err error) {
  1306. var _p0 *byte
  1307. _p0, err = BytePtrFromString(path)
  1308. if err != nil {
  1309. return
  1310. }
  1311. _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1312. use(unsafe.Pointer(_p0))
  1313. if e1 != 0 {
  1314. err = errnoErr(e1)
  1315. }
  1316. return
  1317. }
  1318. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1319. func Unlink(path string) (err error) {
  1320. var _p0 *byte
  1321. _p0, err = BytePtrFromString(path)
  1322. if err != nil {
  1323. return
  1324. }
  1325. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1326. use(unsafe.Pointer(_p0))
  1327. if e1 != 0 {
  1328. err = errnoErr(e1)
  1329. }
  1330. return
  1331. }
  1332. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1333. func Unmount(path string, flags int) (err error) {
  1334. var _p0 *byte
  1335. _p0, err = BytePtrFromString(path)
  1336. if err != nil {
  1337. return
  1338. }
  1339. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1340. use(unsafe.Pointer(_p0))
  1341. if e1 != 0 {
  1342. err = errnoErr(e1)
  1343. }
  1344. return
  1345. }
  1346. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1347. func write(fd int, p []byte) (n int, err error) {
  1348. var _p0 unsafe.Pointer
  1349. if len(p) > 0 {
  1350. _p0 = unsafe.Pointer(&p[0])
  1351. } else {
  1352. _p0 = unsafe.Pointer(&_zero)
  1353. }
  1354. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1355. n = int(r0)
  1356. if e1 != 0 {
  1357. err = errnoErr(e1)
  1358. }
  1359. return
  1360. }
  1361. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1362. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1363. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
  1364. ret = uintptr(r0)
  1365. if e1 != 0 {
  1366. err = errnoErr(e1)
  1367. }
  1368. return
  1369. }
  1370. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1371. func munmap(addr uintptr, length uintptr) (err error) {
  1372. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1373. if e1 != 0 {
  1374. err = errnoErr(e1)
  1375. }
  1376. return
  1377. }
  1378. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1379. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1380. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1381. n = int(r0)
  1382. if e1 != 0 {
  1383. err = errnoErr(e1)
  1384. }
  1385. return
  1386. }
  1387. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1388. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1389. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1390. n = int(r0)
  1391. if e1 != 0 {
  1392. err = errnoErr(e1)
  1393. }
  1394. return
  1395. }
  1396. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1397. func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
  1398. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1399. nfd = int(r0)
  1400. if e1 != 0 {
  1401. err = errnoErr(e1)
  1402. }
  1403. return
  1404. }