zsyscall_linux_arm.go 42 KB

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