zsyscall_linux_mips64le.go 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814
  1. // mksyscall.pl syscall_linux.go syscall_linux_mips64x.go
  2. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  3. // +build mips64le,linux
  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 Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
  12. var _p0 *byte
  13. _p0, err = BytePtrFromString(oldpath)
  14. if err != nil {
  15. return
  16. }
  17. var _p1 *byte
  18. _p1, err = BytePtrFromString(newpath)
  19. if err != nil {
  20. return
  21. }
  22. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  23. use(unsafe.Pointer(_p0))
  24. use(unsafe.Pointer(_p1))
  25. if e1 != 0 {
  26. err = errnoErr(e1)
  27. }
  28. return
  29. }
  30. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  31. func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  32. var _p0 *byte
  33. _p0, err = BytePtrFromString(path)
  34. if err != nil {
  35. return
  36. }
  37. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  38. use(unsafe.Pointer(_p0))
  39. fd = int(r0)
  40. if e1 != 0 {
  41. err = errnoErr(e1)
  42. }
  43. return
  44. }
  45. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  46. func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  47. r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
  48. n = int(r0)
  49. if e1 != 0 {
  50. err = errnoErr(e1)
  51. }
  52. return
  53. }
  54. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  55. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  56. var _p0 *byte
  57. _p0, err = BytePtrFromString(path)
  58. if err != nil {
  59. return
  60. }
  61. var _p1 unsafe.Pointer
  62. if len(buf) > 0 {
  63. _p1 = unsafe.Pointer(&buf[0])
  64. } else {
  65. _p1 = unsafe.Pointer(&_zero)
  66. }
  67. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  68. use(unsafe.Pointer(_p0))
  69. n = int(r0)
  70. if e1 != 0 {
  71. err = errnoErr(e1)
  72. }
  73. return
  74. }
  75. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  76. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  77. var _p0 *byte
  78. _p0, err = BytePtrFromString(oldpath)
  79. if err != nil {
  80. return
  81. }
  82. var _p1 *byte
  83. _p1, err = BytePtrFromString(newpath)
  84. if err != nil {
  85. return
  86. }
  87. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  88. use(unsafe.Pointer(_p0))
  89. use(unsafe.Pointer(_p1))
  90. if e1 != 0 {
  91. err = errnoErr(e1)
  92. }
  93. return
  94. }
  95. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  96. func Unlinkat(dirfd int, path string, flags int) (err error) {
  97. var _p0 *byte
  98. _p0, err = BytePtrFromString(path)
  99. if err != nil {
  100. return
  101. }
  102. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  103. use(unsafe.Pointer(_p0))
  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 utimes(path string, times *[2]Timeval) (err error) {
  111. var _p0 *byte
  112. _p0, err = BytePtrFromString(path)
  113. if err != nil {
  114. return
  115. }
  116. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  117. use(unsafe.Pointer(_p0))
  118. if e1 != 0 {
  119. err = errnoErr(e1)
  120. }
  121. return
  122. }
  123. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  124. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  125. var _p0 *byte
  126. _p0, err = BytePtrFromString(path)
  127. if err != nil {
  128. return
  129. }
  130. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  131. use(unsafe.Pointer(_p0))
  132. if e1 != 0 {
  133. err = errnoErr(e1)
  134. }
  135. return
  136. }
  137. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  138. func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
  139. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
  140. if e1 != 0 {
  141. err = errnoErr(e1)
  142. }
  143. return
  144. }
  145. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  146. func Getcwd(buf []byte) (n int, err error) {
  147. var _p0 unsafe.Pointer
  148. if len(buf) > 0 {
  149. _p0 = unsafe.Pointer(&buf[0])
  150. } else {
  151. _p0 = unsafe.Pointer(&_zero)
  152. }
  153. r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  154. n = int(r0)
  155. if e1 != 0 {
  156. err = errnoErr(e1)
  157. }
  158. return
  159. }
  160. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  161. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  162. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  163. wpid = int(r0)
  164. if e1 != 0 {
  165. err = errnoErr(e1)
  166. }
  167. return
  168. }
  169. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  170. func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  171. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  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 reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
  179. var _p0 *byte
  180. _p0, err = BytePtrFromString(arg)
  181. if err != nil {
  182. return
  183. }
  184. _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
  185. use(unsafe.Pointer(_p0))
  186. if e1 != 0 {
  187. err = errnoErr(e1)
  188. }
  189. return
  190. }
  191. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  192. func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
  193. var _p0 *byte
  194. _p0, err = BytePtrFromString(source)
  195. if err != nil {
  196. return
  197. }
  198. var _p1 *byte
  199. _p1, err = BytePtrFromString(target)
  200. if err != nil {
  201. return
  202. }
  203. var _p2 *byte
  204. _p2, err = BytePtrFromString(fstype)
  205. if err != nil {
  206. return
  207. }
  208. _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
  209. use(unsafe.Pointer(_p0))
  210. use(unsafe.Pointer(_p1))
  211. use(unsafe.Pointer(_p2))
  212. if e1 != 0 {
  213. err = errnoErr(e1)
  214. }
  215. return
  216. }
  217. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  218. func Acct(path string) (err error) {
  219. var _p0 *byte
  220. _p0, err = BytePtrFromString(path)
  221. if err != nil {
  222. return
  223. }
  224. _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  225. use(unsafe.Pointer(_p0))
  226. if e1 != 0 {
  227. err = errnoErr(e1)
  228. }
  229. return
  230. }
  231. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  232. func Adjtimex(buf *Timex) (state int, err error) {
  233. r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
  234. state = int(r0)
  235. if e1 != 0 {
  236. err = errnoErr(e1)
  237. }
  238. return
  239. }
  240. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  241. func Chdir(path string) (err error) {
  242. var _p0 *byte
  243. _p0, err = BytePtrFromString(path)
  244. if err != nil {
  245. return
  246. }
  247. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  248. use(unsafe.Pointer(_p0))
  249. if e1 != 0 {
  250. err = errnoErr(e1)
  251. }
  252. return
  253. }
  254. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  255. func Chroot(path string) (err error) {
  256. var _p0 *byte
  257. _p0, err = BytePtrFromString(path)
  258. if err != nil {
  259. return
  260. }
  261. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  262. use(unsafe.Pointer(_p0))
  263. if e1 != 0 {
  264. err = errnoErr(e1)
  265. }
  266. return
  267. }
  268. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  269. func ClockGettime(clockid int32, time *Timespec) (err error) {
  270. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
  271. if e1 != 0 {
  272. err = errnoErr(e1)
  273. }
  274. return
  275. }
  276. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  277. func Close(fd int) (err error) {
  278. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  279. if e1 != 0 {
  280. err = errnoErr(e1)
  281. }
  282. return
  283. }
  284. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  285. func Dup(oldfd int) (fd int, err error) {
  286. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  287. fd = int(r0)
  288. if e1 != 0 {
  289. err = errnoErr(e1)
  290. }
  291. return
  292. }
  293. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  294. func Dup3(oldfd int, newfd int, flags int) (err error) {
  295. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  296. if e1 != 0 {
  297. err = errnoErr(e1)
  298. }
  299. return
  300. }
  301. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  302. func EpollCreate(size int) (fd int, err error) {
  303. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
  304. fd = int(r0)
  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 EpollCreate1(flag int) (fd int, err error) {
  312. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  313. fd = int(r0)
  314. if e1 != 0 {
  315. err = errnoErr(e1)
  316. }
  317. return
  318. }
  319. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  320. func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  321. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
  322. if e1 != 0 {
  323. err = errnoErr(e1)
  324. }
  325. return
  326. }
  327. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  328. func Exit(code int) {
  329. Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  330. return
  331. }
  332. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  333. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  334. var _p0 *byte
  335. _p0, err = BytePtrFromString(path)
  336. if err != nil {
  337. return
  338. }
  339. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  340. use(unsafe.Pointer(_p0))
  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 Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  348. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
  349. if e1 != 0 {
  350. err = errnoErr(e1)
  351. }
  352. return
  353. }
  354. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  355. func Fchdir(fd int) (err error) {
  356. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  357. if e1 != 0 {
  358. err = errnoErr(e1)
  359. }
  360. return
  361. }
  362. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  363. func Fchmod(fd int, mode uint32) (err error) {
  364. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  365. if e1 != 0 {
  366. err = errnoErr(e1)
  367. }
  368. return
  369. }
  370. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  371. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  372. var _p0 *byte
  373. _p0, err = BytePtrFromString(path)
  374. if err != nil {
  375. return
  376. }
  377. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  378. use(unsafe.Pointer(_p0))
  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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  386. var _p0 *byte
  387. _p0, err = BytePtrFromString(path)
  388. if err != nil {
  389. return
  390. }
  391. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  392. use(unsafe.Pointer(_p0))
  393. if e1 != 0 {
  394. err = errnoErr(e1)
  395. }
  396. return
  397. }
  398. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  399. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  400. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  401. val = int(r0)
  402. if e1 != 0 {
  403. err = errnoErr(e1)
  404. }
  405. return
  406. }
  407. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  408. func Fdatasync(fd int) (err error) {
  409. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  410. if e1 != 0 {
  411. err = errnoErr(e1)
  412. }
  413. return
  414. }
  415. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  416. func Flock(fd int, how int) (err error) {
  417. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  418. if e1 != 0 {
  419. err = errnoErr(e1)
  420. }
  421. return
  422. }
  423. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  424. func Fsync(fd int) (err error) {
  425. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  426. if e1 != 0 {
  427. err = errnoErr(e1)
  428. }
  429. return
  430. }
  431. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  432. func Getdents(fd int, buf []byte) (n int, err error) {
  433. var _p0 unsafe.Pointer
  434. if len(buf) > 0 {
  435. _p0 = unsafe.Pointer(&buf[0])
  436. } else {
  437. _p0 = unsafe.Pointer(&_zero)
  438. }
  439. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  440. n = int(r0)
  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 Getpgid(pid int) (pgid int, err error) {
  448. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  449. pgid = int(r0)
  450. if e1 != 0 {
  451. err = errnoErr(e1)
  452. }
  453. return
  454. }
  455. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  456. func Getpid() (pid int) {
  457. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  458. pid = int(r0)
  459. return
  460. }
  461. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  462. func Getppid() (ppid int) {
  463. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  464. ppid = int(r0)
  465. return
  466. }
  467. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  468. func Getpriority(which int, who int) (prio int, err error) {
  469. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  470. prio = int(r0)
  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 Getrusage(who int, rusage *Rusage) (err error) {
  478. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  479. if e1 != 0 {
  480. err = errnoErr(e1)
  481. }
  482. return
  483. }
  484. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  485. func Getsid(pid int) (sid int, err error) {
  486. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  487. sid = int(r0)
  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 Gettid() (tid int) {
  495. r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
  496. tid = int(r0)
  497. return
  498. }
  499. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  500. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  501. var _p0 *byte
  502. _p0, err = BytePtrFromString(path)
  503. if err != nil {
  504. return
  505. }
  506. var _p1 *byte
  507. _p1, err = BytePtrFromString(attr)
  508. if err != nil {
  509. return
  510. }
  511. var _p2 unsafe.Pointer
  512. if len(dest) > 0 {
  513. _p2 = unsafe.Pointer(&dest[0])
  514. } else {
  515. _p2 = unsafe.Pointer(&_zero)
  516. }
  517. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  518. use(unsafe.Pointer(_p0))
  519. use(unsafe.Pointer(_p1))
  520. sz = int(r0)
  521. if e1 != 0 {
  522. err = errnoErr(e1)
  523. }
  524. return
  525. }
  526. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  527. func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  528. var _p0 *byte
  529. _p0, err = BytePtrFromString(pathname)
  530. if err != nil {
  531. return
  532. }
  533. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  534. use(unsafe.Pointer(_p0))
  535. watchdesc = int(r0)
  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 InotifyInit1(flags int) (fd int, err error) {
  543. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  544. fd = int(r0)
  545. if e1 != 0 {
  546. err = errnoErr(e1)
  547. }
  548. return
  549. }
  550. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  551. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  552. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  553. success = int(r0)
  554. if e1 != 0 {
  555. err = errnoErr(e1)
  556. }
  557. return
  558. }
  559. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  560. func Kill(pid int, sig syscall.Signal) (err error) {
  561. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  562. if e1 != 0 {
  563. err = errnoErr(e1)
  564. }
  565. return
  566. }
  567. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  568. func Klogctl(typ int, buf []byte) (n int, err error) {
  569. var _p0 unsafe.Pointer
  570. if len(buf) > 0 {
  571. _p0 = unsafe.Pointer(&buf[0])
  572. } else {
  573. _p0 = unsafe.Pointer(&_zero)
  574. }
  575. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  576. n = int(r0)
  577. if e1 != 0 {
  578. err = errnoErr(e1)
  579. }
  580. return
  581. }
  582. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  583. func Listxattr(path string, dest []byte) (sz int, err error) {
  584. var _p0 *byte
  585. _p0, err = BytePtrFromString(path)
  586. if err != nil {
  587. return
  588. }
  589. var _p1 unsafe.Pointer
  590. if len(dest) > 0 {
  591. _p1 = unsafe.Pointer(&dest[0])
  592. } else {
  593. _p1 = unsafe.Pointer(&_zero)
  594. }
  595. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  596. use(unsafe.Pointer(_p0))
  597. sz = int(r0)
  598. if e1 != 0 {
  599. err = errnoErr(e1)
  600. }
  601. return
  602. }
  603. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  604. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  605. var _p0 *byte
  606. _p0, err = BytePtrFromString(path)
  607. if err != nil {
  608. return
  609. }
  610. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  611. use(unsafe.Pointer(_p0))
  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 Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  619. var _p0 *byte
  620. _p0, err = BytePtrFromString(path)
  621. if err != nil {
  622. return
  623. }
  624. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  625. use(unsafe.Pointer(_p0))
  626. if e1 != 0 {
  627. err = errnoErr(e1)
  628. }
  629. return
  630. }
  631. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  632. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  633. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  634. if e1 != 0 {
  635. err = errnoErr(e1)
  636. }
  637. return
  638. }
  639. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  640. func PivotRoot(newroot string, putold string) (err error) {
  641. var _p0 *byte
  642. _p0, err = BytePtrFromString(newroot)
  643. if err != nil {
  644. return
  645. }
  646. var _p1 *byte
  647. _p1, err = BytePtrFromString(putold)
  648. if err != nil {
  649. return
  650. }
  651. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  652. use(unsafe.Pointer(_p0))
  653. use(unsafe.Pointer(_p1))
  654. if e1 != 0 {
  655. err = errnoErr(e1)
  656. }
  657. return
  658. }
  659. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  660. func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  661. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  662. if e1 != 0 {
  663. err = errnoErr(e1)
  664. }
  665. return
  666. }
  667. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  668. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  669. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  670. if e1 != 0 {
  671. err = errnoErr(e1)
  672. }
  673. return
  674. }
  675. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  676. func read(fd int, p []byte) (n int, err error) {
  677. var _p0 unsafe.Pointer
  678. if len(p) > 0 {
  679. _p0 = unsafe.Pointer(&p[0])
  680. } else {
  681. _p0 = unsafe.Pointer(&_zero)
  682. }
  683. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  684. n = int(r0)
  685. if e1 != 0 {
  686. err = errnoErr(e1)
  687. }
  688. return
  689. }
  690. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  691. func Removexattr(path string, attr string) (err error) {
  692. var _p0 *byte
  693. _p0, err = BytePtrFromString(path)
  694. if err != nil {
  695. return
  696. }
  697. var _p1 *byte
  698. _p1, err = BytePtrFromString(attr)
  699. if err != nil {
  700. return
  701. }
  702. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  703. use(unsafe.Pointer(_p0))
  704. use(unsafe.Pointer(_p1))
  705. if e1 != 0 {
  706. err = errnoErr(e1)
  707. }
  708. return
  709. }
  710. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  711. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  712. var _p0 *byte
  713. _p0, err = BytePtrFromString(oldpath)
  714. if err != nil {
  715. return
  716. }
  717. var _p1 *byte
  718. _p1, err = BytePtrFromString(newpath)
  719. if err != nil {
  720. return
  721. }
  722. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  723. use(unsafe.Pointer(_p0))
  724. use(unsafe.Pointer(_p1))
  725. if e1 != 0 {
  726. err = errnoErr(e1)
  727. }
  728. return
  729. }
  730. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  731. func Setdomainname(p []byte) (err error) {
  732. var _p0 unsafe.Pointer
  733. if len(p) > 0 {
  734. _p0 = unsafe.Pointer(&p[0])
  735. } else {
  736. _p0 = unsafe.Pointer(&_zero)
  737. }
  738. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  739. if e1 != 0 {
  740. err = errnoErr(e1)
  741. }
  742. return
  743. }
  744. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  745. func Sethostname(p []byte) (err error) {
  746. var _p0 unsafe.Pointer
  747. if len(p) > 0 {
  748. _p0 = unsafe.Pointer(&p[0])
  749. } else {
  750. _p0 = unsafe.Pointer(&_zero)
  751. }
  752. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  753. if e1 != 0 {
  754. err = errnoErr(e1)
  755. }
  756. return
  757. }
  758. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  759. func Setpgid(pid int, pgid int) (err error) {
  760. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  761. if e1 != 0 {
  762. err = errnoErr(e1)
  763. }
  764. return
  765. }
  766. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  767. func Setsid() (pid int, err error) {
  768. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  769. pid = int(r0)
  770. if e1 != 0 {
  771. err = errnoErr(e1)
  772. }
  773. return
  774. }
  775. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  776. func Settimeofday(tv *Timeval) (err error) {
  777. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  778. if e1 != 0 {
  779. err = errnoErr(e1)
  780. }
  781. return
  782. }
  783. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  784. func Setns(fd int, nstype int) (err error) {
  785. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  786. if e1 != 0 {
  787. err = errnoErr(e1)
  788. }
  789. return
  790. }
  791. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  792. func Setpriority(which int, who int, prio int) (err error) {
  793. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  794. if e1 != 0 {
  795. err = errnoErr(e1)
  796. }
  797. return
  798. }
  799. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  800. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  801. var _p0 *byte
  802. _p0, err = BytePtrFromString(path)
  803. if err != nil {
  804. return
  805. }
  806. var _p1 *byte
  807. _p1, err = BytePtrFromString(attr)
  808. if err != nil {
  809. return
  810. }
  811. var _p2 unsafe.Pointer
  812. if len(data) > 0 {
  813. _p2 = unsafe.Pointer(&data[0])
  814. } else {
  815. _p2 = unsafe.Pointer(&_zero)
  816. }
  817. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  818. use(unsafe.Pointer(_p0))
  819. use(unsafe.Pointer(_p1))
  820. if e1 != 0 {
  821. err = errnoErr(e1)
  822. }
  823. return
  824. }
  825. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  826. func Sync() {
  827. Syscall(SYS_SYNC, 0, 0, 0)
  828. return
  829. }
  830. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  831. func Sysinfo(info *Sysinfo_t) (err error) {
  832. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  833. if e1 != 0 {
  834. err = errnoErr(e1)
  835. }
  836. return
  837. }
  838. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  839. func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  840. r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  841. n = int64(r0)
  842. if e1 != 0 {
  843. err = errnoErr(e1)
  844. }
  845. return
  846. }
  847. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  848. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  849. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  850. if e1 != 0 {
  851. err = errnoErr(e1)
  852. }
  853. return
  854. }
  855. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  856. func Times(tms *Tms) (ticks uintptr, err error) {
  857. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  858. ticks = uintptr(r0)
  859. if e1 != 0 {
  860. err = errnoErr(e1)
  861. }
  862. return
  863. }
  864. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  865. func Umask(mask int) (oldmask int) {
  866. r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
  867. oldmask = int(r0)
  868. return
  869. }
  870. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  871. func Uname(buf *Utsname) (err error) {
  872. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  873. if e1 != 0 {
  874. err = errnoErr(e1)
  875. }
  876. return
  877. }
  878. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  879. func Unmount(target string, flags int) (err error) {
  880. var _p0 *byte
  881. _p0, err = BytePtrFromString(target)
  882. if err != nil {
  883. return
  884. }
  885. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  886. use(unsafe.Pointer(_p0))
  887. if e1 != 0 {
  888. err = errnoErr(e1)
  889. }
  890. return
  891. }
  892. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  893. func Unshare(flags int) (err error) {
  894. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  895. if e1 != 0 {
  896. err = errnoErr(e1)
  897. }
  898. return
  899. }
  900. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  901. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  902. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  903. if e1 != 0 {
  904. err = errnoErr(e1)
  905. }
  906. return
  907. }
  908. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  909. func write(fd int, p []byte) (n int, err error) {
  910. var _p0 unsafe.Pointer
  911. if len(p) > 0 {
  912. _p0 = unsafe.Pointer(&p[0])
  913. } else {
  914. _p0 = unsafe.Pointer(&_zero)
  915. }
  916. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  917. n = int(r0)
  918. if e1 != 0 {
  919. err = errnoErr(e1)
  920. }
  921. return
  922. }
  923. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  924. func exitThread(code int) (err error) {
  925. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  926. if e1 != 0 {
  927. err = errnoErr(e1)
  928. }
  929. return
  930. }
  931. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  932. func readlen(fd int, p *byte, np int) (n int, err error) {
  933. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  934. n = int(r0)
  935. if e1 != 0 {
  936. err = errnoErr(e1)
  937. }
  938. return
  939. }
  940. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  941. func writelen(fd int, p *byte, np int) (n int, err error) {
  942. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  943. n = int(r0)
  944. if e1 != 0 {
  945. err = errnoErr(e1)
  946. }
  947. return
  948. }
  949. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  950. func munmap(addr uintptr, length uintptr) (err error) {
  951. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  952. if e1 != 0 {
  953. err = errnoErr(e1)
  954. }
  955. return
  956. }
  957. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  958. func Madvise(b []byte, advice int) (err error) {
  959. var _p0 unsafe.Pointer
  960. if len(b) > 0 {
  961. _p0 = unsafe.Pointer(&b[0])
  962. } else {
  963. _p0 = unsafe.Pointer(&_zero)
  964. }
  965. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  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 Mprotect(b []byte, prot int) (err error) {
  973. var _p0 unsafe.Pointer
  974. if len(b) > 0 {
  975. _p0 = unsafe.Pointer(&b[0])
  976. } else {
  977. _p0 = unsafe.Pointer(&_zero)
  978. }
  979. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  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 Mlock(b []byte) (err error) {
  987. var _p0 unsafe.Pointer
  988. if len(b) > 0 {
  989. _p0 = unsafe.Pointer(&b[0])
  990. } else {
  991. _p0 = unsafe.Pointer(&_zero)
  992. }
  993. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 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 Munlock(b []byte) (err error) {
  1001. var _p0 unsafe.Pointer
  1002. if len(b) > 0 {
  1003. _p0 = unsafe.Pointer(&b[0])
  1004. } else {
  1005. _p0 = unsafe.Pointer(&_zero)
  1006. }
  1007. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1008. if e1 != 0 {
  1009. err = errnoErr(e1)
  1010. }
  1011. return
  1012. }
  1013. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1014. func Mlockall(flags int) (err error) {
  1015. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  1016. if e1 != 0 {
  1017. err = errnoErr(e1)
  1018. }
  1019. return
  1020. }
  1021. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1022. func Munlockall() (err error) {
  1023. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1024. if e1 != 0 {
  1025. err = errnoErr(e1)
  1026. }
  1027. return
  1028. }
  1029. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1030. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1031. var _p0 unsafe.Pointer
  1032. if len(events) > 0 {
  1033. _p0 = unsafe.Pointer(&events[0])
  1034. } else {
  1035. _p0 = unsafe.Pointer(&_zero)
  1036. }
  1037. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1038. n = int(r0)
  1039. if e1 != 0 {
  1040. err = errnoErr(e1)
  1041. }
  1042. return
  1043. }
  1044. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1045. func Fchown(fd int, uid int, gid int) (err error) {
  1046. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  1047. if e1 != 0 {
  1048. err = errnoErr(e1)
  1049. }
  1050. return
  1051. }
  1052. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1053. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1054. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1055. if e1 != 0 {
  1056. err = errnoErr(e1)
  1057. }
  1058. return
  1059. }
  1060. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1061. func Ftruncate(fd int, length int64) (err error) {
  1062. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1063. if e1 != 0 {
  1064. err = errnoErr(e1)
  1065. }
  1066. return
  1067. }
  1068. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1069. func Getegid() (egid int) {
  1070. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  1071. egid = int(r0)
  1072. return
  1073. }
  1074. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1075. func Geteuid() (euid int) {
  1076. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  1077. euid = int(r0)
  1078. return
  1079. }
  1080. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1081. func Getgid() (gid int) {
  1082. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  1083. gid = int(r0)
  1084. return
  1085. }
  1086. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1087. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1088. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  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 Getuid() (uid int) {
  1096. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  1097. uid = int(r0)
  1098. return
  1099. }
  1100. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1101. func Lchown(path string, uid int, gid int) (err error) {
  1102. var _p0 *byte
  1103. _p0, err = BytePtrFromString(path)
  1104. if err != nil {
  1105. return
  1106. }
  1107. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1108. use(unsafe.Pointer(_p0))
  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 Listen(s int, n int) (err error) {
  1116. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1117. if e1 != 0 {
  1118. err = errnoErr(e1)
  1119. }
  1120. return
  1121. }
  1122. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1123. func Pause() (err error) {
  1124. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1125. if e1 != 0 {
  1126. err = errnoErr(e1)
  1127. }
  1128. return
  1129. }
  1130. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1131. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1132. var _p0 unsafe.Pointer
  1133. if len(p) > 0 {
  1134. _p0 = unsafe.Pointer(&p[0])
  1135. } else {
  1136. _p0 = unsafe.Pointer(&_zero)
  1137. }
  1138. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1139. n = int(r0)
  1140. if e1 != 0 {
  1141. err = errnoErr(e1)
  1142. }
  1143. return
  1144. }
  1145. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1146. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1147. var _p0 unsafe.Pointer
  1148. if len(p) > 0 {
  1149. _p0 = unsafe.Pointer(&p[0])
  1150. } else {
  1151. _p0 = unsafe.Pointer(&_zero)
  1152. }
  1153. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1154. n = int(r0)
  1155. if e1 != 0 {
  1156. err = errnoErr(e1)
  1157. }
  1158. return
  1159. }
  1160. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1161. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1162. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1163. off = int64(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 Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1171. r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1172. n = int(r0)
  1173. if e1 != 0 {
  1174. err = errnoErr(e1)
  1175. }
  1176. return
  1177. }
  1178. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1179. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1180. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1181. written = int(r0)
  1182. if e1 != 0 {
  1183. err = errnoErr(e1)
  1184. }
  1185. return
  1186. }
  1187. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1188. func Setfsgid(gid int) (err error) {
  1189. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  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 Setfsuid(uid int) (err error) {
  1197. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 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 Setregid(rgid int, egid int) (err error) {
  1205. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1206. if e1 != 0 {
  1207. err = errnoErr(e1)
  1208. }
  1209. return
  1210. }
  1211. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1212. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1213. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1214. if e1 != 0 {
  1215. err = errnoErr(e1)
  1216. }
  1217. return
  1218. }
  1219. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1220. func Setresuid(ruid int, euid int, suid int) (err error) {
  1221. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1222. if e1 != 0 {
  1223. err = errnoErr(e1)
  1224. }
  1225. return
  1226. }
  1227. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1228. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1229. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1230. if e1 != 0 {
  1231. err = errnoErr(e1)
  1232. }
  1233. return
  1234. }
  1235. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1236. func Setreuid(ruid int, euid int) (err error) {
  1237. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1238. if e1 != 0 {
  1239. err = errnoErr(e1)
  1240. }
  1241. return
  1242. }
  1243. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1244. func Shutdown(fd int, how int) (err error) {
  1245. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1246. if e1 != 0 {
  1247. err = errnoErr(e1)
  1248. }
  1249. return
  1250. }
  1251. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1252. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1253. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1254. n = int64(r0)
  1255. if e1 != 0 {
  1256. err = errnoErr(e1)
  1257. }
  1258. return
  1259. }
  1260. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1261. func Statfs(path string, buf *Statfs_t) (err error) {
  1262. var _p0 *byte
  1263. _p0, err = BytePtrFromString(path)
  1264. if err != nil {
  1265. return
  1266. }
  1267. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1268. use(unsafe.Pointer(_p0))
  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 SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1276. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1277. if e1 != 0 {
  1278. err = errnoErr(e1)
  1279. }
  1280. return
  1281. }
  1282. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1283. func Truncate(path string, length int64) (err error) {
  1284. var _p0 *byte
  1285. _p0, err = BytePtrFromString(path)
  1286. if err != nil {
  1287. return
  1288. }
  1289. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1290. use(unsafe.Pointer(_p0))
  1291. if e1 != 0 {
  1292. err = errnoErr(e1)
  1293. }
  1294. return
  1295. }
  1296. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1297. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1298. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1299. fd = int(r0)
  1300. if e1 != 0 {
  1301. err = errnoErr(e1)
  1302. }
  1303. return
  1304. }
  1305. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1306. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1307. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1308. fd = int(r0)
  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 bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1316. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1317. if e1 != 0 {
  1318. err = errnoErr(e1)
  1319. }
  1320. return
  1321. }
  1322. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1323. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1324. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1325. if e1 != 0 {
  1326. err = errnoErr(e1)
  1327. }
  1328. return
  1329. }
  1330. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1331. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1332. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1333. nn = int(r0)
  1334. if e1 != 0 {
  1335. err = errnoErr(e1)
  1336. }
  1337. return
  1338. }
  1339. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1340. func setgroups(n int, list *_Gid_t) (err error) {
  1341. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1342. if e1 != 0 {
  1343. err = errnoErr(e1)
  1344. }
  1345. return
  1346. }
  1347. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1348. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1349. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1350. if e1 != 0 {
  1351. err = errnoErr(e1)
  1352. }
  1353. return
  1354. }
  1355. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1356. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1357. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1358. if e1 != 0 {
  1359. err = errnoErr(e1)
  1360. }
  1361. return
  1362. }
  1363. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1364. func socket(domain int, typ int, proto int) (fd int, err error) {
  1365. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1366. fd = int(r0)
  1367. if e1 != 0 {
  1368. err = errnoErr(e1)
  1369. }
  1370. return
  1371. }
  1372. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1373. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1374. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1375. if e1 != 0 {
  1376. err = errnoErr(e1)
  1377. }
  1378. return
  1379. }
  1380. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1381. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1382. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1383. if e1 != 0 {
  1384. err = errnoErr(e1)
  1385. }
  1386. return
  1387. }
  1388. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1389. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1390. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1391. if e1 != 0 {
  1392. err = errnoErr(e1)
  1393. }
  1394. return
  1395. }
  1396. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1397. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1398. var _p0 unsafe.Pointer
  1399. if len(p) > 0 {
  1400. _p0 = unsafe.Pointer(&p[0])
  1401. } else {
  1402. _p0 = unsafe.Pointer(&_zero)
  1403. }
  1404. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1405. n = int(r0)
  1406. if e1 != 0 {
  1407. err = errnoErr(e1)
  1408. }
  1409. return
  1410. }
  1411. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1412. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1413. var _p0 unsafe.Pointer
  1414. if len(buf) > 0 {
  1415. _p0 = unsafe.Pointer(&buf[0])
  1416. } else {
  1417. _p0 = unsafe.Pointer(&_zero)
  1418. }
  1419. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1420. if e1 != 0 {
  1421. err = errnoErr(e1)
  1422. }
  1423. return
  1424. }
  1425. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1426. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1427. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1428. n = int(r0)
  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 sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1436. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1437. n = int(r0)
  1438. if e1 != 0 {
  1439. err = errnoErr(e1)
  1440. }
  1441. return
  1442. }
  1443. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1444. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1445. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  1446. xaddr = uintptr(r0)
  1447. if e1 != 0 {
  1448. err = errnoErr(e1)
  1449. }
  1450. return
  1451. }
  1452. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1453. func Gettimeofday(tv *Timeval) (err error) {
  1454. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1455. if e1 != 0 {
  1456. err = errnoErr(e1)
  1457. }
  1458. return
  1459. }
  1460. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1461. func Utime(path string, buf *Utimbuf) (err error) {
  1462. var _p0 *byte
  1463. _p0, err = BytePtrFromString(path)
  1464. if err != nil {
  1465. return
  1466. }
  1467. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1468. use(unsafe.Pointer(_p0))
  1469. if e1 != 0 {
  1470. err = errnoErr(e1)
  1471. }
  1472. return
  1473. }
  1474. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1475. func pipe2(p *[2]_C_int, flags int) (err error) {
  1476. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  1477. if e1 != 0 {
  1478. err = errnoErr(e1)
  1479. }
  1480. return
  1481. }
  1482. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1483. func fstat(fd int, st *stat_t) (err error) {
  1484. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
  1485. if e1 != 0 {
  1486. err = errnoErr(e1)
  1487. }
  1488. return
  1489. }
  1490. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1491. func lstat(path string, st *stat_t) (err error) {
  1492. var _p0 *byte
  1493. _p0, err = BytePtrFromString(path)
  1494. if err != nil {
  1495. return
  1496. }
  1497. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
  1498. use(unsafe.Pointer(_p0))
  1499. if e1 != 0 {
  1500. err = errnoErr(e1)
  1501. }
  1502. return
  1503. }
  1504. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1505. func stat(path string, st *stat_t) (err error) {
  1506. var _p0 *byte
  1507. _p0, err = BytePtrFromString(path)
  1508. if err != nil {
  1509. return
  1510. }
  1511. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
  1512. use(unsafe.Pointer(_p0))
  1513. if e1 != 0 {
  1514. err = errnoErr(e1)
  1515. }
  1516. return
  1517. }
  1518. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1519. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  1520. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  1521. n = int(r0)
  1522. if e1 != 0 {
  1523. err = errnoErr(e1)
  1524. }
  1525. return
  1526. }