zsyscall_linux_sparc64.go 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462
  1. // go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build linux,sparc64
  4. package unix
  5. import (
  6. "syscall"
  7. "unsafe"
  8. )
  9. var _ syscall.Errno
  10. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  11. func 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 EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1507. var _p0 unsafe.Pointer
  1508. if len(events) > 0 {
  1509. _p0 = unsafe.Pointer(&events[0])
  1510. } else {
  1511. _p0 = unsafe.Pointer(&_zero)
  1512. }
  1513. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1514. n = int(r0)
  1515. if e1 != 0 {
  1516. err = errnoErr(e1)
  1517. }
  1518. return
  1519. }
  1520. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1521. func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  1522. _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
  1523. if e1 != 0 {
  1524. err = errnoErr(e1)
  1525. }
  1526. return
  1527. }
  1528. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1529. func Dup2(oldfd int, newfd int) (err error) {
  1530. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
  1531. if e1 != 0 {
  1532. err = errnoErr(e1)
  1533. }
  1534. return
  1535. }
  1536. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1537. func Fchown(fd int, uid int, gid int) (err error) {
  1538. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  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 Fstat(fd int, stat *Stat_t) (err error) {
  1546. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1547. if e1 != 0 {
  1548. err = errnoErr(e1)
  1549. }
  1550. return
  1551. }
  1552. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1553. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  1554. var _p0 *byte
  1555. _p0, err = BytePtrFromString(path)
  1556. if err != nil {
  1557. return
  1558. }
  1559. _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1560. if e1 != 0 {
  1561. err = errnoErr(e1)
  1562. }
  1563. return
  1564. }
  1565. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1566. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1567. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1568. if e1 != 0 {
  1569. err = errnoErr(e1)
  1570. }
  1571. return
  1572. }
  1573. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1574. func Ftruncate(fd int, length int64) (err error) {
  1575. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1576. if e1 != 0 {
  1577. err = errnoErr(e1)
  1578. }
  1579. return
  1580. }
  1581. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1582. func Getegid() (egid int) {
  1583. r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  1584. egid = int(r0)
  1585. return
  1586. }
  1587. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1588. func Geteuid() (euid int) {
  1589. r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  1590. euid = int(r0)
  1591. return
  1592. }
  1593. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1594. func Getgid() (gid int) {
  1595. r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
  1596. gid = int(r0)
  1597. return
  1598. }
  1599. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1600. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1601. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1602. if e1 != 0 {
  1603. err = errnoErr(e1)
  1604. }
  1605. return
  1606. }
  1607. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1608. func Getuid() (uid int) {
  1609. r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
  1610. uid = int(r0)
  1611. return
  1612. }
  1613. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1614. func InotifyInit() (fd int, err error) {
  1615. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1616. fd = int(r0)
  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 Lchown(path string, uid int, gid int) (err error) {
  1624. var _p0 *byte
  1625. _p0, err = BytePtrFromString(path)
  1626. if err != nil {
  1627. return
  1628. }
  1629. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1630. if e1 != 0 {
  1631. err = errnoErr(e1)
  1632. }
  1633. return
  1634. }
  1635. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1636. func Listen(s int, n int) (err error) {
  1637. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1638. if e1 != 0 {
  1639. err = errnoErr(e1)
  1640. }
  1641. return
  1642. }
  1643. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1644. func Lstat(path string, stat *Stat_t) (err error) {
  1645. var _p0 *byte
  1646. _p0, err = BytePtrFromString(path)
  1647. if err != nil {
  1648. return
  1649. }
  1650. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1651. if e1 != 0 {
  1652. err = errnoErr(e1)
  1653. }
  1654. return
  1655. }
  1656. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1657. func Pause() (err error) {
  1658. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1659. if e1 != 0 {
  1660. err = errnoErr(e1)
  1661. }
  1662. return
  1663. }
  1664. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1665. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1666. var _p0 unsafe.Pointer
  1667. if len(p) > 0 {
  1668. _p0 = unsafe.Pointer(&p[0])
  1669. } else {
  1670. _p0 = unsafe.Pointer(&_zero)
  1671. }
  1672. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1673. n = int(r0)
  1674. if e1 != 0 {
  1675. err = errnoErr(e1)
  1676. }
  1677. return
  1678. }
  1679. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1680. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1681. var _p0 unsafe.Pointer
  1682. if len(p) > 0 {
  1683. _p0 = unsafe.Pointer(&p[0])
  1684. } else {
  1685. _p0 = unsafe.Pointer(&_zero)
  1686. }
  1687. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1688. n = int(r0)
  1689. if e1 != 0 {
  1690. err = errnoErr(e1)
  1691. }
  1692. return
  1693. }
  1694. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1695. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1696. var _p0 *byte
  1697. _p0, err = BytePtrFromString(oldpath)
  1698. if err != nil {
  1699. return
  1700. }
  1701. var _p1 *byte
  1702. _p1, err = BytePtrFromString(newpath)
  1703. if err != nil {
  1704. return
  1705. }
  1706. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 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 Seek(fd int, offset int64, whence int) (off int64, err error) {
  1714. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1715. off = int64(r0)
  1716. if e1 != 0 {
  1717. err = errnoErr(e1)
  1718. }
  1719. return
  1720. }
  1721. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1722. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1723. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1724. n = int(r0)
  1725. if e1 != 0 {
  1726. err = errnoErr(e1)
  1727. }
  1728. return
  1729. }
  1730. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1731. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1732. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1733. written = int(r0)
  1734. if e1 != 0 {
  1735. err = errnoErr(e1)
  1736. }
  1737. return
  1738. }
  1739. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1740. func Setfsgid(gid int) (err error) {
  1741. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1742. if e1 != 0 {
  1743. err = errnoErr(e1)
  1744. }
  1745. return
  1746. }
  1747. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1748. func Setfsuid(uid int) (err error) {
  1749. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1750. if e1 != 0 {
  1751. err = errnoErr(e1)
  1752. }
  1753. return
  1754. }
  1755. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1756. func Setregid(rgid int, egid int) (err error) {
  1757. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1758. if e1 != 0 {
  1759. err = errnoErr(e1)
  1760. }
  1761. return
  1762. }
  1763. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1764. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1765. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1766. if e1 != 0 {
  1767. err = errnoErr(e1)
  1768. }
  1769. return
  1770. }
  1771. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1772. func Setresuid(ruid int, euid int, suid int) (err error) {
  1773. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1774. if e1 != 0 {
  1775. err = errnoErr(e1)
  1776. }
  1777. return
  1778. }
  1779. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1780. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1781. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1782. if e1 != 0 {
  1783. err = errnoErr(e1)
  1784. }
  1785. return
  1786. }
  1787. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1788. func Setreuid(ruid int, euid int) (err error) {
  1789. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1790. if e1 != 0 {
  1791. err = errnoErr(e1)
  1792. }
  1793. return
  1794. }
  1795. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1796. func Shutdown(fd int, how int) (err error) {
  1797. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 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 Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1805. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1806. n = int64(r0)
  1807. if e1 != 0 {
  1808. err = errnoErr(e1)
  1809. }
  1810. return
  1811. }
  1812. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1813. func Stat(path string, stat *Stat_t) (err error) {
  1814. var _p0 *byte
  1815. _p0, err = BytePtrFromString(path)
  1816. if err != nil {
  1817. return
  1818. }
  1819. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1820. if e1 != 0 {
  1821. err = errnoErr(e1)
  1822. }
  1823. return
  1824. }
  1825. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1826. func Statfs(path string, buf *Statfs_t) (err error) {
  1827. var _p0 *byte
  1828. _p0, err = BytePtrFromString(path)
  1829. if err != nil {
  1830. return
  1831. }
  1832. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1833. if e1 != 0 {
  1834. err = errnoErr(e1)
  1835. }
  1836. return
  1837. }
  1838. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1839. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1840. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1841. if e1 != 0 {
  1842. err = errnoErr(e1)
  1843. }
  1844. return
  1845. }
  1846. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1847. func Truncate(path string, length int64) (err error) {
  1848. var _p0 *byte
  1849. _p0, err = BytePtrFromString(path)
  1850. if err != nil {
  1851. return
  1852. }
  1853. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1854. if e1 != 0 {
  1855. err = errnoErr(e1)
  1856. }
  1857. return
  1858. }
  1859. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1860. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1861. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1862. fd = int(r0)
  1863. if e1 != 0 {
  1864. err = errnoErr(e1)
  1865. }
  1866. return
  1867. }
  1868. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1869. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1870. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1871. fd = int(r0)
  1872. if e1 != 0 {
  1873. err = errnoErr(e1)
  1874. }
  1875. return
  1876. }
  1877. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1878. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1879. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1880. if e1 != 0 {
  1881. err = errnoErr(e1)
  1882. }
  1883. return
  1884. }
  1885. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1886. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1887. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1888. if e1 != 0 {
  1889. err = errnoErr(e1)
  1890. }
  1891. return
  1892. }
  1893. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1894. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1895. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1896. nn = int(r0)
  1897. if e1 != 0 {
  1898. err = errnoErr(e1)
  1899. }
  1900. return
  1901. }
  1902. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1903. func setgroups(n int, list *_Gid_t) (err error) {
  1904. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1905. if e1 != 0 {
  1906. err = errnoErr(e1)
  1907. }
  1908. return
  1909. }
  1910. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1911. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1912. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1913. if e1 != 0 {
  1914. err = errnoErr(e1)
  1915. }
  1916. return
  1917. }
  1918. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1919. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1920. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  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 socket(domain int, typ int, proto int) (fd int, err error) {
  1928. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1929. fd = int(r0)
  1930. if e1 != 0 {
  1931. err = errnoErr(e1)
  1932. }
  1933. return
  1934. }
  1935. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1936. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1937. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1938. if e1 != 0 {
  1939. err = errnoErr(e1)
  1940. }
  1941. return
  1942. }
  1943. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1944. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1945. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1946. if e1 != 0 {
  1947. err = errnoErr(e1)
  1948. }
  1949. return
  1950. }
  1951. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1952. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1953. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1954. if e1 != 0 {
  1955. err = errnoErr(e1)
  1956. }
  1957. return
  1958. }
  1959. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1960. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1961. var _p0 unsafe.Pointer
  1962. if len(p) > 0 {
  1963. _p0 = unsafe.Pointer(&p[0])
  1964. } else {
  1965. _p0 = unsafe.Pointer(&_zero)
  1966. }
  1967. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1968. n = int(r0)
  1969. if e1 != 0 {
  1970. err = errnoErr(e1)
  1971. }
  1972. return
  1973. }
  1974. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1975. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1976. var _p0 unsafe.Pointer
  1977. if len(buf) > 0 {
  1978. _p0 = unsafe.Pointer(&buf[0])
  1979. } else {
  1980. _p0 = unsafe.Pointer(&_zero)
  1981. }
  1982. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  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 recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1990. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1991. n = int(r0)
  1992. if e1 != 0 {
  1993. err = errnoErr(e1)
  1994. }
  1995. return
  1996. }
  1997. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1998. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1999. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  2000. n = int(r0)
  2001. if e1 != 0 {
  2002. err = errnoErr(e1)
  2003. }
  2004. return
  2005. }
  2006. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2007. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  2008. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  2009. xaddr = uintptr(r0)
  2010. if e1 != 0 {
  2011. err = errnoErr(e1)
  2012. }
  2013. return
  2014. }
  2015. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2016. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  2017. var _p0 *byte
  2018. _p0, err = BytePtrFromString(path)
  2019. if err != nil {
  2020. return
  2021. }
  2022. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  2023. if e1 != 0 {
  2024. err = errnoErr(e1)
  2025. }
  2026. return
  2027. }
  2028. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2029. func Gettimeofday(tv *Timeval) (err error) {
  2030. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  2031. if e1 != 0 {
  2032. err = errnoErr(e1)
  2033. }
  2034. return
  2035. }
  2036. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2037. func Utime(path string, buf *Utimbuf) (err error) {
  2038. var _p0 *byte
  2039. _p0, err = BytePtrFromString(path)
  2040. if err != nil {
  2041. return
  2042. }
  2043. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  2044. if e1 != 0 {
  2045. err = errnoErr(e1)
  2046. }
  2047. return
  2048. }
  2049. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2050. func utimes(path string, times *[2]Timeval) (err error) {
  2051. var _p0 *byte
  2052. _p0, err = BytePtrFromString(path)
  2053. if err != nil {
  2054. return
  2055. }
  2056. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  2057. if e1 != 0 {
  2058. err = errnoErr(e1)
  2059. }
  2060. return
  2061. }
  2062. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2063. func pipe(p *[2]_C_int) (err error) {
  2064. _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  2065. if e1 != 0 {
  2066. err = errnoErr(e1)
  2067. }
  2068. return
  2069. }
  2070. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2071. func pipe2(p *[2]_C_int, flags int) (err error) {
  2072. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  2073. if e1 != 0 {
  2074. err = errnoErr(e1)
  2075. }
  2076. return
  2077. }
  2078. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2079. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  2080. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  2081. n = int(r0)
  2082. if e1 != 0 {
  2083. err = errnoErr(e1)
  2084. }
  2085. return
  2086. }