zsyscall_linux_ppc64.go 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793
  1. // mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go
  2. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  3. // +build ppc64,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(len), 0, 0)
  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, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  838. n = 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 Fchown(fd int, uid int, gid int) (err error) {
  1042. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  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 Fstat(fd int, stat *Stat_t) (err error) {
  1050. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1051. if e1 != 0 {
  1052. err = errnoErr(e1)
  1053. }
  1054. return
  1055. }
  1056. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1057. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1058. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1059. if e1 != 0 {
  1060. err = errnoErr(e1)
  1061. }
  1062. return
  1063. }
  1064. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1065. func Ftruncate(fd int, length int64) (err error) {
  1066. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1067. if e1 != 0 {
  1068. err = errnoErr(e1)
  1069. }
  1070. return
  1071. }
  1072. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1073. func Getegid() (egid int) {
  1074. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  1075. egid = int(r0)
  1076. return
  1077. }
  1078. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1079. func Geteuid() (euid int) {
  1080. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  1081. euid = int(r0)
  1082. return
  1083. }
  1084. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1085. func Getgid() (gid int) {
  1086. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  1087. gid = int(r0)
  1088. return
  1089. }
  1090. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1091. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1092. _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1093. if e1 != 0 {
  1094. err = errnoErr(e1)
  1095. }
  1096. return
  1097. }
  1098. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1099. func Getuid() (uid int) {
  1100. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  1101. uid = int(r0)
  1102. return
  1103. }
  1104. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1105. func Ioperm(from int, num int, on int) (err error) {
  1106. _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
  1107. if e1 != 0 {
  1108. err = errnoErr(e1)
  1109. }
  1110. return
  1111. }
  1112. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1113. func Iopl(level int) (err error) {
  1114. _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
  1115. if e1 != 0 {
  1116. err = errnoErr(e1)
  1117. }
  1118. return
  1119. }
  1120. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1121. func Lchown(path string, uid int, gid int) (err error) {
  1122. var _p0 *byte
  1123. _p0, err = BytePtrFromString(path)
  1124. if err != nil {
  1125. return
  1126. }
  1127. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1128. use(unsafe.Pointer(_p0))
  1129. if e1 != 0 {
  1130. err = errnoErr(e1)
  1131. }
  1132. return
  1133. }
  1134. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1135. func Listen(s int, n int) (err error) {
  1136. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1137. if e1 != 0 {
  1138. err = errnoErr(e1)
  1139. }
  1140. return
  1141. }
  1142. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1143. func Lstat(path string, stat *Stat_t) (err error) {
  1144. var _p0 *byte
  1145. _p0, err = BytePtrFromString(path)
  1146. if err != nil {
  1147. return
  1148. }
  1149. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1150. use(unsafe.Pointer(_p0))
  1151. if e1 != 0 {
  1152. err = errnoErr(e1)
  1153. }
  1154. return
  1155. }
  1156. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1157. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1158. var _p0 unsafe.Pointer
  1159. if len(p) > 0 {
  1160. _p0 = unsafe.Pointer(&p[0])
  1161. } else {
  1162. _p0 = unsafe.Pointer(&_zero)
  1163. }
  1164. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1165. n = int(r0)
  1166. if e1 != 0 {
  1167. err = errnoErr(e1)
  1168. }
  1169. return
  1170. }
  1171. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1172. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1173. var _p0 unsafe.Pointer
  1174. if len(p) > 0 {
  1175. _p0 = unsafe.Pointer(&p[0])
  1176. } else {
  1177. _p0 = unsafe.Pointer(&_zero)
  1178. }
  1179. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  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 Seek(fd int, offset int64, whence int) (off int64, err error) {
  1188. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1189. off = int64(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 Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1197. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1198. n = int(r0)
  1199. if e1 != 0 {
  1200. err = errnoErr(e1)
  1201. }
  1202. return
  1203. }
  1204. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1205. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1206. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1207. written = int(r0)
  1208. if e1 != 0 {
  1209. err = errnoErr(e1)
  1210. }
  1211. return
  1212. }
  1213. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1214. func Setfsgid(gid int) (err error) {
  1215. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1216. if e1 != 0 {
  1217. err = errnoErr(e1)
  1218. }
  1219. return
  1220. }
  1221. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1222. func Setfsuid(uid int) (err error) {
  1223. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1224. if e1 != 0 {
  1225. err = errnoErr(e1)
  1226. }
  1227. return
  1228. }
  1229. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1230. func Setregid(rgid int, egid int) (err error) {
  1231. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1232. if e1 != 0 {
  1233. err = errnoErr(e1)
  1234. }
  1235. return
  1236. }
  1237. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1238. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1239. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1240. if e1 != 0 {
  1241. err = errnoErr(e1)
  1242. }
  1243. return
  1244. }
  1245. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1246. func Setresuid(ruid int, euid int, suid int) (err error) {
  1247. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1248. if e1 != 0 {
  1249. err = errnoErr(e1)
  1250. }
  1251. return
  1252. }
  1253. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1254. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1255. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1256. if e1 != 0 {
  1257. err = errnoErr(e1)
  1258. }
  1259. return
  1260. }
  1261. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1262. func Setreuid(ruid int, euid int) (err error) {
  1263. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1264. if e1 != 0 {
  1265. err = errnoErr(e1)
  1266. }
  1267. return
  1268. }
  1269. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1270. func Shutdown(fd int, how int) (err error) {
  1271. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1272. if e1 != 0 {
  1273. err = errnoErr(e1)
  1274. }
  1275. return
  1276. }
  1277. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1278. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1279. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1280. n = int64(r0)
  1281. if e1 != 0 {
  1282. err = errnoErr(e1)
  1283. }
  1284. return
  1285. }
  1286. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1287. func Stat(path string, stat *Stat_t) (err error) {
  1288. var _p0 *byte
  1289. _p0, err = BytePtrFromString(path)
  1290. if err != nil {
  1291. return
  1292. }
  1293. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1294. use(unsafe.Pointer(_p0))
  1295. if e1 != 0 {
  1296. err = errnoErr(e1)
  1297. }
  1298. return
  1299. }
  1300. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1301. func Statfs(path string, buf *Statfs_t) (err error) {
  1302. var _p0 *byte
  1303. _p0, err = BytePtrFromString(path)
  1304. if err != nil {
  1305. return
  1306. }
  1307. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1308. use(unsafe.Pointer(_p0))
  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 SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1316. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 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 Truncate(path string, length int64) (err error) {
  1324. var _p0 *byte
  1325. _p0, err = BytePtrFromString(path)
  1326. if err != nil {
  1327. return
  1328. }
  1329. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1330. use(unsafe.Pointer(_p0))
  1331. if e1 != 0 {
  1332. err = errnoErr(e1)
  1333. }
  1334. return
  1335. }
  1336. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1337. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1338. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1339. fd = int(r0)
  1340. if e1 != 0 {
  1341. err = errnoErr(e1)
  1342. }
  1343. return
  1344. }
  1345. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1346. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1347. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1348. fd = int(r0)
  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 bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1356. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  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 connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1364. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1365. if e1 != 0 {
  1366. err = errnoErr(e1)
  1367. }
  1368. return
  1369. }
  1370. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1371. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1372. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1373. nn = int(r0)
  1374. if e1 != 0 {
  1375. err = errnoErr(e1)
  1376. }
  1377. return
  1378. }
  1379. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1380. func setgroups(n int, list *_Gid_t) (err error) {
  1381. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1382. if e1 != 0 {
  1383. err = errnoErr(e1)
  1384. }
  1385. return
  1386. }
  1387. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1388. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1389. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1390. if e1 != 0 {
  1391. err = errnoErr(e1)
  1392. }
  1393. return
  1394. }
  1395. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1396. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1397. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1398. if e1 != 0 {
  1399. err = errnoErr(e1)
  1400. }
  1401. return
  1402. }
  1403. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1404. func socket(domain int, typ int, proto int) (fd int, err error) {
  1405. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1406. fd = int(r0)
  1407. if e1 != 0 {
  1408. err = errnoErr(e1)
  1409. }
  1410. return
  1411. }
  1412. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1413. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1414. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1415. if e1 != 0 {
  1416. err = errnoErr(e1)
  1417. }
  1418. return
  1419. }
  1420. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1421. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1422. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1423. if e1 != 0 {
  1424. err = errnoErr(e1)
  1425. }
  1426. return
  1427. }
  1428. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1429. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1430. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1431. if e1 != 0 {
  1432. err = errnoErr(e1)
  1433. }
  1434. return
  1435. }
  1436. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1437. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1438. var _p0 unsafe.Pointer
  1439. if len(p) > 0 {
  1440. _p0 = unsafe.Pointer(&p[0])
  1441. } else {
  1442. _p0 = unsafe.Pointer(&_zero)
  1443. }
  1444. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1445. n = int(r0)
  1446. if e1 != 0 {
  1447. err = errnoErr(e1)
  1448. }
  1449. return
  1450. }
  1451. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1452. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1453. var _p0 unsafe.Pointer
  1454. if len(buf) > 0 {
  1455. _p0 = unsafe.Pointer(&buf[0])
  1456. } else {
  1457. _p0 = unsafe.Pointer(&_zero)
  1458. }
  1459. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1460. if e1 != 0 {
  1461. err = errnoErr(e1)
  1462. }
  1463. return
  1464. }
  1465. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1466. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1467. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1468. n = int(r0)
  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 sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1476. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1477. n = int(r0)
  1478. if e1 != 0 {
  1479. err = errnoErr(e1)
  1480. }
  1481. return
  1482. }
  1483. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1484. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1485. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  1486. xaddr = uintptr(r0)
  1487. if e1 != 0 {
  1488. err = errnoErr(e1)
  1489. }
  1490. return
  1491. }
  1492. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1493. func Gettimeofday(tv *Timeval) (err error) {
  1494. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1495. if e1 != 0 {
  1496. err = errnoErr(e1)
  1497. }
  1498. return
  1499. }
  1500. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1501. func Time(t *Time_t) (tt Time_t, err error) {
  1502. r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
  1503. tt = Time_t(r0)
  1504. if e1 != 0 {
  1505. err = errnoErr(e1)
  1506. }
  1507. return
  1508. }