zsyscall_darwin_386.go 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712
  1. // mksyscall.pl -l32 -tags darwin,386 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build darwin,386
  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 getgroups(ngid int, gid *_Gid_t) (n int, err error) {
  12. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  13. n = int(r0)
  14. if e1 != 0 {
  15. err = errnoErr(e1)
  16. }
  17. return
  18. }
  19. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  20. func setgroups(ngid int, gid *_Gid_t) (err error) {
  21. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  22. if e1 != 0 {
  23. err = errnoErr(e1)
  24. }
  25. return
  26. }
  27. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  28. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  29. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  30. wpid = int(r0)
  31. if e1 != 0 {
  32. err = errnoErr(e1)
  33. }
  34. return
  35. }
  36. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  37. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  38. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  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 bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  47. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  48. if e1 != 0 {
  49. err = errnoErr(e1)
  50. }
  51. return
  52. }
  53. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  54. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  55. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  56. if e1 != 0 {
  57. err = errnoErr(e1)
  58. }
  59. return
  60. }
  61. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  62. func socket(domain int, typ int, proto int) (fd int, err error) {
  63. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  64. fd = int(r0)
  65. if e1 != 0 {
  66. err = errnoErr(e1)
  67. }
  68. return
  69. }
  70. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  71. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  72. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  73. if e1 != 0 {
  74. err = errnoErr(e1)
  75. }
  76. return
  77. }
  78. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  79. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  80. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  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 getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  88. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  89. if e1 != 0 {
  90. err = errnoErr(e1)
  91. }
  92. return
  93. }
  94. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  95. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  96. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  97. if e1 != 0 {
  98. err = errnoErr(e1)
  99. }
  100. return
  101. }
  102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  103. func Shutdown(s int, how int) (err error) {
  104. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
  105. if e1 != 0 {
  106. err = errnoErr(e1)
  107. }
  108. return
  109. }
  110. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  111. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  112. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  113. if e1 != 0 {
  114. err = errnoErr(e1)
  115. }
  116. return
  117. }
  118. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  119. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  120. var _p0 unsafe.Pointer
  121. if len(p) > 0 {
  122. _p0 = unsafe.Pointer(&p[0])
  123. } else {
  124. _p0 = unsafe.Pointer(&_zero)
  125. }
  126. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  127. n = int(r0)
  128. if e1 != 0 {
  129. err = errnoErr(e1)
  130. }
  131. return
  132. }
  133. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  134. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  135. var _p0 unsafe.Pointer
  136. if len(buf) > 0 {
  137. _p0 = unsafe.Pointer(&buf[0])
  138. } else {
  139. _p0 = unsafe.Pointer(&_zero)
  140. }
  141. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  142. if e1 != 0 {
  143. err = errnoErr(e1)
  144. }
  145. return
  146. }
  147. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  148. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  149. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  150. n = int(r0)
  151. if e1 != 0 {
  152. err = errnoErr(e1)
  153. }
  154. return
  155. }
  156. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  157. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  158. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  159. n = int(r0)
  160. if e1 != 0 {
  161. err = errnoErr(e1)
  162. }
  163. return
  164. }
  165. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  166. func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
  167. r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
  168. n = int(r0)
  169. if e1 != 0 {
  170. err = errnoErr(e1)
  171. }
  172. return
  173. }
  174. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  175. func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
  176. var _p0 unsafe.Pointer
  177. if len(mib) > 0 {
  178. _p0 = unsafe.Pointer(&mib[0])
  179. } else {
  180. _p0 = unsafe.Pointer(&_zero)
  181. }
  182. _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
  183. if e1 != 0 {
  184. err = errnoErr(e1)
  185. }
  186. return
  187. }
  188. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  189. func utimes(path string, timeval *[2]Timeval) (err error) {
  190. var _p0 *byte
  191. _p0, err = BytePtrFromString(path)
  192. if err != nil {
  193. return
  194. }
  195. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  196. if e1 != 0 {
  197. err = errnoErr(e1)
  198. }
  199. return
  200. }
  201. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  202. func futimes(fd int, timeval *[2]Timeval) (err error) {
  203. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  204. if e1 != 0 {
  205. err = errnoErr(e1)
  206. }
  207. return
  208. }
  209. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  210. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  211. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  212. val = int(r0)
  213. if e1 != 0 {
  214. err = errnoErr(e1)
  215. }
  216. return
  217. }
  218. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  219. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  220. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  221. n = int(r0)
  222. if e1 != 0 {
  223. err = errnoErr(e1)
  224. }
  225. return
  226. }
  227. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  228. func Madvise(b []byte, behav int) (err error) {
  229. var _p0 unsafe.Pointer
  230. if len(b) > 0 {
  231. _p0 = unsafe.Pointer(&b[0])
  232. } else {
  233. _p0 = unsafe.Pointer(&_zero)
  234. }
  235. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
  236. if e1 != 0 {
  237. err = errnoErr(e1)
  238. }
  239. return
  240. }
  241. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  242. func Mlock(b []byte) (err error) {
  243. var _p0 unsafe.Pointer
  244. if len(b) > 0 {
  245. _p0 = unsafe.Pointer(&b[0])
  246. } else {
  247. _p0 = unsafe.Pointer(&_zero)
  248. }
  249. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  250. if e1 != 0 {
  251. err = errnoErr(e1)
  252. }
  253. return
  254. }
  255. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  256. func Mlockall(flags int) (err error) {
  257. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  258. if e1 != 0 {
  259. err = errnoErr(e1)
  260. }
  261. return
  262. }
  263. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  264. func Mprotect(b []byte, prot int) (err error) {
  265. var _p0 unsafe.Pointer
  266. if len(b) > 0 {
  267. _p0 = unsafe.Pointer(&b[0])
  268. } else {
  269. _p0 = unsafe.Pointer(&_zero)
  270. }
  271. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  272. if e1 != 0 {
  273. err = errnoErr(e1)
  274. }
  275. return
  276. }
  277. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  278. func Msync(b []byte, flags int) (err error) {
  279. var _p0 unsafe.Pointer
  280. if len(b) > 0 {
  281. _p0 = unsafe.Pointer(&b[0])
  282. } else {
  283. _p0 = unsafe.Pointer(&_zero)
  284. }
  285. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  286. if e1 != 0 {
  287. err = errnoErr(e1)
  288. }
  289. return
  290. }
  291. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  292. func Munlock(b []byte) (err error) {
  293. var _p0 unsafe.Pointer
  294. if len(b) > 0 {
  295. _p0 = unsafe.Pointer(&b[0])
  296. } else {
  297. _p0 = unsafe.Pointer(&_zero)
  298. }
  299. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  300. if e1 != 0 {
  301. err = errnoErr(e1)
  302. }
  303. return
  304. }
  305. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  306. func Munlockall() (err error) {
  307. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  308. if e1 != 0 {
  309. err = errnoErr(e1)
  310. }
  311. return
  312. }
  313. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  314. func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  315. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  316. if e1 != 0 {
  317. err = errnoErr(e1)
  318. }
  319. return
  320. }
  321. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  322. func pipe() (r int, w int, err error) {
  323. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  324. r = int(r0)
  325. w = int(r1)
  326. if e1 != 0 {
  327. err = errnoErr(e1)
  328. }
  329. return
  330. }
  331. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  332. func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
  333. var _p0 *byte
  334. _p0, err = BytePtrFromString(path)
  335. if err != nil {
  336. return
  337. }
  338. var _p1 *byte
  339. _p1, err = BytePtrFromString(attr)
  340. if err != nil {
  341. return
  342. }
  343. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
  344. sz = int(r0)
  345. if e1 != 0 {
  346. err = errnoErr(e1)
  347. }
  348. return
  349. }
  350. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  351. func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
  352. var _p0 *byte
  353. _p0, err = BytePtrFromString(path)
  354. if err != nil {
  355. return
  356. }
  357. var _p1 *byte
  358. _p1, err = BytePtrFromString(attr)
  359. if err != nil {
  360. return
  361. }
  362. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
  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 removexattr(path string, attr string, options int) (err error) {
  370. var _p0 *byte
  371. _p0, err = BytePtrFromString(path)
  372. if err != nil {
  373. return
  374. }
  375. var _p1 *byte
  376. _p1, err = BytePtrFromString(attr)
  377. if err != nil {
  378. return
  379. }
  380. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
  381. if e1 != 0 {
  382. err = errnoErr(e1)
  383. }
  384. return
  385. }
  386. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  387. func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
  388. var _p0 *byte
  389. _p0, err = BytePtrFromString(path)
  390. if err != nil {
  391. return
  392. }
  393. r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
  394. sz = int(r0)
  395. if e1 != 0 {
  396. err = errnoErr(e1)
  397. }
  398. return
  399. }
  400. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  401. func kill(pid int, signum int, posix int) (err error) {
  402. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
  403. if e1 != 0 {
  404. err = errnoErr(e1)
  405. }
  406. return
  407. }
  408. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  409. func ioctl(fd int, req uint, arg uintptr) (err error) {
  410. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  411. if e1 != 0 {
  412. err = errnoErr(e1)
  413. }
  414. return
  415. }
  416. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  417. func Access(path string, mode uint32) (err error) {
  418. var _p0 *byte
  419. _p0, err = BytePtrFromString(path)
  420. if err != nil {
  421. return
  422. }
  423. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  431. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 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 Chdir(path string) (err error) {
  439. var _p0 *byte
  440. _p0, err = BytePtrFromString(path)
  441. if err != nil {
  442. return
  443. }
  444. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  445. if e1 != 0 {
  446. err = errnoErr(e1)
  447. }
  448. return
  449. }
  450. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  451. func Chflags(path string, flags int) (err error) {
  452. var _p0 *byte
  453. _p0, err = BytePtrFromString(path)
  454. if err != nil {
  455. return
  456. }
  457. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  458. if e1 != 0 {
  459. err = errnoErr(e1)
  460. }
  461. return
  462. }
  463. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  464. func Chmod(path string, mode uint32) (err error) {
  465. var _p0 *byte
  466. _p0, err = BytePtrFromString(path)
  467. if err != nil {
  468. return
  469. }
  470. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  471. if e1 != 0 {
  472. err = errnoErr(e1)
  473. }
  474. return
  475. }
  476. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  477. func Chown(path string, uid int, gid int) (err error) {
  478. var _p0 *byte
  479. _p0, err = BytePtrFromString(path)
  480. if err != nil {
  481. return
  482. }
  483. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  484. if e1 != 0 {
  485. err = errnoErr(e1)
  486. }
  487. return
  488. }
  489. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  490. func Chroot(path string) (err error) {
  491. var _p0 *byte
  492. _p0, err = BytePtrFromString(path)
  493. if err != nil {
  494. return
  495. }
  496. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  497. if e1 != 0 {
  498. err = errnoErr(e1)
  499. }
  500. return
  501. }
  502. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  503. func Close(fd int) (err error) {
  504. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  505. if e1 != 0 {
  506. err = errnoErr(e1)
  507. }
  508. return
  509. }
  510. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  511. func Dup(fd int) (nfd int, err error) {
  512. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  513. nfd = int(r0)
  514. if e1 != 0 {
  515. err = errnoErr(e1)
  516. }
  517. return
  518. }
  519. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  520. func Dup2(from int, to int) (err error) {
  521. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  522. if e1 != 0 {
  523. err = errnoErr(e1)
  524. }
  525. return
  526. }
  527. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  528. func Exchangedata(path1 string, path2 string, options int) (err error) {
  529. var _p0 *byte
  530. _p0, err = BytePtrFromString(path1)
  531. if err != nil {
  532. return
  533. }
  534. var _p1 *byte
  535. _p1, err = BytePtrFromString(path2)
  536. if err != nil {
  537. return
  538. }
  539. _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
  540. if e1 != 0 {
  541. err = errnoErr(e1)
  542. }
  543. return
  544. }
  545. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  546. func Exit(code int) {
  547. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  548. return
  549. }
  550. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  551. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  552. var _p0 *byte
  553. _p0, err = BytePtrFromString(path)
  554. if err != nil {
  555. return
  556. }
  557. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  558. if e1 != 0 {
  559. err = errnoErr(e1)
  560. }
  561. return
  562. }
  563. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  564. func Fchdir(fd int) (err error) {
  565. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  566. if e1 != 0 {
  567. err = errnoErr(e1)
  568. }
  569. return
  570. }
  571. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  572. func Fchflags(fd int, flags int) (err error) {
  573. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  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 Fchmod(fd int, mode uint32) (err error) {
  581. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  582. if e1 != 0 {
  583. err = errnoErr(e1)
  584. }
  585. return
  586. }
  587. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  588. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  589. var _p0 *byte
  590. _p0, err = BytePtrFromString(path)
  591. if err != nil {
  592. return
  593. }
  594. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  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 Fchown(fd int, uid int, gid int) (err error) {
  602. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  603. if e1 != 0 {
  604. err = errnoErr(e1)
  605. }
  606. return
  607. }
  608. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  609. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  610. var _p0 *byte
  611. _p0, err = BytePtrFromString(path)
  612. if err != nil {
  613. return
  614. }
  615. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  616. if e1 != 0 {
  617. err = errnoErr(e1)
  618. }
  619. return
  620. }
  621. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  622. func Flock(fd int, how int) (err error) {
  623. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  624. if e1 != 0 {
  625. err = errnoErr(e1)
  626. }
  627. return
  628. }
  629. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  630. func Fpathconf(fd int, name int) (val int, err error) {
  631. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  632. val = int(r0)
  633. if e1 != 0 {
  634. err = errnoErr(e1)
  635. }
  636. return
  637. }
  638. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  639. func Fstat(fd int, stat *Stat_t) (err error) {
  640. _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  641. if e1 != 0 {
  642. err = errnoErr(e1)
  643. }
  644. return
  645. }
  646. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  647. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  648. var _p0 *byte
  649. _p0, err = BytePtrFromString(path)
  650. if err != nil {
  651. return
  652. }
  653. _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  654. if e1 != 0 {
  655. err = errnoErr(e1)
  656. }
  657. return
  658. }
  659. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  660. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  661. _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  662. if e1 != 0 {
  663. err = errnoErr(e1)
  664. }
  665. return
  666. }
  667. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  668. func Fsync(fd int) (err error) {
  669. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  670. if e1 != 0 {
  671. err = errnoErr(e1)
  672. }
  673. return
  674. }
  675. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  676. func Ftruncate(fd int, length int64) (err error) {
  677. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
  678. if e1 != 0 {
  679. err = errnoErr(e1)
  680. }
  681. return
  682. }
  683. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  684. func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
  685. var _p0 unsafe.Pointer
  686. if len(buf) > 0 {
  687. _p0 = unsafe.Pointer(&buf[0])
  688. } else {
  689. _p0 = unsafe.Pointer(&_zero)
  690. }
  691. r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  692. n = int(r0)
  693. if e1 != 0 {
  694. err = errnoErr(e1)
  695. }
  696. return
  697. }
  698. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  699. func Getdtablesize() (size int) {
  700. r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
  701. size = int(r0)
  702. return
  703. }
  704. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  705. func Getegid() (egid int) {
  706. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  707. egid = int(r0)
  708. return
  709. }
  710. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  711. func Geteuid() (uid int) {
  712. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  713. uid = int(r0)
  714. return
  715. }
  716. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  717. func Getgid() (gid int) {
  718. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  719. gid = int(r0)
  720. return
  721. }
  722. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  723. func Getpgid(pid int) (pgid int, err error) {
  724. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  725. pgid = int(r0)
  726. if e1 != 0 {
  727. err = errnoErr(e1)
  728. }
  729. return
  730. }
  731. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  732. func Getpgrp() (pgrp int) {
  733. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  734. pgrp = int(r0)
  735. return
  736. }
  737. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  738. func Getpid() (pid int) {
  739. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  740. pid = int(r0)
  741. return
  742. }
  743. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  744. func Getppid() (ppid int) {
  745. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  746. ppid = int(r0)
  747. return
  748. }
  749. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  750. func Getpriority(which int, who int) (prio int, err error) {
  751. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  752. prio = int(r0)
  753. if e1 != 0 {
  754. err = errnoErr(e1)
  755. }
  756. return
  757. }
  758. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  759. func Getrlimit(which int, lim *Rlimit) (err error) {
  760. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  761. if e1 != 0 {
  762. err = errnoErr(e1)
  763. }
  764. return
  765. }
  766. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  767. func Getrusage(who int, rusage *Rusage) (err error) {
  768. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  769. if e1 != 0 {
  770. err = errnoErr(e1)
  771. }
  772. return
  773. }
  774. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  775. func Getsid(pid int) (sid int, err error) {
  776. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  777. sid = int(r0)
  778. if e1 != 0 {
  779. err = errnoErr(e1)
  780. }
  781. return
  782. }
  783. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  784. func Getuid() (uid int) {
  785. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  786. uid = int(r0)
  787. return
  788. }
  789. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  790. func Issetugid() (tainted bool) {
  791. r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
  792. tainted = bool(r0 != 0)
  793. return
  794. }
  795. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  796. func Kqueue() (fd int, err error) {
  797. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  798. fd = int(r0)
  799. if e1 != 0 {
  800. err = errnoErr(e1)
  801. }
  802. return
  803. }
  804. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  805. func Lchown(path string, uid int, gid int) (err error) {
  806. var _p0 *byte
  807. _p0, err = BytePtrFromString(path)
  808. if err != nil {
  809. return
  810. }
  811. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  812. if e1 != 0 {
  813. err = errnoErr(e1)
  814. }
  815. return
  816. }
  817. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  818. func Link(path string, link string) (err error) {
  819. var _p0 *byte
  820. _p0, err = BytePtrFromString(path)
  821. if err != nil {
  822. return
  823. }
  824. var _p1 *byte
  825. _p1, err = BytePtrFromString(link)
  826. if err != nil {
  827. return
  828. }
  829. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 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 Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  837. var _p0 *byte
  838. _p0, err = BytePtrFromString(path)
  839. if err != nil {
  840. return
  841. }
  842. var _p1 *byte
  843. _p1, err = BytePtrFromString(link)
  844. if err != nil {
  845. return
  846. }
  847. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  848. if e1 != 0 {
  849. err = errnoErr(e1)
  850. }
  851. return
  852. }
  853. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  854. func Listen(s int, backlog int) (err error) {
  855. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  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 Lstat(path string, stat *Stat_t) (err error) {
  863. var _p0 *byte
  864. _p0, err = BytePtrFromString(path)
  865. if err != nil {
  866. return
  867. }
  868. _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  869. if e1 != 0 {
  870. err = errnoErr(e1)
  871. }
  872. return
  873. }
  874. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  875. func Mkdir(path string, mode uint32) (err error) {
  876. var _p0 *byte
  877. _p0, err = BytePtrFromString(path)
  878. if err != nil {
  879. return
  880. }
  881. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  882. if e1 != 0 {
  883. err = errnoErr(e1)
  884. }
  885. return
  886. }
  887. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  888. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  889. var _p0 *byte
  890. _p0, err = BytePtrFromString(path)
  891. if err != nil {
  892. return
  893. }
  894. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  895. if e1 != 0 {
  896. err = errnoErr(e1)
  897. }
  898. return
  899. }
  900. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  901. func Mkfifo(path string, mode uint32) (err error) {
  902. var _p0 *byte
  903. _p0, err = BytePtrFromString(path)
  904. if err != nil {
  905. return
  906. }
  907. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  908. if e1 != 0 {
  909. err = errnoErr(e1)
  910. }
  911. return
  912. }
  913. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  914. func Mknod(path string, mode uint32, dev int) (err error) {
  915. var _p0 *byte
  916. _p0, err = BytePtrFromString(path)
  917. if err != nil {
  918. return
  919. }
  920. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  921. if e1 != 0 {
  922. err = errnoErr(e1)
  923. }
  924. return
  925. }
  926. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  927. func Open(path string, mode int, perm uint32) (fd int, err error) {
  928. var _p0 *byte
  929. _p0, err = BytePtrFromString(path)
  930. if err != nil {
  931. return
  932. }
  933. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  934. fd = int(r0)
  935. if e1 != 0 {
  936. err = errnoErr(e1)
  937. }
  938. return
  939. }
  940. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  941. func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
  942. var _p0 *byte
  943. _p0, err = BytePtrFromString(path)
  944. if err != nil {
  945. return
  946. }
  947. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  948. fd = int(r0)
  949. if e1 != 0 {
  950. err = errnoErr(e1)
  951. }
  952. return
  953. }
  954. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  955. func Pathconf(path string, name int) (val int, err error) {
  956. var _p0 *byte
  957. _p0, err = BytePtrFromString(path)
  958. if err != nil {
  959. return
  960. }
  961. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  962. val = int(r0)
  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 Pread(fd int, p []byte, offset int64) (n int, err error) {
  970. var _p0 unsafe.Pointer
  971. if len(p) > 0 {
  972. _p0 = unsafe.Pointer(&p[0])
  973. } else {
  974. _p0 = unsafe.Pointer(&_zero)
  975. }
  976. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  977. n = int(r0)
  978. if e1 != 0 {
  979. err = errnoErr(e1)
  980. }
  981. return
  982. }
  983. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  984. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  985. var _p0 unsafe.Pointer
  986. if len(p) > 0 {
  987. _p0 = unsafe.Pointer(&p[0])
  988. } else {
  989. _p0 = unsafe.Pointer(&_zero)
  990. }
  991. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  992. n = int(r0)
  993. if e1 != 0 {
  994. err = errnoErr(e1)
  995. }
  996. return
  997. }
  998. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  999. func read(fd int, p []byte) (n int, err error) {
  1000. var _p0 unsafe.Pointer
  1001. if len(p) > 0 {
  1002. _p0 = unsafe.Pointer(&p[0])
  1003. } else {
  1004. _p0 = unsafe.Pointer(&_zero)
  1005. }
  1006. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1007. n = int(r0)
  1008. if e1 != 0 {
  1009. err = errnoErr(e1)
  1010. }
  1011. return
  1012. }
  1013. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1014. func Readlink(path string, buf []byte) (n int, err error) {
  1015. var _p0 *byte
  1016. _p0, err = BytePtrFromString(path)
  1017. if err != nil {
  1018. return
  1019. }
  1020. var _p1 unsafe.Pointer
  1021. if len(buf) > 0 {
  1022. _p1 = unsafe.Pointer(&buf[0])
  1023. } else {
  1024. _p1 = unsafe.Pointer(&_zero)
  1025. }
  1026. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  1027. n = int(r0)
  1028. if e1 != 0 {
  1029. err = errnoErr(e1)
  1030. }
  1031. return
  1032. }
  1033. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1034. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  1035. var _p0 *byte
  1036. _p0, err = BytePtrFromString(path)
  1037. if err != nil {
  1038. return
  1039. }
  1040. var _p1 unsafe.Pointer
  1041. if len(buf) > 0 {
  1042. _p1 = unsafe.Pointer(&buf[0])
  1043. } else {
  1044. _p1 = unsafe.Pointer(&_zero)
  1045. }
  1046. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  1047. n = int(r0)
  1048. if e1 != 0 {
  1049. err = errnoErr(e1)
  1050. }
  1051. return
  1052. }
  1053. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1054. func Rename(from string, to string) (err error) {
  1055. var _p0 *byte
  1056. _p0, err = BytePtrFromString(from)
  1057. if err != nil {
  1058. return
  1059. }
  1060. var _p1 *byte
  1061. _p1, err = BytePtrFromString(to)
  1062. if err != nil {
  1063. return
  1064. }
  1065. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1066. if e1 != 0 {
  1067. err = errnoErr(e1)
  1068. }
  1069. return
  1070. }
  1071. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1072. func Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1073. var _p0 *byte
  1074. _p0, err = BytePtrFromString(from)
  1075. if err != nil {
  1076. return
  1077. }
  1078. var _p1 *byte
  1079. _p1, err = BytePtrFromString(to)
  1080. if err != nil {
  1081. return
  1082. }
  1083. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1084. if e1 != 0 {
  1085. err = errnoErr(e1)
  1086. }
  1087. return
  1088. }
  1089. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1090. func Revoke(path string) (err error) {
  1091. var _p0 *byte
  1092. _p0, err = BytePtrFromString(path)
  1093. if err != nil {
  1094. return
  1095. }
  1096. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1097. if e1 != 0 {
  1098. err = errnoErr(e1)
  1099. }
  1100. return
  1101. }
  1102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1103. func Rmdir(path string) (err error) {
  1104. var _p0 *byte
  1105. _p0, err = BytePtrFromString(path)
  1106. if err != nil {
  1107. return
  1108. }
  1109. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 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 Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1117. r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
  1118. newoffset = int64(int64(r1)<<32 | int64(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 Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  1126. _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  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 Setegid(egid int) (err error) {
  1134. _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
  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 Seteuid(euid int) (err error) {
  1142. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  1143. if e1 != 0 {
  1144. err = errnoErr(e1)
  1145. }
  1146. return
  1147. }
  1148. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1149. func Setgid(gid int) (err error) {
  1150. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  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 Setlogin(name string) (err error) {
  1158. var _p0 *byte
  1159. _p0, err = BytePtrFromString(name)
  1160. if err != nil {
  1161. return
  1162. }
  1163. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  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 Setpgid(pid int, pgid int) (err error) {
  1171. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 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 Setpriority(which int, who int, prio int) (err error) {
  1179. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1180. if e1 != 0 {
  1181. err = errnoErr(e1)
  1182. }
  1183. return
  1184. }
  1185. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1186. func Setprivexec(flag int) (err error) {
  1187. _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
  1188. if e1 != 0 {
  1189. err = errnoErr(e1)
  1190. }
  1191. return
  1192. }
  1193. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1194. func Setregid(rgid int, egid int) (err error) {
  1195. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1196. if e1 != 0 {
  1197. err = errnoErr(e1)
  1198. }
  1199. return
  1200. }
  1201. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1202. func Setreuid(ruid int, euid int) (err error) {
  1203. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1204. if e1 != 0 {
  1205. err = errnoErr(e1)
  1206. }
  1207. return
  1208. }
  1209. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1210. func Setrlimit(which int, lim *Rlimit) (err error) {
  1211. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1212. if e1 != 0 {
  1213. err = errnoErr(e1)
  1214. }
  1215. return
  1216. }
  1217. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1218. func Setsid() (pid int, err error) {
  1219. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1220. pid = int(r0)
  1221. if e1 != 0 {
  1222. err = errnoErr(e1)
  1223. }
  1224. return
  1225. }
  1226. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1227. func Settimeofday(tp *Timeval) (err error) {
  1228. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1229. if e1 != 0 {
  1230. err = errnoErr(e1)
  1231. }
  1232. return
  1233. }
  1234. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1235. func Setuid(uid int) (err error) {
  1236. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1237. if e1 != 0 {
  1238. err = errnoErr(e1)
  1239. }
  1240. return
  1241. }
  1242. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1243. func Stat(path string, stat *Stat_t) (err error) {
  1244. var _p0 *byte
  1245. _p0, err = BytePtrFromString(path)
  1246. if err != nil {
  1247. return
  1248. }
  1249. _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1250. if e1 != 0 {
  1251. err = errnoErr(e1)
  1252. }
  1253. return
  1254. }
  1255. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1256. func Statfs(path string, stat *Statfs_t) (err error) {
  1257. var _p0 *byte
  1258. _p0, err = BytePtrFromString(path)
  1259. if err != nil {
  1260. return
  1261. }
  1262. _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1263. if e1 != 0 {
  1264. err = errnoErr(e1)
  1265. }
  1266. return
  1267. }
  1268. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1269. func Symlink(path string, link string) (err error) {
  1270. var _p0 *byte
  1271. _p0, err = BytePtrFromString(path)
  1272. if err != nil {
  1273. return
  1274. }
  1275. var _p1 *byte
  1276. _p1, err = BytePtrFromString(link)
  1277. if err != nil {
  1278. return
  1279. }
  1280. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  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 Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1288. var _p0 *byte
  1289. _p0, err = BytePtrFromString(oldpath)
  1290. if err != nil {
  1291. return
  1292. }
  1293. var _p1 *byte
  1294. _p1, err = BytePtrFromString(newpath)
  1295. if err != nil {
  1296. return
  1297. }
  1298. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1299. if e1 != 0 {
  1300. err = errnoErr(e1)
  1301. }
  1302. return
  1303. }
  1304. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1305. func Sync() (err error) {
  1306. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1307. if e1 != 0 {
  1308. err = errnoErr(e1)
  1309. }
  1310. return
  1311. }
  1312. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1313. func Truncate(path string, length int64) (err error) {
  1314. var _p0 *byte
  1315. _p0, err = BytePtrFromString(path)
  1316. if err != nil {
  1317. return
  1318. }
  1319. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
  1320. if e1 != 0 {
  1321. err = errnoErr(e1)
  1322. }
  1323. return
  1324. }
  1325. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1326. func Umask(newmask int) (oldmask int) {
  1327. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1328. oldmask = int(r0)
  1329. return
  1330. }
  1331. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1332. func Undelete(path string) (err error) {
  1333. var _p0 *byte
  1334. _p0, err = BytePtrFromString(path)
  1335. if err != nil {
  1336. return
  1337. }
  1338. _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1339. if e1 != 0 {
  1340. err = errnoErr(e1)
  1341. }
  1342. return
  1343. }
  1344. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1345. func Unlink(path string) (err error) {
  1346. var _p0 *byte
  1347. _p0, err = BytePtrFromString(path)
  1348. if err != nil {
  1349. return
  1350. }
  1351. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1352. if e1 != 0 {
  1353. err = errnoErr(e1)
  1354. }
  1355. return
  1356. }
  1357. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1358. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1359. var _p0 *byte
  1360. _p0, err = BytePtrFromString(path)
  1361. if err != nil {
  1362. return
  1363. }
  1364. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  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 Unmount(path string, flags int) (err error) {
  1372. var _p0 *byte
  1373. _p0, err = BytePtrFromString(path)
  1374. if err != nil {
  1375. return
  1376. }
  1377. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1378. if e1 != 0 {
  1379. err = errnoErr(e1)
  1380. }
  1381. return
  1382. }
  1383. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1384. func write(fd int, p []byte) (n int, err error) {
  1385. var _p0 unsafe.Pointer
  1386. if len(p) > 0 {
  1387. _p0 = unsafe.Pointer(&p[0])
  1388. } else {
  1389. _p0 = unsafe.Pointer(&_zero)
  1390. }
  1391. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1392. n = int(r0)
  1393. if e1 != 0 {
  1394. err = errnoErr(e1)
  1395. }
  1396. return
  1397. }
  1398. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1399. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1400. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
  1401. ret = uintptr(r0)
  1402. if e1 != 0 {
  1403. err = errnoErr(e1)
  1404. }
  1405. return
  1406. }
  1407. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1408. func munmap(addr uintptr, length uintptr) (err error) {
  1409. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1410. if e1 != 0 {
  1411. err = errnoErr(e1)
  1412. }
  1413. return
  1414. }
  1415. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1416. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1417. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1418. n = int(r0)
  1419. if e1 != 0 {
  1420. err = errnoErr(e1)
  1421. }
  1422. return
  1423. }
  1424. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1425. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1426. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1427. n = int(r0)
  1428. if e1 != 0 {
  1429. err = errnoErr(e1)
  1430. }
  1431. return
  1432. }
  1433. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1434. func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
  1435. r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1436. sec = int32(r0)
  1437. usec = int32(r1)
  1438. if e1 != 0 {
  1439. err = errnoErr(e1)
  1440. }
  1441. return
  1442. }