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