zsyscall_linux_arm64.go 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030
  1. // mksyscall.pl -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build linux,arm64
  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_PWAIT, 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 Fchown(fd int, uid int, gid int) (err error) {
  1306. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  1307. if e1 != 0 {
  1308. err = errnoErr(e1)
  1309. }
  1310. return
  1311. }
  1312. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1313. func Fstat(fd int, stat *Stat_t) (err error) {
  1314. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1315. if e1 != 0 {
  1316. err = errnoErr(e1)
  1317. }
  1318. return
  1319. }
  1320. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1321. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  1322. var _p0 *byte
  1323. _p0, err = BytePtrFromString(path)
  1324. if err != nil {
  1325. return
  1326. }
  1327. _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1328. if e1 != 0 {
  1329. err = errnoErr(e1)
  1330. }
  1331. return
  1332. }
  1333. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1334. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1335. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1336. if e1 != 0 {
  1337. err = errnoErr(e1)
  1338. }
  1339. return
  1340. }
  1341. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1342. func Ftruncate(fd int, length int64) (err error) {
  1343. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1344. if e1 != 0 {
  1345. err = errnoErr(e1)
  1346. }
  1347. return
  1348. }
  1349. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1350. func Getegid() (egid int) {
  1351. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  1352. egid = int(r0)
  1353. return
  1354. }
  1355. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1356. func Geteuid() (euid int) {
  1357. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  1358. euid = int(r0)
  1359. return
  1360. }
  1361. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1362. func Getgid() (gid int) {
  1363. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  1364. gid = int(r0)
  1365. return
  1366. }
  1367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1368. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1369. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1370. if e1 != 0 {
  1371. err = errnoErr(e1)
  1372. }
  1373. return
  1374. }
  1375. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1376. func Getuid() (uid int) {
  1377. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  1378. uid = int(r0)
  1379. return
  1380. }
  1381. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1382. func Listen(s int, n int) (err error) {
  1383. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1384. if e1 != 0 {
  1385. err = errnoErr(e1)
  1386. }
  1387. return
  1388. }
  1389. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1390. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1391. var _p0 unsafe.Pointer
  1392. if len(p) > 0 {
  1393. _p0 = unsafe.Pointer(&p[0])
  1394. } else {
  1395. _p0 = unsafe.Pointer(&_zero)
  1396. }
  1397. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1398. n = int(r0)
  1399. if e1 != 0 {
  1400. err = errnoErr(e1)
  1401. }
  1402. return
  1403. }
  1404. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1405. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1406. var _p0 unsafe.Pointer
  1407. if len(p) > 0 {
  1408. _p0 = unsafe.Pointer(&p[0])
  1409. } else {
  1410. _p0 = unsafe.Pointer(&_zero)
  1411. }
  1412. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1413. n = int(r0)
  1414. if e1 != 0 {
  1415. err = errnoErr(e1)
  1416. }
  1417. return
  1418. }
  1419. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1420. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1421. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1422. off = int64(r0)
  1423. if e1 != 0 {
  1424. err = errnoErr(e1)
  1425. }
  1426. return
  1427. }
  1428. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1429. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1430. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1431. written = int(r0)
  1432. if e1 != 0 {
  1433. err = errnoErr(e1)
  1434. }
  1435. return
  1436. }
  1437. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1438. func Setfsgid(gid int) (err error) {
  1439. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1440. if e1 != 0 {
  1441. err = errnoErr(e1)
  1442. }
  1443. return
  1444. }
  1445. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1446. func Setfsuid(uid int) (err error) {
  1447. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1448. if e1 != 0 {
  1449. err = errnoErr(e1)
  1450. }
  1451. return
  1452. }
  1453. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1454. func Setregid(rgid int, egid int) (err error) {
  1455. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1456. if e1 != 0 {
  1457. err = errnoErr(e1)
  1458. }
  1459. return
  1460. }
  1461. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1462. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1463. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1464. if e1 != 0 {
  1465. err = errnoErr(e1)
  1466. }
  1467. return
  1468. }
  1469. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1470. func Setresuid(ruid int, euid int, suid int) (err error) {
  1471. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1472. if e1 != 0 {
  1473. err = errnoErr(e1)
  1474. }
  1475. return
  1476. }
  1477. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1478. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1479. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1480. if e1 != 0 {
  1481. err = errnoErr(e1)
  1482. }
  1483. return
  1484. }
  1485. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1486. func Setreuid(ruid int, euid int) (err error) {
  1487. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1488. if e1 != 0 {
  1489. err = errnoErr(e1)
  1490. }
  1491. return
  1492. }
  1493. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1494. func Shutdown(fd int, how int) (err error) {
  1495. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1496. if e1 != 0 {
  1497. err = errnoErr(e1)
  1498. }
  1499. return
  1500. }
  1501. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1502. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1503. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1504. n = int64(r0)
  1505. if e1 != 0 {
  1506. err = errnoErr(e1)
  1507. }
  1508. return
  1509. }
  1510. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1511. func Statfs(path string, buf *Statfs_t) (err error) {
  1512. var _p0 *byte
  1513. _p0, err = BytePtrFromString(path)
  1514. if err != nil {
  1515. return
  1516. }
  1517. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1518. if e1 != 0 {
  1519. err = errnoErr(e1)
  1520. }
  1521. return
  1522. }
  1523. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1524. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1525. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1526. if e1 != 0 {
  1527. err = errnoErr(e1)
  1528. }
  1529. return
  1530. }
  1531. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1532. func Truncate(path string, length int64) (err error) {
  1533. var _p0 *byte
  1534. _p0, err = BytePtrFromString(path)
  1535. if err != nil {
  1536. return
  1537. }
  1538. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1539. if e1 != 0 {
  1540. err = errnoErr(e1)
  1541. }
  1542. return
  1543. }
  1544. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1545. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1546. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1547. fd = int(r0)
  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 accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1555. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1556. fd = int(r0)
  1557. if e1 != 0 {
  1558. err = errnoErr(e1)
  1559. }
  1560. return
  1561. }
  1562. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1563. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1564. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1565. if e1 != 0 {
  1566. err = errnoErr(e1)
  1567. }
  1568. return
  1569. }
  1570. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1571. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1572. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1573. if e1 != 0 {
  1574. err = errnoErr(e1)
  1575. }
  1576. return
  1577. }
  1578. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1579. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1580. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1581. nn = int(r0)
  1582. if e1 != 0 {
  1583. err = errnoErr(e1)
  1584. }
  1585. return
  1586. }
  1587. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1588. func setgroups(n int, list *_Gid_t) (err error) {
  1589. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 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 getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1597. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1598. if e1 != 0 {
  1599. err = errnoErr(e1)
  1600. }
  1601. return
  1602. }
  1603. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1604. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1605. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1606. if e1 != 0 {
  1607. err = errnoErr(e1)
  1608. }
  1609. return
  1610. }
  1611. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1612. func socket(domain int, typ int, proto int) (fd int, err error) {
  1613. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1614. fd = int(r0)
  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 socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1622. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1623. if e1 != 0 {
  1624. err = errnoErr(e1)
  1625. }
  1626. return
  1627. }
  1628. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1629. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1630. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1631. if e1 != 0 {
  1632. err = errnoErr(e1)
  1633. }
  1634. return
  1635. }
  1636. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1637. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1638. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1639. if e1 != 0 {
  1640. err = errnoErr(e1)
  1641. }
  1642. return
  1643. }
  1644. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1645. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1646. var _p0 unsafe.Pointer
  1647. if len(p) > 0 {
  1648. _p0 = unsafe.Pointer(&p[0])
  1649. } else {
  1650. _p0 = unsafe.Pointer(&_zero)
  1651. }
  1652. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1653. n = int(r0)
  1654. if e1 != 0 {
  1655. err = errnoErr(e1)
  1656. }
  1657. return
  1658. }
  1659. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1660. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1661. var _p0 unsafe.Pointer
  1662. if len(buf) > 0 {
  1663. _p0 = unsafe.Pointer(&buf[0])
  1664. } else {
  1665. _p0 = unsafe.Pointer(&_zero)
  1666. }
  1667. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1668. if e1 != 0 {
  1669. err = errnoErr(e1)
  1670. }
  1671. return
  1672. }
  1673. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1674. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1675. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1676. n = int(r0)
  1677. if e1 != 0 {
  1678. err = errnoErr(e1)
  1679. }
  1680. return
  1681. }
  1682. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1683. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1684. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1685. n = int(r0)
  1686. if e1 != 0 {
  1687. err = errnoErr(e1)
  1688. }
  1689. return
  1690. }
  1691. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1692. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1693. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  1694. xaddr = uintptr(r0)
  1695. if e1 != 0 {
  1696. err = errnoErr(e1)
  1697. }
  1698. return
  1699. }
  1700. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1701. func Gettimeofday(tv *Timeval) (err error) {
  1702. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1703. if e1 != 0 {
  1704. err = errnoErr(e1)
  1705. }
  1706. return
  1707. }
  1708. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1709. func pipe2(p *[2]_C_int, flags int) (err error) {
  1710. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  1711. if e1 != 0 {
  1712. err = errnoErr(e1)
  1713. }
  1714. return
  1715. }