zsyscall_linux_sparc64.go 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172
  1. // mksyscall.pl -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build linux,sparc64
  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 fchmodat(dirfd int, path string, mode uint32) (err error) {
  12. var _p0 *byte
  13. _p0, err = BytePtrFromString(path)
  14. if err != nil {
  15. return
  16. }
  17. _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  18. if e1 != 0 {
  19. err = errnoErr(e1)
  20. }
  21. return
  22. }
  23. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  24. func ioctl(fd int, req uint, arg uintptr) (err error) {
  25. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  26. if e1 != 0 {
  27. err = errnoErr(e1)
  28. }
  29. return
  30. }
  31. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  32. func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
  33. var _p0 *byte
  34. _p0, err = BytePtrFromString(oldpath)
  35. if err != nil {
  36. return
  37. }
  38. var _p1 *byte
  39. _p1, err = BytePtrFromString(newpath)
  40. if err != nil {
  41. return
  42. }
  43. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  44. if e1 != 0 {
  45. err = errnoErr(e1)
  46. }
  47. return
  48. }
  49. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  50. func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  51. var _p0 *byte
  52. _p0, err = BytePtrFromString(path)
  53. if err != nil {
  54. return
  55. }
  56. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  57. fd = int(r0)
  58. if e1 != 0 {
  59. err = errnoErr(e1)
  60. }
  61. return
  62. }
  63. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  64. func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  65. r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
  66. n = int(r0)
  67. if e1 != 0 {
  68. err = errnoErr(e1)
  69. }
  70. return
  71. }
  72. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  73. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  74. var _p0 *byte
  75. _p0, err = BytePtrFromString(path)
  76. if err != nil {
  77. return
  78. }
  79. var _p1 unsafe.Pointer
  80. if len(buf) > 0 {
  81. _p1 = unsafe.Pointer(&buf[0])
  82. } else {
  83. _p1 = unsafe.Pointer(&_zero)
  84. }
  85. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  86. n = int(r0)
  87. if e1 != 0 {
  88. err = errnoErr(e1)
  89. }
  90. return
  91. }
  92. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  93. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  94. var _p0 *byte
  95. _p0, err = BytePtrFromString(oldpath)
  96. if err != nil {
  97. return
  98. }
  99. var _p1 *byte
  100. _p1, err = BytePtrFromString(newpath)
  101. if err != nil {
  102. return
  103. }
  104. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  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 Unlinkat(dirfd int, path string, flags int) (err error) {
  112. var _p0 *byte
  113. _p0, err = BytePtrFromString(path)
  114. if err != nil {
  115. return
  116. }
  117. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  118. if e1 != 0 {
  119. err = errnoErr(e1)
  120. }
  121. return
  122. }
  123. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  124. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  125. var _p0 *byte
  126. _p0, err = BytePtrFromString(path)
  127. if err != nil {
  128. return
  129. }
  130. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  131. if e1 != 0 {
  132. err = errnoErr(e1)
  133. }
  134. return
  135. }
  136. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  137. func Getcwd(buf []byte) (n int, err error) {
  138. var _p0 unsafe.Pointer
  139. if len(buf) > 0 {
  140. _p0 = unsafe.Pointer(&buf[0])
  141. } else {
  142. _p0 = unsafe.Pointer(&_zero)
  143. }
  144. r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  145. n = int(r0)
  146. if e1 != 0 {
  147. err = errnoErr(e1)
  148. }
  149. return
  150. }
  151. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  152. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  153. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  154. wpid = int(r0)
  155. if e1 != 0 {
  156. err = errnoErr(e1)
  157. }
  158. return
  159. }
  160. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  161. func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
  162. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  163. ret = int(r0)
  164. if e1 != 0 {
  165. err = errnoErr(e1)
  166. }
  167. return
  168. }
  169. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  170. func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
  171. var _p0 unsafe.Pointer
  172. if len(buf) > 0 {
  173. _p0 = unsafe.Pointer(&buf[0])
  174. } else {
  175. _p0 = unsafe.Pointer(&_zero)
  176. }
  177. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
  178. ret = int(r0)
  179. if e1 != 0 {
  180. err = errnoErr(e1)
  181. }
  182. return
  183. }
  184. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  185. func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
  186. var _p0 *byte
  187. _p0, err = BytePtrFromString(arg2)
  188. if err != nil {
  189. return
  190. }
  191. r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
  192. ret = int(r0)
  193. if e1 != 0 {
  194. err = errnoErr(e1)
  195. }
  196. return
  197. }
  198. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  199. func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
  200. var _p0 *byte
  201. _p0, err = BytePtrFromString(arg3)
  202. if err != nil {
  203. return
  204. }
  205. var _p1 *byte
  206. _p1, err = BytePtrFromString(arg4)
  207. if err != nil {
  208. return
  209. }
  210. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
  211. ret = int(r0)
  212. if e1 != 0 {
  213. err = errnoErr(e1)
  214. }
  215. return
  216. }
  217. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  218. func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
  219. var _p0 unsafe.Pointer
  220. if len(payload) > 0 {
  221. _p0 = unsafe.Pointer(&payload[0])
  222. } else {
  223. _p0 = unsafe.Pointer(&_zero)
  224. }
  225. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
  226. if e1 != 0 {
  227. err = errnoErr(e1)
  228. }
  229. return
  230. }
  231. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  232. func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
  233. var _p0 unsafe.Pointer
  234. if len(buf) > 0 {
  235. _p0 = unsafe.Pointer(&buf[0])
  236. } else {
  237. _p0 = unsafe.Pointer(&_zero)
  238. }
  239. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
  240. ret = int(r0)
  241. if e1 != 0 {
  242. err = errnoErr(e1)
  243. }
  244. return
  245. }
  246. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  247. func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  248. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  249. if e1 != 0 {
  250. err = errnoErr(e1)
  251. }
  252. return
  253. }
  254. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  255. func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
  256. var _p0 *byte
  257. _p0, err = BytePtrFromString(arg)
  258. if err != nil {
  259. return
  260. }
  261. _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
  262. if e1 != 0 {
  263. err = errnoErr(e1)
  264. }
  265. return
  266. }
  267. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  268. func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
  269. var _p0 *byte
  270. _p0, err = BytePtrFromString(source)
  271. if err != nil {
  272. return
  273. }
  274. var _p1 *byte
  275. _p1, err = BytePtrFromString(target)
  276. if err != nil {
  277. return
  278. }
  279. var _p2 *byte
  280. _p2, err = BytePtrFromString(fstype)
  281. if err != nil {
  282. return
  283. }
  284. _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
  285. if e1 != 0 {
  286. err = errnoErr(e1)
  287. }
  288. return
  289. }
  290. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  291. func Acct(path string) (err error) {
  292. var _p0 *byte
  293. _p0, err = BytePtrFromString(path)
  294. if err != nil {
  295. return
  296. }
  297. _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  298. if e1 != 0 {
  299. err = errnoErr(e1)
  300. }
  301. return
  302. }
  303. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  304. func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
  305. var _p0 *byte
  306. _p0, err = BytePtrFromString(keyType)
  307. if err != nil {
  308. return
  309. }
  310. var _p1 *byte
  311. _p1, err = BytePtrFromString(description)
  312. if err != nil {
  313. return
  314. }
  315. var _p2 unsafe.Pointer
  316. if len(payload) > 0 {
  317. _p2 = unsafe.Pointer(&payload[0])
  318. } else {
  319. _p2 = unsafe.Pointer(&_zero)
  320. }
  321. r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
  322. id = int(r0)
  323. if e1 != 0 {
  324. err = errnoErr(e1)
  325. }
  326. return
  327. }
  328. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  329. func Adjtimex(buf *Timex) (state int, err error) {
  330. r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
  331. state = int(r0)
  332. if e1 != 0 {
  333. err = errnoErr(e1)
  334. }
  335. return
  336. }
  337. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  338. func Chdir(path string) (err error) {
  339. var _p0 *byte
  340. _p0, err = BytePtrFromString(path)
  341. if err != nil {
  342. return
  343. }
  344. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  345. if e1 != 0 {
  346. err = errnoErr(e1)
  347. }
  348. return
  349. }
  350. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  351. func Chroot(path string) (err error) {
  352. var _p0 *byte
  353. _p0, err = BytePtrFromString(path)
  354. if err != nil {
  355. return
  356. }
  357. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  358. if e1 != 0 {
  359. err = errnoErr(e1)
  360. }
  361. return
  362. }
  363. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  364. func ClockGettime(clockid int32, time *Timespec) (err error) {
  365. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
  366. if e1 != 0 {
  367. err = errnoErr(e1)
  368. }
  369. return
  370. }
  371. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  372. func Close(fd int) (err error) {
  373. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  374. if e1 != 0 {
  375. err = errnoErr(e1)
  376. }
  377. return
  378. }
  379. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  380. func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  381. r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  382. n = int(r0)
  383. if e1 != 0 {
  384. err = errnoErr(e1)
  385. }
  386. return
  387. }
  388. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  389. func Dup(oldfd int) (fd int, err error) {
  390. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  391. fd = int(r0)
  392. if e1 != 0 {
  393. err = errnoErr(e1)
  394. }
  395. return
  396. }
  397. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  398. func Dup3(oldfd int, newfd int, flags int) (err error) {
  399. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  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 EpollCreate1(flag int) (fd int, err error) {
  407. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  408. fd = int(r0)
  409. if e1 != 0 {
  410. err = errnoErr(e1)
  411. }
  412. return
  413. }
  414. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  415. func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  416. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
  417. if e1 != 0 {
  418. err = errnoErr(e1)
  419. }
  420. return
  421. }
  422. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  423. func Eventfd(initval uint, flags int) (fd int, err error) {
  424. r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
  425. fd = int(r0)
  426. if e1 != 0 {
  427. err = errnoErr(e1)
  428. }
  429. return
  430. }
  431. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  432. func Exit(code int) {
  433. SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  434. return
  435. }
  436. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  437. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  438. var _p0 *byte
  439. _p0, err = BytePtrFromString(path)
  440. if err != nil {
  441. return
  442. }
  443. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  444. if e1 != 0 {
  445. err = errnoErr(e1)
  446. }
  447. return
  448. }
  449. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  450. func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  451. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
  452. if e1 != 0 {
  453. err = errnoErr(e1)
  454. }
  455. return
  456. }
  457. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  458. func Fchdir(fd int) (err error) {
  459. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  460. if e1 != 0 {
  461. err = errnoErr(e1)
  462. }
  463. return
  464. }
  465. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  466. func Fchmod(fd int, mode uint32) (err error) {
  467. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  468. if e1 != 0 {
  469. err = errnoErr(e1)
  470. }
  471. return
  472. }
  473. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  474. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  475. var _p0 *byte
  476. _p0, err = BytePtrFromString(path)
  477. if err != nil {
  478. return
  479. }
  480. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  481. if e1 != 0 {
  482. err = errnoErr(e1)
  483. }
  484. return
  485. }
  486. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  487. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  488. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  489. val = int(r0)
  490. if e1 != 0 {
  491. err = errnoErr(e1)
  492. }
  493. return
  494. }
  495. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  496. func Fdatasync(fd int) (err error) {
  497. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  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 Flock(fd int, how int) (err error) {
  505. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  506. if e1 != 0 {
  507. err = errnoErr(e1)
  508. }
  509. return
  510. }
  511. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  512. func Fsync(fd int) (err error) {
  513. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  514. if e1 != 0 {
  515. err = errnoErr(e1)
  516. }
  517. return
  518. }
  519. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  520. func Getdents(fd int, buf []byte) (n int, err error) {
  521. var _p0 unsafe.Pointer
  522. if len(buf) > 0 {
  523. _p0 = unsafe.Pointer(&buf[0])
  524. } else {
  525. _p0 = unsafe.Pointer(&_zero)
  526. }
  527. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  528. n = int(r0)
  529. if e1 != 0 {
  530. err = errnoErr(e1)
  531. }
  532. return
  533. }
  534. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  535. func Getpgid(pid int) (pgid int, err error) {
  536. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  537. pgid = int(r0)
  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 Getpid() (pid int) {
  545. r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
  546. pid = int(r0)
  547. return
  548. }
  549. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  550. func Getppid() (ppid int) {
  551. r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
  552. ppid = int(r0)
  553. return
  554. }
  555. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  556. func Getpriority(which int, who int) (prio int, err error) {
  557. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  558. prio = int(r0)
  559. if e1 != 0 {
  560. err = errnoErr(e1)
  561. }
  562. return
  563. }
  564. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  565. func Getrandom(buf []byte, flags int) (n int, err error) {
  566. var _p0 unsafe.Pointer
  567. if len(buf) > 0 {
  568. _p0 = unsafe.Pointer(&buf[0])
  569. } else {
  570. _p0 = unsafe.Pointer(&_zero)
  571. }
  572. r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
  573. n = int(r0)
  574. if e1 != 0 {
  575. err = errnoErr(e1)
  576. }
  577. return
  578. }
  579. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  580. func Getrusage(who int, rusage *Rusage) (err error) {
  581. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  582. if e1 != 0 {
  583. err = errnoErr(e1)
  584. }
  585. return
  586. }
  587. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  588. func Getsid(pid int) (sid int, err error) {
  589. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  590. sid = int(r0)
  591. if e1 != 0 {
  592. err = errnoErr(e1)
  593. }
  594. return
  595. }
  596. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  597. func Gettid() (tid int) {
  598. r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
  599. tid = int(r0)
  600. return
  601. }
  602. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  603. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  604. var _p0 *byte
  605. _p0, err = BytePtrFromString(path)
  606. if err != nil {
  607. return
  608. }
  609. var _p1 *byte
  610. _p1, err = BytePtrFromString(attr)
  611. if err != nil {
  612. return
  613. }
  614. var _p2 unsafe.Pointer
  615. if len(dest) > 0 {
  616. _p2 = unsafe.Pointer(&dest[0])
  617. } else {
  618. _p2 = unsafe.Pointer(&_zero)
  619. }
  620. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  621. sz = int(r0)
  622. if e1 != 0 {
  623. err = errnoErr(e1)
  624. }
  625. return
  626. }
  627. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  628. func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  629. var _p0 *byte
  630. _p0, err = BytePtrFromString(pathname)
  631. if err != nil {
  632. return
  633. }
  634. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  635. watchdesc = int(r0)
  636. if e1 != 0 {
  637. err = errnoErr(e1)
  638. }
  639. return
  640. }
  641. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  642. func InotifyInit1(flags int) (fd int, err error) {
  643. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  644. fd = int(r0)
  645. if e1 != 0 {
  646. err = errnoErr(e1)
  647. }
  648. return
  649. }
  650. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  651. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  652. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  653. success = int(r0)
  654. if e1 != 0 {
  655. err = errnoErr(e1)
  656. }
  657. return
  658. }
  659. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  660. func Kill(pid int, sig syscall.Signal) (err error) {
  661. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  662. if e1 != 0 {
  663. err = errnoErr(e1)
  664. }
  665. return
  666. }
  667. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  668. func Klogctl(typ int, buf []byte) (n int, err error) {
  669. var _p0 unsafe.Pointer
  670. if len(buf) > 0 {
  671. _p0 = unsafe.Pointer(&buf[0])
  672. } else {
  673. _p0 = unsafe.Pointer(&_zero)
  674. }
  675. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  676. n = int(r0)
  677. if e1 != 0 {
  678. err = errnoErr(e1)
  679. }
  680. return
  681. }
  682. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  683. func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  684. var _p0 *byte
  685. _p0, err = BytePtrFromString(path)
  686. if err != nil {
  687. return
  688. }
  689. var _p1 *byte
  690. _p1, err = BytePtrFromString(attr)
  691. if err != nil {
  692. return
  693. }
  694. var _p2 unsafe.Pointer
  695. if len(dest) > 0 {
  696. _p2 = unsafe.Pointer(&dest[0])
  697. } else {
  698. _p2 = unsafe.Pointer(&_zero)
  699. }
  700. r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  701. sz = int(r0)
  702. if e1 != 0 {
  703. err = errnoErr(e1)
  704. }
  705. return
  706. }
  707. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  708. func Listxattr(path string, dest []byte) (sz int, err error) {
  709. var _p0 *byte
  710. _p0, err = BytePtrFromString(path)
  711. if err != nil {
  712. return
  713. }
  714. var _p1 unsafe.Pointer
  715. if len(dest) > 0 {
  716. _p1 = unsafe.Pointer(&dest[0])
  717. } else {
  718. _p1 = unsafe.Pointer(&_zero)
  719. }
  720. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  721. sz = int(r0)
  722. if e1 != 0 {
  723. err = errnoErr(e1)
  724. }
  725. return
  726. }
  727. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  728. func Llistxattr(path string, dest []byte) (sz int, err error) {
  729. var _p0 *byte
  730. _p0, err = BytePtrFromString(path)
  731. if err != nil {
  732. return
  733. }
  734. var _p1 unsafe.Pointer
  735. if len(dest) > 0 {
  736. _p1 = unsafe.Pointer(&dest[0])
  737. } else {
  738. _p1 = unsafe.Pointer(&_zero)
  739. }
  740. r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  741. sz = 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 Lremovexattr(path string, attr string) (err error) {
  749. var _p0 *byte
  750. _p0, err = BytePtrFromString(path)
  751. if err != nil {
  752. return
  753. }
  754. var _p1 *byte
  755. _p1, err = BytePtrFromString(attr)
  756. if err != nil {
  757. return
  758. }
  759. _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  760. if e1 != 0 {
  761. err = errnoErr(e1)
  762. }
  763. return
  764. }
  765. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  766. func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  767. var _p0 *byte
  768. _p0, err = BytePtrFromString(path)
  769. if err != nil {
  770. return
  771. }
  772. var _p1 *byte
  773. _p1, err = BytePtrFromString(attr)
  774. if err != nil {
  775. return
  776. }
  777. var _p2 unsafe.Pointer
  778. if len(data) > 0 {
  779. _p2 = unsafe.Pointer(&data[0])
  780. } else {
  781. _p2 = unsafe.Pointer(&_zero)
  782. }
  783. _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  784. if e1 != 0 {
  785. err = errnoErr(e1)
  786. }
  787. return
  788. }
  789. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  790. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  791. var _p0 *byte
  792. _p0, err = BytePtrFromString(path)
  793. if err != nil {
  794. return
  795. }
  796. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  797. if e1 != 0 {
  798. err = errnoErr(e1)
  799. }
  800. return
  801. }
  802. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  803. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  804. var _p0 *byte
  805. _p0, err = BytePtrFromString(path)
  806. if err != nil {
  807. return
  808. }
  809. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  810. if e1 != 0 {
  811. err = errnoErr(e1)
  812. }
  813. return
  814. }
  815. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  816. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  817. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  818. if e1 != 0 {
  819. err = errnoErr(e1)
  820. }
  821. return
  822. }
  823. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  824. func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  825. r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  826. fd = int(r0)
  827. if e1 != 0 {
  828. err = errnoErr(e1)
  829. }
  830. return
  831. }
  832. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  833. func PivotRoot(newroot string, putold string) (err error) {
  834. var _p0 *byte
  835. _p0, err = BytePtrFromString(newroot)
  836. if err != nil {
  837. return
  838. }
  839. var _p1 *byte
  840. _p1, err = BytePtrFromString(putold)
  841. if err != nil {
  842. return
  843. }
  844. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  845. if e1 != 0 {
  846. err = errnoErr(e1)
  847. }
  848. return
  849. }
  850. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  851. func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  852. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  853. if e1 != 0 {
  854. err = errnoErr(e1)
  855. }
  856. return
  857. }
  858. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  859. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  860. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  861. if e1 != 0 {
  862. err = errnoErr(e1)
  863. }
  864. return
  865. }
  866. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  867. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  868. r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
  869. n = int(r0)
  870. if e1 != 0 {
  871. err = errnoErr(e1)
  872. }
  873. return
  874. }
  875. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  876. func read(fd int, p []byte) (n int, err error) {
  877. var _p0 unsafe.Pointer
  878. if len(p) > 0 {
  879. _p0 = unsafe.Pointer(&p[0])
  880. } else {
  881. _p0 = unsafe.Pointer(&_zero)
  882. }
  883. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  884. n = int(r0)
  885. if e1 != 0 {
  886. err = errnoErr(e1)
  887. }
  888. return
  889. }
  890. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  891. func Removexattr(path string, attr string) (err error) {
  892. var _p0 *byte
  893. _p0, err = BytePtrFromString(path)
  894. if err != nil {
  895. return
  896. }
  897. var _p1 *byte
  898. _p1, err = BytePtrFromString(attr)
  899. if err != nil {
  900. return
  901. }
  902. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  903. if e1 != 0 {
  904. err = errnoErr(e1)
  905. }
  906. return
  907. }
  908. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  909. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  910. var _p0 *byte
  911. _p0, err = BytePtrFromString(oldpath)
  912. if err != nil {
  913. return
  914. }
  915. var _p1 *byte
  916. _p1, err = BytePtrFromString(newpath)
  917. if err != nil {
  918. return
  919. }
  920. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  921. if e1 != 0 {
  922. err = errnoErr(e1)
  923. }
  924. return
  925. }
  926. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  927. func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  928. var _p0 *byte
  929. _p0, err = BytePtrFromString(keyType)
  930. if err != nil {
  931. return
  932. }
  933. var _p1 *byte
  934. _p1, err = BytePtrFromString(description)
  935. if err != nil {
  936. return
  937. }
  938. var _p2 *byte
  939. _p2, err = BytePtrFromString(callback)
  940. if err != nil {
  941. return
  942. }
  943. r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  944. id = int(r0)
  945. if e1 != 0 {
  946. err = errnoErr(e1)
  947. }
  948. return
  949. }
  950. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  951. func Setdomainname(p []byte) (err error) {
  952. var _p0 unsafe.Pointer
  953. if len(p) > 0 {
  954. _p0 = unsafe.Pointer(&p[0])
  955. } else {
  956. _p0 = unsafe.Pointer(&_zero)
  957. }
  958. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  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 Sethostname(p []byte) (err error) {
  966. var _p0 unsafe.Pointer
  967. if len(p) > 0 {
  968. _p0 = unsafe.Pointer(&p[0])
  969. } else {
  970. _p0 = unsafe.Pointer(&_zero)
  971. }
  972. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  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 Setpgid(pid int, pgid int) (err error) {
  980. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  981. if e1 != 0 {
  982. err = errnoErr(e1)
  983. }
  984. return
  985. }
  986. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  987. func Setsid() (pid int, err error) {
  988. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  989. pid = int(r0)
  990. if e1 != 0 {
  991. err = errnoErr(e1)
  992. }
  993. return
  994. }
  995. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  996. func Settimeofday(tv *Timeval) (err error) {
  997. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  998. if e1 != 0 {
  999. err = errnoErr(e1)
  1000. }
  1001. return
  1002. }
  1003. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1004. func Setns(fd int, nstype int) (err error) {
  1005. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  1006. if e1 != 0 {
  1007. err = errnoErr(e1)
  1008. }
  1009. return
  1010. }
  1011. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1012. func Setpriority(which int, who int, prio int) (err error) {
  1013. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1014. if e1 != 0 {
  1015. err = errnoErr(e1)
  1016. }
  1017. return
  1018. }
  1019. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1020. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1021. var _p0 *byte
  1022. _p0, err = BytePtrFromString(path)
  1023. if err != nil {
  1024. return
  1025. }
  1026. var _p1 *byte
  1027. _p1, err = BytePtrFromString(attr)
  1028. if err != nil {
  1029. return
  1030. }
  1031. var _p2 unsafe.Pointer
  1032. if len(data) > 0 {
  1033. _p2 = unsafe.Pointer(&data[0])
  1034. } else {
  1035. _p2 = unsafe.Pointer(&_zero)
  1036. }
  1037. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  1038. if e1 != 0 {
  1039. err = errnoErr(e1)
  1040. }
  1041. return
  1042. }
  1043. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1044. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1045. var _p0 *byte
  1046. _p0, err = BytePtrFromString(path)
  1047. if err != nil {
  1048. return
  1049. }
  1050. _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
  1051. if e1 != 0 {
  1052. err = errnoErr(e1)
  1053. }
  1054. return
  1055. }
  1056. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1057. func Sync() {
  1058. SyscallNoError(SYS_SYNC, 0, 0, 0)
  1059. return
  1060. }
  1061. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1062. func Syncfs(fd int) (err error) {
  1063. _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
  1064. if e1 != 0 {
  1065. err = errnoErr(e1)
  1066. }
  1067. return
  1068. }
  1069. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1070. func Sysinfo(info *Sysinfo_t) (err error) {
  1071. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  1072. if e1 != 0 {
  1073. err = errnoErr(e1)
  1074. }
  1075. return
  1076. }
  1077. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1078. func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  1079. r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  1080. n = int64(r0)
  1081. if e1 != 0 {
  1082. err = errnoErr(e1)
  1083. }
  1084. return
  1085. }
  1086. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1087. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1088. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  1089. if e1 != 0 {
  1090. err = errnoErr(e1)
  1091. }
  1092. return
  1093. }
  1094. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1095. func Times(tms *Tms) (ticks uintptr, err error) {
  1096. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1097. ticks = uintptr(r0)
  1098. if e1 != 0 {
  1099. err = errnoErr(e1)
  1100. }
  1101. return
  1102. }
  1103. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1104. func Umask(mask int) (oldmask int) {
  1105. r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1106. oldmask = int(r0)
  1107. return
  1108. }
  1109. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1110. func Uname(buf *Utsname) (err error) {
  1111. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 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 Unmount(target string, flags int) (err error) {
  1119. var _p0 *byte
  1120. _p0, err = BytePtrFromString(target)
  1121. if err != nil {
  1122. return
  1123. }
  1124. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1125. if e1 != 0 {
  1126. err = errnoErr(e1)
  1127. }
  1128. return
  1129. }
  1130. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1131. func Unshare(flags int) (err error) {
  1132. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1133. if e1 != 0 {
  1134. err = errnoErr(e1)
  1135. }
  1136. return
  1137. }
  1138. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1139. func write(fd int, p []byte) (n int, err error) {
  1140. var _p0 unsafe.Pointer
  1141. if len(p) > 0 {
  1142. _p0 = unsafe.Pointer(&p[0])
  1143. } else {
  1144. _p0 = unsafe.Pointer(&_zero)
  1145. }
  1146. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1147. n = int(r0)
  1148. if e1 != 0 {
  1149. err = errnoErr(e1)
  1150. }
  1151. return
  1152. }
  1153. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1154. func exitThread(code int) (err error) {
  1155. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  1156. if e1 != 0 {
  1157. err = errnoErr(e1)
  1158. }
  1159. return
  1160. }
  1161. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1162. func readlen(fd int, p *byte, np int) (n int, err error) {
  1163. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1164. n = int(r0)
  1165. if e1 != 0 {
  1166. err = errnoErr(e1)
  1167. }
  1168. return
  1169. }
  1170. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1171. func writelen(fd int, p *byte, np int) (n int, err error) {
  1172. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1173. n = int(r0)
  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 munmap(addr uintptr, length uintptr) (err error) {
  1181. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  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 Madvise(b []byte, advice int) (err error) {
  1189. var _p0 unsafe.Pointer
  1190. if len(b) > 0 {
  1191. _p0 = unsafe.Pointer(&b[0])
  1192. } else {
  1193. _p0 = unsafe.Pointer(&_zero)
  1194. }
  1195. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  1196. if e1 != 0 {
  1197. err = errnoErr(e1)
  1198. }
  1199. return
  1200. }
  1201. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1202. func Mprotect(b []byte, prot int) (err error) {
  1203. var _p0 unsafe.Pointer
  1204. if len(b) > 0 {
  1205. _p0 = unsafe.Pointer(&b[0])
  1206. } else {
  1207. _p0 = unsafe.Pointer(&_zero)
  1208. }
  1209. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  1210. if e1 != 0 {
  1211. err = errnoErr(e1)
  1212. }
  1213. return
  1214. }
  1215. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1216. func Mlock(b []byte) (err error) {
  1217. var _p0 unsafe.Pointer
  1218. if len(b) > 0 {
  1219. _p0 = unsafe.Pointer(&b[0])
  1220. } else {
  1221. _p0 = unsafe.Pointer(&_zero)
  1222. }
  1223. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 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 Mlockall(flags int) (err error) {
  1231. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  1232. if e1 != 0 {
  1233. err = errnoErr(e1)
  1234. }
  1235. return
  1236. }
  1237. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1238. func Msync(b []byte, flags int) (err error) {
  1239. var _p0 unsafe.Pointer
  1240. if len(b) > 0 {
  1241. _p0 = unsafe.Pointer(&b[0])
  1242. } else {
  1243. _p0 = unsafe.Pointer(&_zero)
  1244. }
  1245. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  1246. if e1 != 0 {
  1247. err = errnoErr(e1)
  1248. }
  1249. return
  1250. }
  1251. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1252. func Munlock(b []byte) (err error) {
  1253. var _p0 unsafe.Pointer
  1254. if len(b) > 0 {
  1255. _p0 = unsafe.Pointer(&b[0])
  1256. } else {
  1257. _p0 = unsafe.Pointer(&_zero)
  1258. }
  1259. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1260. if e1 != 0 {
  1261. err = errnoErr(e1)
  1262. }
  1263. return
  1264. }
  1265. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1266. func Munlockall() (err error) {
  1267. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1268. if e1 != 0 {
  1269. err = errnoErr(e1)
  1270. }
  1271. return
  1272. }
  1273. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1274. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1275. var _p0 unsafe.Pointer
  1276. if len(events) > 0 {
  1277. _p0 = unsafe.Pointer(&events[0])
  1278. } else {
  1279. _p0 = unsafe.Pointer(&_zero)
  1280. }
  1281. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1282. n = int(r0)
  1283. if e1 != 0 {
  1284. err = errnoErr(e1)
  1285. }
  1286. return
  1287. }
  1288. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1289. func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  1290. _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
  1291. if e1 != 0 {
  1292. err = errnoErr(e1)
  1293. }
  1294. return
  1295. }
  1296. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1297. func Dup2(oldfd int, newfd int) (err error) {
  1298. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
  1299. if e1 != 0 {
  1300. err = errnoErr(e1)
  1301. }
  1302. return
  1303. }
  1304. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1305. func Fchown(fd int, uid int, gid int) (err error) {
  1306. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  1307. if e1 != 0 {
  1308. err = errnoErr(e1)
  1309. }
  1310. return
  1311. }
  1312. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1313. func Fstat(fd int, stat *Stat_t) (err error) {
  1314. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1315. if e1 != 0 {
  1316. err = errnoErr(e1)
  1317. }
  1318. return
  1319. }
  1320. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1321. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  1322. var _p0 *byte
  1323. _p0, err = BytePtrFromString(path)
  1324. if err != nil {
  1325. return
  1326. }
  1327. _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  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 Fstatfs(fd int, buf *Statfs_t) (err error) {
  1335. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1336. if e1 != 0 {
  1337. err = errnoErr(e1)
  1338. }
  1339. return
  1340. }
  1341. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1342. func Ftruncate(fd int, length int64) (err error) {
  1343. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1344. if e1 != 0 {
  1345. err = errnoErr(e1)
  1346. }
  1347. return
  1348. }
  1349. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1350. func Getegid() (egid int) {
  1351. r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  1352. egid = int(r0)
  1353. return
  1354. }
  1355. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1356. func Geteuid() (euid int) {
  1357. r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  1358. euid = int(r0)
  1359. return
  1360. }
  1361. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1362. func Getgid() (gid int) {
  1363. r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
  1364. gid = int(r0)
  1365. return
  1366. }
  1367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1368. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1369. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1370. if e1 != 0 {
  1371. err = errnoErr(e1)
  1372. }
  1373. return
  1374. }
  1375. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1376. func Getuid() (uid int) {
  1377. r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
  1378. uid = int(r0)
  1379. return
  1380. }
  1381. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1382. func InotifyInit() (fd int, err error) {
  1383. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1384. fd = int(r0)
  1385. if e1 != 0 {
  1386. err = errnoErr(e1)
  1387. }
  1388. return
  1389. }
  1390. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1391. func Lchown(path string, uid int, gid int) (err error) {
  1392. var _p0 *byte
  1393. _p0, err = BytePtrFromString(path)
  1394. if err != nil {
  1395. return
  1396. }
  1397. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1398. if e1 != 0 {
  1399. err = errnoErr(e1)
  1400. }
  1401. return
  1402. }
  1403. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1404. func Listen(s int, n int) (err error) {
  1405. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1406. if e1 != 0 {
  1407. err = errnoErr(e1)
  1408. }
  1409. return
  1410. }
  1411. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1412. func Lstat(path string, stat *Stat_t) (err error) {
  1413. var _p0 *byte
  1414. _p0, err = BytePtrFromString(path)
  1415. if err != nil {
  1416. return
  1417. }
  1418. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1419. if e1 != 0 {
  1420. err = errnoErr(e1)
  1421. }
  1422. return
  1423. }
  1424. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1425. func Pause() (err error) {
  1426. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1427. if e1 != 0 {
  1428. err = errnoErr(e1)
  1429. }
  1430. return
  1431. }
  1432. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1433. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1434. var _p0 unsafe.Pointer
  1435. if len(p) > 0 {
  1436. _p0 = unsafe.Pointer(&p[0])
  1437. } else {
  1438. _p0 = unsafe.Pointer(&_zero)
  1439. }
  1440. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1441. n = int(r0)
  1442. if e1 != 0 {
  1443. err = errnoErr(e1)
  1444. }
  1445. return
  1446. }
  1447. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1448. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1449. var _p0 unsafe.Pointer
  1450. if len(p) > 0 {
  1451. _p0 = unsafe.Pointer(&p[0])
  1452. } else {
  1453. _p0 = unsafe.Pointer(&_zero)
  1454. }
  1455. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1456. n = int(r0)
  1457. if e1 != 0 {
  1458. err = errnoErr(e1)
  1459. }
  1460. return
  1461. }
  1462. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1463. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1464. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1465. off = int64(r0)
  1466. if e1 != 0 {
  1467. err = errnoErr(e1)
  1468. }
  1469. return
  1470. }
  1471. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1472. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1473. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1474. n = int(r0)
  1475. if e1 != 0 {
  1476. err = errnoErr(e1)
  1477. }
  1478. return
  1479. }
  1480. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1481. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1482. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1483. written = int(r0)
  1484. if e1 != 0 {
  1485. err = errnoErr(e1)
  1486. }
  1487. return
  1488. }
  1489. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1490. func Setfsgid(gid int) (err error) {
  1491. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1492. if e1 != 0 {
  1493. err = errnoErr(e1)
  1494. }
  1495. return
  1496. }
  1497. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1498. func Setfsuid(uid int) (err error) {
  1499. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1500. if e1 != 0 {
  1501. err = errnoErr(e1)
  1502. }
  1503. return
  1504. }
  1505. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1506. func Setregid(rgid int, egid int) (err error) {
  1507. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1508. if e1 != 0 {
  1509. err = errnoErr(e1)
  1510. }
  1511. return
  1512. }
  1513. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1514. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1515. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1516. if e1 != 0 {
  1517. err = errnoErr(e1)
  1518. }
  1519. return
  1520. }
  1521. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1522. func Setresuid(ruid int, euid int, suid int) (err error) {
  1523. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1524. if e1 != 0 {
  1525. err = errnoErr(e1)
  1526. }
  1527. return
  1528. }
  1529. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1530. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1531. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1532. if e1 != 0 {
  1533. err = errnoErr(e1)
  1534. }
  1535. return
  1536. }
  1537. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1538. func Setreuid(ruid int, euid int) (err error) {
  1539. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1540. if e1 != 0 {
  1541. err = errnoErr(e1)
  1542. }
  1543. return
  1544. }
  1545. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1546. func Shutdown(fd int, how int) (err error) {
  1547. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1548. if e1 != 0 {
  1549. err = errnoErr(e1)
  1550. }
  1551. return
  1552. }
  1553. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1554. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1555. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1556. n = int64(r0)
  1557. if e1 != 0 {
  1558. err = errnoErr(e1)
  1559. }
  1560. return
  1561. }
  1562. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1563. func Stat(path string, stat *Stat_t) (err error) {
  1564. var _p0 *byte
  1565. _p0, err = BytePtrFromString(path)
  1566. if err != nil {
  1567. return
  1568. }
  1569. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1570. if e1 != 0 {
  1571. err = errnoErr(e1)
  1572. }
  1573. return
  1574. }
  1575. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1576. func Statfs(path string, buf *Statfs_t) (err error) {
  1577. var _p0 *byte
  1578. _p0, err = BytePtrFromString(path)
  1579. if err != nil {
  1580. return
  1581. }
  1582. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1583. if e1 != 0 {
  1584. err = errnoErr(e1)
  1585. }
  1586. return
  1587. }
  1588. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1589. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1590. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1591. if e1 != 0 {
  1592. err = errnoErr(e1)
  1593. }
  1594. return
  1595. }
  1596. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1597. func Truncate(path string, length int64) (err error) {
  1598. var _p0 *byte
  1599. _p0, err = BytePtrFromString(path)
  1600. if err != nil {
  1601. return
  1602. }
  1603. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1604. if e1 != 0 {
  1605. err = errnoErr(e1)
  1606. }
  1607. return
  1608. }
  1609. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1610. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1611. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1612. fd = int(r0)
  1613. if e1 != 0 {
  1614. err = errnoErr(e1)
  1615. }
  1616. return
  1617. }
  1618. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1619. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1620. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1621. fd = int(r0)
  1622. if e1 != 0 {
  1623. err = errnoErr(e1)
  1624. }
  1625. return
  1626. }
  1627. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1628. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1629. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1630. if e1 != 0 {
  1631. err = errnoErr(e1)
  1632. }
  1633. return
  1634. }
  1635. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1636. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1637. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1638. if e1 != 0 {
  1639. err = errnoErr(e1)
  1640. }
  1641. return
  1642. }
  1643. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1644. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1645. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1646. nn = int(r0)
  1647. if e1 != 0 {
  1648. err = errnoErr(e1)
  1649. }
  1650. return
  1651. }
  1652. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1653. func setgroups(n int, list *_Gid_t) (err error) {
  1654. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1655. if e1 != 0 {
  1656. err = errnoErr(e1)
  1657. }
  1658. return
  1659. }
  1660. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1661. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1662. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1663. if e1 != 0 {
  1664. err = errnoErr(e1)
  1665. }
  1666. return
  1667. }
  1668. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1669. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1670. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1671. if e1 != 0 {
  1672. err = errnoErr(e1)
  1673. }
  1674. return
  1675. }
  1676. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1677. func socket(domain int, typ int, proto int) (fd int, err error) {
  1678. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1679. fd = int(r0)
  1680. if e1 != 0 {
  1681. err = errnoErr(e1)
  1682. }
  1683. return
  1684. }
  1685. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1686. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1687. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1688. if e1 != 0 {
  1689. err = errnoErr(e1)
  1690. }
  1691. return
  1692. }
  1693. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1694. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1695. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1696. if e1 != 0 {
  1697. err = errnoErr(e1)
  1698. }
  1699. return
  1700. }
  1701. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1702. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1703. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1704. if e1 != 0 {
  1705. err = errnoErr(e1)
  1706. }
  1707. return
  1708. }
  1709. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1710. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1711. var _p0 unsafe.Pointer
  1712. if len(p) > 0 {
  1713. _p0 = unsafe.Pointer(&p[0])
  1714. } else {
  1715. _p0 = unsafe.Pointer(&_zero)
  1716. }
  1717. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1718. n = int(r0)
  1719. if e1 != 0 {
  1720. err = errnoErr(e1)
  1721. }
  1722. return
  1723. }
  1724. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1725. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1726. var _p0 unsafe.Pointer
  1727. if len(buf) > 0 {
  1728. _p0 = unsafe.Pointer(&buf[0])
  1729. } else {
  1730. _p0 = unsafe.Pointer(&_zero)
  1731. }
  1732. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1733. if e1 != 0 {
  1734. err = errnoErr(e1)
  1735. }
  1736. return
  1737. }
  1738. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1739. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1740. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1741. n = int(r0)
  1742. if e1 != 0 {
  1743. err = errnoErr(e1)
  1744. }
  1745. return
  1746. }
  1747. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1748. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1749. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1750. n = int(r0)
  1751. if e1 != 0 {
  1752. err = errnoErr(e1)
  1753. }
  1754. return
  1755. }
  1756. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1757. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1758. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  1759. xaddr = uintptr(r0)
  1760. if e1 != 0 {
  1761. err = errnoErr(e1)
  1762. }
  1763. return
  1764. }
  1765. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1766. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  1767. var _p0 *byte
  1768. _p0, err = BytePtrFromString(path)
  1769. if err != nil {
  1770. return
  1771. }
  1772. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  1773. if e1 != 0 {
  1774. err = errnoErr(e1)
  1775. }
  1776. return
  1777. }
  1778. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1779. func Gettimeofday(tv *Timeval) (err error) {
  1780. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1781. if e1 != 0 {
  1782. err = errnoErr(e1)
  1783. }
  1784. return
  1785. }
  1786. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1787. func Utime(path string, buf *Utimbuf) (err error) {
  1788. var _p0 *byte
  1789. _p0, err = BytePtrFromString(path)
  1790. if err != nil {
  1791. return
  1792. }
  1793. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1794. if e1 != 0 {
  1795. err = errnoErr(e1)
  1796. }
  1797. return
  1798. }
  1799. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1800. func utimes(path string, times *[2]Timeval) (err error) {
  1801. var _p0 *byte
  1802. _p0, err = BytePtrFromString(path)
  1803. if err != nil {
  1804. return
  1805. }
  1806. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  1807. if e1 != 0 {
  1808. err = errnoErr(e1)
  1809. }
  1810. return
  1811. }
  1812. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1813. func pipe(p *[2]_C_int) (err error) {
  1814. _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  1815. if e1 != 0 {
  1816. err = errnoErr(e1)
  1817. }
  1818. return
  1819. }
  1820. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1821. func pipe2(p *[2]_C_int, flags int) (err error) {
  1822. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  1823. if e1 != 0 {
  1824. err = errnoErr(e1)
  1825. }
  1826. return
  1827. }
  1828. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1829. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  1830. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  1831. n = int(r0)
  1832. if e1 != 0 {
  1833. err = errnoErr(e1)
  1834. }
  1835. return
  1836. }