zsyscall_linux_ppc64.go 52 KB

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