zsyscall_linux_mips64.go 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451
  1. // go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build linux,mips64
  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 FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
  12. r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
  13. fd = int(r0)
  14. if e1 != 0 {
  15. err = errnoErr(e1)
  16. }
  17. return
  18. }
  19. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  20. func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
  21. _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
  22. if e1 != 0 {
  23. err = errnoErr(e1)
  24. }
  25. return
  26. }
  27. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  28. func fchmodat(dirfd int, path string, mode uint32) (err error) {
  29. var _p0 *byte
  30. _p0, err = BytePtrFromString(path)
  31. if err != nil {
  32. return
  33. }
  34. _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  35. if e1 != 0 {
  36. err = errnoErr(e1)
  37. }
  38. return
  39. }
  40. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  41. func ioctl(fd int, req uint, arg uintptr) (err error) {
  42. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  43. if e1 != 0 {
  44. err = errnoErr(e1)
  45. }
  46. return
  47. }
  48. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  49. func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
  50. var _p0 *byte
  51. _p0, err = BytePtrFromString(oldpath)
  52. if err != nil {
  53. return
  54. }
  55. var _p1 *byte
  56. _p1, err = BytePtrFromString(newpath)
  57. if err != nil {
  58. return
  59. }
  60. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  61. if e1 != 0 {
  62. err = errnoErr(e1)
  63. }
  64. return
  65. }
  66. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  67. func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  68. var _p0 *byte
  69. _p0, err = BytePtrFromString(path)
  70. if err != nil {
  71. return
  72. }
  73. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  74. fd = int(r0)
  75. if e1 != 0 {
  76. err = errnoErr(e1)
  77. }
  78. return
  79. }
  80. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  81. func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  82. r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
  83. n = int(r0)
  84. if e1 != 0 {
  85. err = errnoErr(e1)
  86. }
  87. return
  88. }
  89. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  90. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  91. var _p0 *byte
  92. _p0, err = BytePtrFromString(path)
  93. if err != nil {
  94. return
  95. }
  96. var _p1 unsafe.Pointer
  97. if len(buf) > 0 {
  98. _p1 = unsafe.Pointer(&buf[0])
  99. } else {
  100. _p1 = unsafe.Pointer(&_zero)
  101. }
  102. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  103. n = int(r0)
  104. if e1 != 0 {
  105. err = errnoErr(e1)
  106. }
  107. return
  108. }
  109. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  110. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  111. var _p0 *byte
  112. _p0, err = BytePtrFromString(oldpath)
  113. if err != nil {
  114. return
  115. }
  116. var _p1 *byte
  117. _p1, err = BytePtrFromString(newpath)
  118. if err != nil {
  119. return
  120. }
  121. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  122. if e1 != 0 {
  123. err = errnoErr(e1)
  124. }
  125. return
  126. }
  127. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  128. func Unlinkat(dirfd int, path string, flags int) (err error) {
  129. var _p0 *byte
  130. _p0, err = BytePtrFromString(path)
  131. if err != nil {
  132. return
  133. }
  134. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  135. if e1 != 0 {
  136. err = errnoErr(e1)
  137. }
  138. return
  139. }
  140. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  141. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  142. var _p0 *byte
  143. _p0, err = BytePtrFromString(path)
  144. if err != nil {
  145. return
  146. }
  147. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  148. if e1 != 0 {
  149. err = errnoErr(e1)
  150. }
  151. return
  152. }
  153. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  154. func Getcwd(buf []byte) (n int, err error) {
  155. var _p0 unsafe.Pointer
  156. if len(buf) > 0 {
  157. _p0 = unsafe.Pointer(&buf[0])
  158. } else {
  159. _p0 = unsafe.Pointer(&_zero)
  160. }
  161. r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  162. n = int(r0)
  163. if e1 != 0 {
  164. err = errnoErr(e1)
  165. }
  166. return
  167. }
  168. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  169. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  170. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  171. wpid = int(r0)
  172. if e1 != 0 {
  173. err = errnoErr(e1)
  174. }
  175. return
  176. }
  177. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  178. func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
  179. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  180. ret = int(r0)
  181. if e1 != 0 {
  182. err = errnoErr(e1)
  183. }
  184. return
  185. }
  186. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  187. func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
  188. var _p0 unsafe.Pointer
  189. if len(buf) > 0 {
  190. _p0 = unsafe.Pointer(&buf[0])
  191. } else {
  192. _p0 = unsafe.Pointer(&_zero)
  193. }
  194. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
  195. ret = int(r0)
  196. if e1 != 0 {
  197. err = errnoErr(e1)
  198. }
  199. return
  200. }
  201. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  202. func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
  203. var _p0 *byte
  204. _p0, err = BytePtrFromString(arg2)
  205. if err != nil {
  206. return
  207. }
  208. r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
  209. ret = int(r0)
  210. if e1 != 0 {
  211. err = errnoErr(e1)
  212. }
  213. return
  214. }
  215. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  216. func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
  217. var _p0 *byte
  218. _p0, err = BytePtrFromString(arg3)
  219. if err != nil {
  220. return
  221. }
  222. var _p1 *byte
  223. _p1, err = BytePtrFromString(arg4)
  224. if err != nil {
  225. return
  226. }
  227. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
  228. ret = int(r0)
  229. if e1 != 0 {
  230. err = errnoErr(e1)
  231. }
  232. return
  233. }
  234. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  235. func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
  236. var _p0 unsafe.Pointer
  237. if len(payload) > 0 {
  238. _p0 = unsafe.Pointer(&payload[0])
  239. } else {
  240. _p0 = unsafe.Pointer(&_zero)
  241. }
  242. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
  243. if e1 != 0 {
  244. err = errnoErr(e1)
  245. }
  246. return
  247. }
  248. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  249. func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
  250. var _p0 unsafe.Pointer
  251. if len(buf) > 0 {
  252. _p0 = unsafe.Pointer(&buf[0])
  253. } else {
  254. _p0 = unsafe.Pointer(&_zero)
  255. }
  256. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
  257. ret = int(r0)
  258. if e1 != 0 {
  259. err = errnoErr(e1)
  260. }
  261. return
  262. }
  263. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  264. func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
  265. var _p0 *byte
  266. _p0, err = BytePtrFromString(keyType)
  267. if err != nil {
  268. return
  269. }
  270. var _p1 *byte
  271. _p1, err = BytePtrFromString(restriction)
  272. if err != nil {
  273. return
  274. }
  275. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
  276. if e1 != 0 {
  277. err = errnoErr(e1)
  278. }
  279. return
  280. }
  281. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  282. func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
  283. _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
  284. if e1 != 0 {
  285. err = errnoErr(e1)
  286. }
  287. return
  288. }
  289. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  290. func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  291. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  292. if e1 != 0 {
  293. err = errnoErr(e1)
  294. }
  295. return
  296. }
  297. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  298. func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
  299. var _p0 *byte
  300. _p0, err = BytePtrFromString(arg)
  301. if err != nil {
  302. return
  303. }
  304. _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
  305. if e1 != 0 {
  306. err = errnoErr(e1)
  307. }
  308. return
  309. }
  310. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  311. func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
  312. var _p0 *byte
  313. _p0, err = BytePtrFromString(source)
  314. if err != nil {
  315. return
  316. }
  317. var _p1 *byte
  318. _p1, err = BytePtrFromString(target)
  319. if err != nil {
  320. return
  321. }
  322. var _p2 *byte
  323. _p2, err = BytePtrFromString(fstype)
  324. if err != nil {
  325. return
  326. }
  327. _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
  328. if e1 != 0 {
  329. err = errnoErr(e1)
  330. }
  331. return
  332. }
  333. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  334. func Acct(path string) (err error) {
  335. var _p0 *byte
  336. _p0, err = BytePtrFromString(path)
  337. if err != nil {
  338. return
  339. }
  340. _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  341. if e1 != 0 {
  342. err = errnoErr(e1)
  343. }
  344. return
  345. }
  346. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  347. func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
  348. var _p0 *byte
  349. _p0, err = BytePtrFromString(keyType)
  350. if err != nil {
  351. return
  352. }
  353. var _p1 *byte
  354. _p1, err = BytePtrFromString(description)
  355. if err != nil {
  356. return
  357. }
  358. var _p2 unsafe.Pointer
  359. if len(payload) > 0 {
  360. _p2 = unsafe.Pointer(&payload[0])
  361. } else {
  362. _p2 = unsafe.Pointer(&_zero)
  363. }
  364. r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
  365. id = int(r0)
  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 Adjtimex(buf *Timex) (state int, err error) {
  373. r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
  374. state = int(r0)
  375. if e1 != 0 {
  376. err = errnoErr(e1)
  377. }
  378. return
  379. }
  380. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  381. func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
  382. _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
  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 Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
  390. _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
  391. if e1 != 0 {
  392. err = errnoErr(e1)
  393. }
  394. return
  395. }
  396. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  397. func Chdir(path string) (err error) {
  398. var _p0 *byte
  399. _p0, err = BytePtrFromString(path)
  400. if err != nil {
  401. return
  402. }
  403. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  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 Chroot(path string) (err error) {
  411. var _p0 *byte
  412. _p0, err = BytePtrFromString(path)
  413. if err != nil {
  414. return
  415. }
  416. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 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 ClockGetres(clockid int32, res *Timespec) (err error) {
  424. _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
  425. if e1 != 0 {
  426. err = errnoErr(e1)
  427. }
  428. return
  429. }
  430. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  431. func ClockGettime(clockid int32, time *Timespec) (err error) {
  432. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
  433. if e1 != 0 {
  434. err = errnoErr(e1)
  435. }
  436. return
  437. }
  438. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  439. func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
  440. _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
  441. if e1 != 0 {
  442. err = errnoErr(e1)
  443. }
  444. return
  445. }
  446. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  447. func Close(fd int) (err error) {
  448. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  449. if e1 != 0 {
  450. err = errnoErr(e1)
  451. }
  452. return
  453. }
  454. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  455. func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  456. r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  457. n = int(r0)
  458. if e1 != 0 {
  459. err = errnoErr(e1)
  460. }
  461. return
  462. }
  463. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  464. func DeleteModule(name string, flags int) (err error) {
  465. var _p0 *byte
  466. _p0, err = BytePtrFromString(name)
  467. if err != nil {
  468. return
  469. }
  470. _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  471. if e1 != 0 {
  472. err = errnoErr(e1)
  473. }
  474. return
  475. }
  476. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  477. func Dup(oldfd int) (fd int, err error) {
  478. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  479. fd = int(r0)
  480. if e1 != 0 {
  481. err = errnoErr(e1)
  482. }
  483. return
  484. }
  485. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  486. func Dup3(oldfd int, newfd int, flags int) (err error) {
  487. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  488. if e1 != 0 {
  489. err = errnoErr(e1)
  490. }
  491. return
  492. }
  493. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  494. func EpollCreate1(flag int) (fd int, err error) {
  495. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  496. fd = int(r0)
  497. if e1 != 0 {
  498. err = errnoErr(e1)
  499. }
  500. return
  501. }
  502. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  503. func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  504. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
  505. if e1 != 0 {
  506. err = errnoErr(e1)
  507. }
  508. return
  509. }
  510. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  511. func Eventfd(initval uint, flags int) (fd int, err error) {
  512. r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
  513. fd = int(r0)
  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 Exit(code int) {
  521. SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  522. return
  523. }
  524. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  525. func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  526. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
  527. if e1 != 0 {
  528. err = errnoErr(e1)
  529. }
  530. return
  531. }
  532. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  533. func Fchdir(fd int) (err error) {
  534. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  535. if e1 != 0 {
  536. err = errnoErr(e1)
  537. }
  538. return
  539. }
  540. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  541. func Fchmod(fd int, mode uint32) (err error) {
  542. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  543. if e1 != 0 {
  544. err = errnoErr(e1)
  545. }
  546. return
  547. }
  548. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  549. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  550. var _p0 *byte
  551. _p0, err = BytePtrFromString(path)
  552. if err != nil {
  553. return
  554. }
  555. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  556. if e1 != 0 {
  557. err = errnoErr(e1)
  558. }
  559. return
  560. }
  561. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  562. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  563. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  564. val = int(r0)
  565. if e1 != 0 {
  566. err = errnoErr(e1)
  567. }
  568. return
  569. }
  570. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  571. func Fdatasync(fd int) (err error) {
  572. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  573. if e1 != 0 {
  574. err = errnoErr(e1)
  575. }
  576. return
  577. }
  578. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  579. func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
  580. var _p0 *byte
  581. _p0, err = BytePtrFromString(attr)
  582. if err != nil {
  583. return
  584. }
  585. var _p1 unsafe.Pointer
  586. if len(dest) > 0 {
  587. _p1 = unsafe.Pointer(&dest[0])
  588. } else {
  589. _p1 = unsafe.Pointer(&_zero)
  590. }
  591. r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
  592. sz = int(r0)
  593. if e1 != 0 {
  594. err = errnoErr(e1)
  595. }
  596. return
  597. }
  598. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  599. func FinitModule(fd int, params string, flags int) (err error) {
  600. var _p0 *byte
  601. _p0, err = BytePtrFromString(params)
  602. if err != nil {
  603. return
  604. }
  605. _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  606. if e1 != 0 {
  607. err = errnoErr(e1)
  608. }
  609. return
  610. }
  611. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  612. func Flistxattr(fd int, dest []byte) (sz int, err error) {
  613. var _p0 unsafe.Pointer
  614. if len(dest) > 0 {
  615. _p0 = unsafe.Pointer(&dest[0])
  616. } else {
  617. _p0 = unsafe.Pointer(&_zero)
  618. }
  619. r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
  620. sz = 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 Flock(fd int, how int) (err error) {
  628. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  629. if e1 != 0 {
  630. err = errnoErr(e1)
  631. }
  632. return
  633. }
  634. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  635. func Fremovexattr(fd int, attr string) (err error) {
  636. var _p0 *byte
  637. _p0, err = BytePtrFromString(attr)
  638. if err != nil {
  639. return
  640. }
  641. _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
  642. if e1 != 0 {
  643. err = errnoErr(e1)
  644. }
  645. return
  646. }
  647. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  648. func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
  649. var _p0 *byte
  650. _p0, err = BytePtrFromString(attr)
  651. if err != nil {
  652. return
  653. }
  654. var _p1 unsafe.Pointer
  655. if len(dest) > 0 {
  656. _p1 = unsafe.Pointer(&dest[0])
  657. } else {
  658. _p1 = unsafe.Pointer(&_zero)
  659. }
  660. _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
  661. if e1 != 0 {
  662. err = errnoErr(e1)
  663. }
  664. return
  665. }
  666. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  667. func Fsync(fd int) (err error) {
  668. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  669. if e1 != 0 {
  670. err = errnoErr(e1)
  671. }
  672. return
  673. }
  674. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  675. func Getdents(fd int, buf []byte) (n int, err error) {
  676. var _p0 unsafe.Pointer
  677. if len(buf) > 0 {
  678. _p0 = unsafe.Pointer(&buf[0])
  679. } else {
  680. _p0 = unsafe.Pointer(&_zero)
  681. }
  682. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  683. n = 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 Getpgid(pid int) (pgid int, err error) {
  691. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  692. pgid = int(r0)
  693. if e1 != 0 {
  694. err = errnoErr(e1)
  695. }
  696. return
  697. }
  698. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  699. func Getpid() (pid int) {
  700. r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
  701. pid = int(r0)
  702. return
  703. }
  704. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  705. func Getppid() (ppid int) {
  706. r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
  707. ppid = int(r0)
  708. return
  709. }
  710. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  711. func Getpriority(which int, who int) (prio int, err error) {
  712. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  713. prio = int(r0)
  714. if e1 != 0 {
  715. err = errnoErr(e1)
  716. }
  717. return
  718. }
  719. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  720. func Getrandom(buf []byte, flags int) (n int, err error) {
  721. var _p0 unsafe.Pointer
  722. if len(buf) > 0 {
  723. _p0 = unsafe.Pointer(&buf[0])
  724. } else {
  725. _p0 = unsafe.Pointer(&_zero)
  726. }
  727. r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
  728. n = int(r0)
  729. if e1 != 0 {
  730. err = errnoErr(e1)
  731. }
  732. return
  733. }
  734. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  735. func Getrusage(who int, rusage *Rusage) (err error) {
  736. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  737. if e1 != 0 {
  738. err = errnoErr(e1)
  739. }
  740. return
  741. }
  742. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  743. func Getsid(pid int) (sid int, err error) {
  744. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  745. sid = int(r0)
  746. if e1 != 0 {
  747. err = errnoErr(e1)
  748. }
  749. return
  750. }
  751. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  752. func Gettid() (tid int) {
  753. r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
  754. tid = int(r0)
  755. return
  756. }
  757. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  758. func Getxattr(path string, attr 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 *byte
  765. _p1, err = BytePtrFromString(attr)
  766. if err != nil {
  767. return
  768. }
  769. var _p2 unsafe.Pointer
  770. if len(dest) > 0 {
  771. _p2 = unsafe.Pointer(&dest[0])
  772. } else {
  773. _p2 = unsafe.Pointer(&_zero)
  774. }
  775. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  776. sz = int(r0)
  777. if e1 != 0 {
  778. err = errnoErr(e1)
  779. }
  780. return
  781. }
  782. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  783. func InitModule(moduleImage []byte, params string) (err error) {
  784. var _p0 unsafe.Pointer
  785. if len(moduleImage) > 0 {
  786. _p0 = unsafe.Pointer(&moduleImage[0])
  787. } else {
  788. _p0 = unsafe.Pointer(&_zero)
  789. }
  790. var _p1 *byte
  791. _p1, err = BytePtrFromString(params)
  792. if err != nil {
  793. return
  794. }
  795. _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
  796. if e1 != 0 {
  797. err = errnoErr(e1)
  798. }
  799. return
  800. }
  801. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  802. func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  803. var _p0 *byte
  804. _p0, err = BytePtrFromString(pathname)
  805. if err != nil {
  806. return
  807. }
  808. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  809. watchdesc = int(r0)
  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 InotifyInit1(flags int) (fd int, err error) {
  817. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  818. fd = int(r0)
  819. if e1 != 0 {
  820. err = errnoErr(e1)
  821. }
  822. return
  823. }
  824. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  825. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  826. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  827. success = int(r0)
  828. if e1 != 0 {
  829. err = errnoErr(e1)
  830. }
  831. return
  832. }
  833. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  834. func Kill(pid int, sig syscall.Signal) (err error) {
  835. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  836. if e1 != 0 {
  837. err = errnoErr(e1)
  838. }
  839. return
  840. }
  841. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  842. func Klogctl(typ int, buf []byte) (n int, err error) {
  843. var _p0 unsafe.Pointer
  844. if len(buf) > 0 {
  845. _p0 = unsafe.Pointer(&buf[0])
  846. } else {
  847. _p0 = unsafe.Pointer(&_zero)
  848. }
  849. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  850. n = int(r0)
  851. if e1 != 0 {
  852. err = errnoErr(e1)
  853. }
  854. return
  855. }
  856. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  857. func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  858. var _p0 *byte
  859. _p0, err = BytePtrFromString(path)
  860. if err != nil {
  861. return
  862. }
  863. var _p1 *byte
  864. _p1, err = BytePtrFromString(attr)
  865. if err != nil {
  866. return
  867. }
  868. var _p2 unsafe.Pointer
  869. if len(dest) > 0 {
  870. _p2 = unsafe.Pointer(&dest[0])
  871. } else {
  872. _p2 = unsafe.Pointer(&_zero)
  873. }
  874. r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  875. sz = int(r0)
  876. if e1 != 0 {
  877. err = errnoErr(e1)
  878. }
  879. return
  880. }
  881. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  882. func Listxattr(path string, dest []byte) (sz int, err error) {
  883. var _p0 *byte
  884. _p0, err = BytePtrFromString(path)
  885. if err != nil {
  886. return
  887. }
  888. var _p1 unsafe.Pointer
  889. if len(dest) > 0 {
  890. _p1 = unsafe.Pointer(&dest[0])
  891. } else {
  892. _p1 = unsafe.Pointer(&_zero)
  893. }
  894. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  895. sz = int(r0)
  896. if e1 != 0 {
  897. err = errnoErr(e1)
  898. }
  899. return
  900. }
  901. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  902. func Llistxattr(path string, dest []byte) (sz int, err error) {
  903. var _p0 *byte
  904. _p0, err = BytePtrFromString(path)
  905. if err != nil {
  906. return
  907. }
  908. var _p1 unsafe.Pointer
  909. if len(dest) > 0 {
  910. _p1 = unsafe.Pointer(&dest[0])
  911. } else {
  912. _p1 = unsafe.Pointer(&_zero)
  913. }
  914. r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  915. sz = int(r0)
  916. if e1 != 0 {
  917. err = errnoErr(e1)
  918. }
  919. return
  920. }
  921. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  922. func Lremovexattr(path string, attr string) (err error) {
  923. var _p0 *byte
  924. _p0, err = BytePtrFromString(path)
  925. if err != nil {
  926. return
  927. }
  928. var _p1 *byte
  929. _p1, err = BytePtrFromString(attr)
  930. if err != nil {
  931. return
  932. }
  933. _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  934. if e1 != 0 {
  935. err = errnoErr(e1)
  936. }
  937. return
  938. }
  939. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  940. func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  941. var _p0 *byte
  942. _p0, err = BytePtrFromString(path)
  943. if err != nil {
  944. return
  945. }
  946. var _p1 *byte
  947. _p1, err = BytePtrFromString(attr)
  948. if err != nil {
  949. return
  950. }
  951. var _p2 unsafe.Pointer
  952. if len(data) > 0 {
  953. _p2 = unsafe.Pointer(&data[0])
  954. } else {
  955. _p2 = unsafe.Pointer(&_zero)
  956. }
  957. _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  958. if e1 != 0 {
  959. err = errnoErr(e1)
  960. }
  961. return
  962. }
  963. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  964. func MemfdCreate(name string, flags int) (fd int, err error) {
  965. var _p0 *byte
  966. _p0, err = BytePtrFromString(name)
  967. if err != nil {
  968. return
  969. }
  970. r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  971. fd = int(r0)
  972. if e1 != 0 {
  973. err = errnoErr(e1)
  974. }
  975. return
  976. }
  977. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  978. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  979. var _p0 *byte
  980. _p0, err = BytePtrFromString(path)
  981. if err != nil {
  982. return
  983. }
  984. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  985. if e1 != 0 {
  986. err = errnoErr(e1)
  987. }
  988. return
  989. }
  990. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  991. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  992. var _p0 *byte
  993. _p0, err = BytePtrFromString(path)
  994. if err != nil {
  995. return
  996. }
  997. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 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 Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1005. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 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 PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  1013. r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  1014. fd = int(r0)
  1015. if e1 != 0 {
  1016. err = errnoErr(e1)
  1017. }
  1018. return
  1019. }
  1020. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1021. func PivotRoot(newroot string, putold string) (err error) {
  1022. var _p0 *byte
  1023. _p0, err = BytePtrFromString(newroot)
  1024. if err != nil {
  1025. return
  1026. }
  1027. var _p1 *byte
  1028. _p1, err = BytePtrFromString(putold)
  1029. if err != nil {
  1030. return
  1031. }
  1032. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1033. if e1 != 0 {
  1034. err = errnoErr(e1)
  1035. }
  1036. return
  1037. }
  1038. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1039. func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  1040. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  1041. if e1 != 0 {
  1042. err = errnoErr(e1)
  1043. }
  1044. return
  1045. }
  1046. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1047. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  1048. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  1049. if e1 != 0 {
  1050. err = errnoErr(e1)
  1051. }
  1052. return
  1053. }
  1054. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1055. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  1056. 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)))
  1057. n = int(r0)
  1058. if e1 != 0 {
  1059. err = errnoErr(e1)
  1060. }
  1061. return
  1062. }
  1063. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1064. func read(fd int, p []byte) (n int, err error) {
  1065. var _p0 unsafe.Pointer
  1066. if len(p) > 0 {
  1067. _p0 = unsafe.Pointer(&p[0])
  1068. } else {
  1069. _p0 = unsafe.Pointer(&_zero)
  1070. }
  1071. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1072. n = int(r0)
  1073. if e1 != 0 {
  1074. err = errnoErr(e1)
  1075. }
  1076. return
  1077. }
  1078. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1079. func Removexattr(path string, attr string) (err error) {
  1080. var _p0 *byte
  1081. _p0, err = BytePtrFromString(path)
  1082. if err != nil {
  1083. return
  1084. }
  1085. var _p1 *byte
  1086. _p1, err = BytePtrFromString(attr)
  1087. if err != nil {
  1088. return
  1089. }
  1090. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1091. if e1 != 0 {
  1092. err = errnoErr(e1)
  1093. }
  1094. return
  1095. }
  1096. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1097. func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
  1098. var _p0 *byte
  1099. _p0, err = BytePtrFromString(oldpath)
  1100. if err != nil {
  1101. return
  1102. }
  1103. var _p1 *byte
  1104. _p1, err = BytePtrFromString(newpath)
  1105. if err != nil {
  1106. return
  1107. }
  1108. _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1109. if e1 != 0 {
  1110. err = errnoErr(e1)
  1111. }
  1112. return
  1113. }
  1114. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1115. func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  1116. var _p0 *byte
  1117. _p0, err = BytePtrFromString(keyType)
  1118. if err != nil {
  1119. return
  1120. }
  1121. var _p1 *byte
  1122. _p1, err = BytePtrFromString(description)
  1123. if err != nil {
  1124. return
  1125. }
  1126. var _p2 *byte
  1127. _p2, err = BytePtrFromString(callback)
  1128. if err != nil {
  1129. return
  1130. }
  1131. r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  1132. id = int(r0)
  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 Setdomainname(p []byte) (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. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  1147. if e1 != 0 {
  1148. err = errnoErr(e1)
  1149. }
  1150. return
  1151. }
  1152. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1153. func Sethostname(p []byte) (err error) {
  1154. var _p0 unsafe.Pointer
  1155. if len(p) > 0 {
  1156. _p0 = unsafe.Pointer(&p[0])
  1157. } else {
  1158. _p0 = unsafe.Pointer(&_zero)
  1159. }
  1160. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  1161. if e1 != 0 {
  1162. err = errnoErr(e1)
  1163. }
  1164. return
  1165. }
  1166. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1167. func Setpgid(pid int, pgid int) (err error) {
  1168. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1169. if e1 != 0 {
  1170. err = errnoErr(e1)
  1171. }
  1172. return
  1173. }
  1174. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1175. func Setsid() (pid int, err error) {
  1176. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1177. pid = int(r0)
  1178. if e1 != 0 {
  1179. err = errnoErr(e1)
  1180. }
  1181. return
  1182. }
  1183. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1184. func Settimeofday(tv *Timeval) (err error) {
  1185. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1186. if e1 != 0 {
  1187. err = errnoErr(e1)
  1188. }
  1189. return
  1190. }
  1191. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1192. func Setns(fd int, nstype int) (err error) {
  1193. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  1194. if e1 != 0 {
  1195. err = errnoErr(e1)
  1196. }
  1197. return
  1198. }
  1199. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1200. func Setpriority(which int, who int, prio int) (err error) {
  1201. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1202. if e1 != 0 {
  1203. err = errnoErr(e1)
  1204. }
  1205. return
  1206. }
  1207. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1208. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1209. var _p0 *byte
  1210. _p0, err = BytePtrFromString(path)
  1211. if err != nil {
  1212. return
  1213. }
  1214. var _p1 *byte
  1215. _p1, err = BytePtrFromString(attr)
  1216. if err != nil {
  1217. return
  1218. }
  1219. var _p2 unsafe.Pointer
  1220. if len(data) > 0 {
  1221. _p2 = unsafe.Pointer(&data[0])
  1222. } else {
  1223. _p2 = unsafe.Pointer(&_zero)
  1224. }
  1225. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  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 signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
  1233. r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
  1234. newfd = int(r0)
  1235. if e1 != 0 {
  1236. err = errnoErr(e1)
  1237. }
  1238. return
  1239. }
  1240. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1241. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1242. var _p0 *byte
  1243. _p0, err = BytePtrFromString(path)
  1244. if err != nil {
  1245. return
  1246. }
  1247. _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 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 Sync() {
  1255. SyscallNoError(SYS_SYNC, 0, 0, 0)
  1256. return
  1257. }
  1258. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1259. func Syncfs(fd int) (err error) {
  1260. _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
  1261. if e1 != 0 {
  1262. err = errnoErr(e1)
  1263. }
  1264. return
  1265. }
  1266. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1267. func Sysinfo(info *Sysinfo_t) (err error) {
  1268. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  1269. if e1 != 0 {
  1270. err = errnoErr(e1)
  1271. }
  1272. return
  1273. }
  1274. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1275. func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  1276. r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  1277. n = int64(r0)
  1278. if e1 != 0 {
  1279. err = errnoErr(e1)
  1280. }
  1281. return
  1282. }
  1283. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1284. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1285. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  1286. if e1 != 0 {
  1287. err = errnoErr(e1)
  1288. }
  1289. return
  1290. }
  1291. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1292. func Times(tms *Tms) (ticks uintptr, err error) {
  1293. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1294. ticks = uintptr(r0)
  1295. if e1 != 0 {
  1296. err = errnoErr(e1)
  1297. }
  1298. return
  1299. }
  1300. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1301. func Umask(mask int) (oldmask int) {
  1302. r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1303. oldmask = int(r0)
  1304. return
  1305. }
  1306. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1307. func Uname(buf *Utsname) (err error) {
  1308. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  1309. if e1 != 0 {
  1310. err = errnoErr(e1)
  1311. }
  1312. return
  1313. }
  1314. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1315. func Unmount(target string, flags int) (err error) {
  1316. var _p0 *byte
  1317. _p0, err = BytePtrFromString(target)
  1318. if err != nil {
  1319. return
  1320. }
  1321. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1322. if e1 != 0 {
  1323. err = errnoErr(e1)
  1324. }
  1325. return
  1326. }
  1327. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1328. func Unshare(flags int) (err error) {
  1329. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1330. if e1 != 0 {
  1331. err = errnoErr(e1)
  1332. }
  1333. return
  1334. }
  1335. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1336. func write(fd int, p []byte) (n int, err error) {
  1337. var _p0 unsafe.Pointer
  1338. if len(p) > 0 {
  1339. _p0 = unsafe.Pointer(&p[0])
  1340. } else {
  1341. _p0 = unsafe.Pointer(&_zero)
  1342. }
  1343. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1344. n = int(r0)
  1345. if e1 != 0 {
  1346. err = errnoErr(e1)
  1347. }
  1348. return
  1349. }
  1350. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1351. func exitThread(code int) (err error) {
  1352. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  1353. if e1 != 0 {
  1354. err = errnoErr(e1)
  1355. }
  1356. return
  1357. }
  1358. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1359. func readlen(fd int, p *byte, np int) (n int, err error) {
  1360. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1361. n = int(r0)
  1362. if e1 != 0 {
  1363. err = errnoErr(e1)
  1364. }
  1365. return
  1366. }
  1367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1368. func writelen(fd int, p *byte, np int) (n int, err error) {
  1369. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1370. n = int(r0)
  1371. if e1 != 0 {
  1372. err = errnoErr(e1)
  1373. }
  1374. return
  1375. }
  1376. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1377. func munmap(addr uintptr, length uintptr) (err error) {
  1378. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1379. if e1 != 0 {
  1380. err = errnoErr(e1)
  1381. }
  1382. return
  1383. }
  1384. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1385. func Madvise(b []byte, advice int) (err error) {
  1386. var _p0 unsafe.Pointer
  1387. if len(b) > 0 {
  1388. _p0 = unsafe.Pointer(&b[0])
  1389. } else {
  1390. _p0 = unsafe.Pointer(&_zero)
  1391. }
  1392. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  1393. if e1 != 0 {
  1394. err = errnoErr(e1)
  1395. }
  1396. return
  1397. }
  1398. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1399. func Mprotect(b []byte, prot int) (err error) {
  1400. var _p0 unsafe.Pointer
  1401. if len(b) > 0 {
  1402. _p0 = unsafe.Pointer(&b[0])
  1403. } else {
  1404. _p0 = unsafe.Pointer(&_zero)
  1405. }
  1406. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  1407. if e1 != 0 {
  1408. err = errnoErr(e1)
  1409. }
  1410. return
  1411. }
  1412. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1413. func Mlock(b []byte) (err error) {
  1414. var _p0 unsafe.Pointer
  1415. if len(b) > 0 {
  1416. _p0 = unsafe.Pointer(&b[0])
  1417. } else {
  1418. _p0 = unsafe.Pointer(&_zero)
  1419. }
  1420. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1421. if e1 != 0 {
  1422. err = errnoErr(e1)
  1423. }
  1424. return
  1425. }
  1426. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1427. func Mlockall(flags int) (err error) {
  1428. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  1429. if e1 != 0 {
  1430. err = errnoErr(e1)
  1431. }
  1432. return
  1433. }
  1434. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1435. func Msync(b []byte, flags int) (err error) {
  1436. var _p0 unsafe.Pointer
  1437. if len(b) > 0 {
  1438. _p0 = unsafe.Pointer(&b[0])
  1439. } else {
  1440. _p0 = unsafe.Pointer(&_zero)
  1441. }
  1442. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  1443. if e1 != 0 {
  1444. err = errnoErr(e1)
  1445. }
  1446. return
  1447. }
  1448. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1449. func Munlock(b []byte) (err error) {
  1450. var _p0 unsafe.Pointer
  1451. if len(b) > 0 {
  1452. _p0 = unsafe.Pointer(&b[0])
  1453. } else {
  1454. _p0 = unsafe.Pointer(&_zero)
  1455. }
  1456. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  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 Munlockall() (err error) {
  1464. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1465. if e1 != 0 {
  1466. err = errnoErr(e1)
  1467. }
  1468. return
  1469. }
  1470. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1471. func faccessat(dirfd int, path string, mode uint32) (err error) {
  1472. var _p0 *byte
  1473. _p0, err = BytePtrFromString(path)
  1474. if err != nil {
  1475. return
  1476. }
  1477. _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1478. if e1 != 0 {
  1479. err = errnoErr(e1)
  1480. }
  1481. return
  1482. }
  1483. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1484. func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
  1485. var _p0 *byte
  1486. _p0, err = BytePtrFromString(pathname)
  1487. if err != nil {
  1488. return
  1489. }
  1490. _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
  1491. if e1 != 0 {
  1492. err = errnoErr(e1)
  1493. }
  1494. return
  1495. }
  1496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1497. func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
  1498. r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
  1499. fd = int(r0)
  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 Dup2(oldfd int, newfd int) (err error) {
  1507. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 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 EpollCreate(size int) (fd int, err error) {
  1515. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
  1516. fd = int(r0)
  1517. if e1 != 0 {
  1518. err = errnoErr(e1)
  1519. }
  1520. return
  1521. }
  1522. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1523. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1524. var _p0 unsafe.Pointer
  1525. if len(events) > 0 {
  1526. _p0 = unsafe.Pointer(&events[0])
  1527. } else {
  1528. _p0 = unsafe.Pointer(&_zero)
  1529. }
  1530. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1531. n = int(r0)
  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 Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  1539. _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 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 Fchown(fd int, uid int, gid int) (err error) {
  1547. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  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 Fstatfs(fd int, buf *Statfs_t) (err error) {
  1555. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1556. if e1 != 0 {
  1557. err = errnoErr(e1)
  1558. }
  1559. return
  1560. }
  1561. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1562. func Ftruncate(fd int, length int64) (err error) {
  1563. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1564. if e1 != 0 {
  1565. err = errnoErr(e1)
  1566. }
  1567. return
  1568. }
  1569. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1570. func Getegid() (egid int) {
  1571. r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  1572. egid = int(r0)
  1573. return
  1574. }
  1575. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1576. func Geteuid() (euid int) {
  1577. r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  1578. euid = int(r0)
  1579. return
  1580. }
  1581. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1582. func Getgid() (gid int) {
  1583. r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
  1584. gid = int(r0)
  1585. return
  1586. }
  1587. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1588. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1589. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1590. if e1 != 0 {
  1591. err = errnoErr(e1)
  1592. }
  1593. return
  1594. }
  1595. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1596. func Getuid() (uid int) {
  1597. r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
  1598. uid = int(r0)
  1599. return
  1600. }
  1601. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1602. func Lchown(path string, uid int, gid int) (err error) {
  1603. var _p0 *byte
  1604. _p0, err = BytePtrFromString(path)
  1605. if err != nil {
  1606. return
  1607. }
  1608. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1609. if e1 != 0 {
  1610. err = errnoErr(e1)
  1611. }
  1612. return
  1613. }
  1614. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1615. func Listen(s int, n int) (err error) {
  1616. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1617. if e1 != 0 {
  1618. err = errnoErr(e1)
  1619. }
  1620. return
  1621. }
  1622. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1623. func Pause() (err error) {
  1624. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1625. if e1 != 0 {
  1626. err = errnoErr(e1)
  1627. }
  1628. return
  1629. }
  1630. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1631. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1632. var _p0 unsafe.Pointer
  1633. if len(p) > 0 {
  1634. _p0 = unsafe.Pointer(&p[0])
  1635. } else {
  1636. _p0 = unsafe.Pointer(&_zero)
  1637. }
  1638. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1639. n = int(r0)
  1640. if e1 != 0 {
  1641. err = errnoErr(e1)
  1642. }
  1643. return
  1644. }
  1645. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1646. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1647. var _p0 unsafe.Pointer
  1648. if len(p) > 0 {
  1649. _p0 = unsafe.Pointer(&p[0])
  1650. } else {
  1651. _p0 = unsafe.Pointer(&_zero)
  1652. }
  1653. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1654. n = int(r0)
  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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1662. var _p0 *byte
  1663. _p0, err = BytePtrFromString(oldpath)
  1664. if err != nil {
  1665. return
  1666. }
  1667. var _p1 *byte
  1668. _p1, err = BytePtrFromString(newpath)
  1669. if err != nil {
  1670. return
  1671. }
  1672. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1673. if e1 != 0 {
  1674. err = errnoErr(e1)
  1675. }
  1676. return
  1677. }
  1678. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1679. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1680. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1681. off = int64(r0)
  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 sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1689. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1690. written = 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 Setfsgid(gid int) (err error) {
  1698. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 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 Setfsuid(uid int) (err error) {
  1706. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  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 Setregid(rgid int, egid int) (err error) {
  1714. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  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 Setresgid(rgid int, egid int, sgid int) (err error) {
  1722. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1723. if e1 != 0 {
  1724. err = errnoErr(e1)
  1725. }
  1726. return
  1727. }
  1728. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1729. func Setresuid(ruid int, euid int, suid int) (err error) {
  1730. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1731. if e1 != 0 {
  1732. err = errnoErr(e1)
  1733. }
  1734. return
  1735. }
  1736. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1737. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1738. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1739. if e1 != 0 {
  1740. err = errnoErr(e1)
  1741. }
  1742. return
  1743. }
  1744. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1745. func Setreuid(ruid int, euid int) (err error) {
  1746. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1747. if e1 != 0 {
  1748. err = errnoErr(e1)
  1749. }
  1750. return
  1751. }
  1752. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1753. func Shutdown(fd int, how int) (err error) {
  1754. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1755. if e1 != 0 {
  1756. err = errnoErr(e1)
  1757. }
  1758. return
  1759. }
  1760. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1761. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1762. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1763. n = int64(r0)
  1764. if e1 != 0 {
  1765. err = errnoErr(e1)
  1766. }
  1767. return
  1768. }
  1769. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1770. func Statfs(path string, buf *Statfs_t) (err error) {
  1771. var _p0 *byte
  1772. _p0, err = BytePtrFromString(path)
  1773. if err != nil {
  1774. return
  1775. }
  1776. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1777. if e1 != 0 {
  1778. err = errnoErr(e1)
  1779. }
  1780. return
  1781. }
  1782. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1783. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1784. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1785. if e1 != 0 {
  1786. err = errnoErr(e1)
  1787. }
  1788. return
  1789. }
  1790. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1791. func Truncate(path string, length int64) (err error) {
  1792. var _p0 *byte
  1793. _p0, err = BytePtrFromString(path)
  1794. if err != nil {
  1795. return
  1796. }
  1797. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1798. if e1 != 0 {
  1799. err = errnoErr(e1)
  1800. }
  1801. return
  1802. }
  1803. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1804. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  1805. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  1806. if e1 != 0 {
  1807. err = errnoErr(e1)
  1808. }
  1809. return
  1810. }
  1811. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1812. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1813. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1814. fd = int(r0)
  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 accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1822. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1823. fd = int(r0)
  1824. if e1 != 0 {
  1825. err = errnoErr(e1)
  1826. }
  1827. return
  1828. }
  1829. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1830. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1831. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1832. if e1 != 0 {
  1833. err = errnoErr(e1)
  1834. }
  1835. return
  1836. }
  1837. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1838. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1839. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1840. if e1 != 0 {
  1841. err = errnoErr(e1)
  1842. }
  1843. return
  1844. }
  1845. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1846. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1847. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1848. nn = int(r0)
  1849. if e1 != 0 {
  1850. err = errnoErr(e1)
  1851. }
  1852. return
  1853. }
  1854. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1855. func setgroups(n int, list *_Gid_t) (err error) {
  1856. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1857. if e1 != 0 {
  1858. err = errnoErr(e1)
  1859. }
  1860. return
  1861. }
  1862. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1863. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1864. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1865. if e1 != 0 {
  1866. err = errnoErr(e1)
  1867. }
  1868. return
  1869. }
  1870. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1871. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1872. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1873. if e1 != 0 {
  1874. err = errnoErr(e1)
  1875. }
  1876. return
  1877. }
  1878. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1879. func socket(domain int, typ int, proto int) (fd int, err error) {
  1880. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1881. fd = int(r0)
  1882. if e1 != 0 {
  1883. err = errnoErr(e1)
  1884. }
  1885. return
  1886. }
  1887. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1888. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1889. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1890. if e1 != 0 {
  1891. err = errnoErr(e1)
  1892. }
  1893. return
  1894. }
  1895. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1896. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1897. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1898. if e1 != 0 {
  1899. err = errnoErr(e1)
  1900. }
  1901. return
  1902. }
  1903. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1904. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1905. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1906. if e1 != 0 {
  1907. err = errnoErr(e1)
  1908. }
  1909. return
  1910. }
  1911. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1912. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1913. var _p0 unsafe.Pointer
  1914. if len(p) > 0 {
  1915. _p0 = unsafe.Pointer(&p[0])
  1916. } else {
  1917. _p0 = unsafe.Pointer(&_zero)
  1918. }
  1919. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1920. n = int(r0)
  1921. if e1 != 0 {
  1922. err = errnoErr(e1)
  1923. }
  1924. return
  1925. }
  1926. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1927. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1928. var _p0 unsafe.Pointer
  1929. if len(buf) > 0 {
  1930. _p0 = unsafe.Pointer(&buf[0])
  1931. } else {
  1932. _p0 = unsafe.Pointer(&_zero)
  1933. }
  1934. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1935. if e1 != 0 {
  1936. err = errnoErr(e1)
  1937. }
  1938. return
  1939. }
  1940. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1941. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1942. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1943. n = int(r0)
  1944. if e1 != 0 {
  1945. err = errnoErr(e1)
  1946. }
  1947. return
  1948. }
  1949. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1950. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1951. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1952. n = int(r0)
  1953. if e1 != 0 {
  1954. err = errnoErr(e1)
  1955. }
  1956. return
  1957. }
  1958. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1959. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1960. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  1961. xaddr = uintptr(r0)
  1962. if e1 != 0 {
  1963. err = errnoErr(e1)
  1964. }
  1965. return
  1966. }
  1967. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1968. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  1969. var _p0 *byte
  1970. _p0, err = BytePtrFromString(path)
  1971. if err != nil {
  1972. return
  1973. }
  1974. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  1975. if e1 != 0 {
  1976. err = errnoErr(e1)
  1977. }
  1978. return
  1979. }
  1980. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1981. func Gettimeofday(tv *Timeval) (err error) {
  1982. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1983. if e1 != 0 {
  1984. err = errnoErr(e1)
  1985. }
  1986. return
  1987. }
  1988. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1989. func Utime(path string, buf *Utimbuf) (err error) {
  1990. var _p0 *byte
  1991. _p0, err = BytePtrFromString(path)
  1992. if err != nil {
  1993. return
  1994. }
  1995. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1996. if e1 != 0 {
  1997. err = errnoErr(e1)
  1998. }
  1999. return
  2000. }
  2001. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2002. func utimes(path string, times *[2]Timeval) (err error) {
  2003. var _p0 *byte
  2004. _p0, err = BytePtrFromString(path)
  2005. if err != nil {
  2006. return
  2007. }
  2008. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  2009. if e1 != 0 {
  2010. err = errnoErr(e1)
  2011. }
  2012. return
  2013. }
  2014. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2015. func pipe2(p *[2]_C_int, flags int) (err error) {
  2016. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  2017. if e1 != 0 {
  2018. err = errnoErr(e1)
  2019. }
  2020. return
  2021. }
  2022. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2023. func fstat(fd int, st *stat_t) (err error) {
  2024. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
  2025. if e1 != 0 {
  2026. err = errnoErr(e1)
  2027. }
  2028. return
  2029. }
  2030. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2031. func fstatat(dirfd int, path string, st *stat_t, flags int) (err error) {
  2032. var _p0 *byte
  2033. _p0, err = BytePtrFromString(path)
  2034. if err != nil {
  2035. return
  2036. }
  2037. _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), uintptr(flags), 0, 0)
  2038. if e1 != 0 {
  2039. err = errnoErr(e1)
  2040. }
  2041. return
  2042. }
  2043. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2044. func lstat(path string, st *stat_t) (err error) {
  2045. var _p0 *byte
  2046. _p0, err = BytePtrFromString(path)
  2047. if err != nil {
  2048. return
  2049. }
  2050. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
  2051. if e1 != 0 {
  2052. err = errnoErr(e1)
  2053. }
  2054. return
  2055. }
  2056. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2057. func stat(path string, st *stat_t) (err error) {
  2058. var _p0 *byte
  2059. _p0, err = BytePtrFromString(path)
  2060. if err != nil {
  2061. return
  2062. }
  2063. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
  2064. if e1 != 0 {
  2065. err = errnoErr(e1)
  2066. }
  2067. return
  2068. }
  2069. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2070. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  2071. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  2072. n = int(r0)
  2073. if e1 != 0 {
  2074. err = errnoErr(e1)
  2075. }
  2076. return
  2077. }