zsyscall_dragonfly_amd64.go 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508
  1. // mksyscall.pl -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build dragonfly,amd64
  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 pipe() (r int, w int, err error) {
  315. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  316. r = int(r0)
  317. w = int(r1)
  318. if e1 != 0 {
  319. err = errnoErr(e1)
  320. }
  321. return
  322. }
  323. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  324. func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
  325. var _p0 unsafe.Pointer
  326. if len(p) > 0 {
  327. _p0 = unsafe.Pointer(&p[0])
  328. } else {
  329. _p0 = unsafe.Pointer(&_zero)
  330. }
  331. r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
  332. n = int(r0)
  333. if e1 != 0 {
  334. err = errnoErr(e1)
  335. }
  336. return
  337. }
  338. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  339. func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
  340. var _p0 unsafe.Pointer
  341. if len(p) > 0 {
  342. _p0 = unsafe.Pointer(&p[0])
  343. } else {
  344. _p0 = unsafe.Pointer(&_zero)
  345. }
  346. r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
  347. n = int(r0)
  348. if e1 != 0 {
  349. err = errnoErr(e1)
  350. }
  351. return
  352. }
  353. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  354. func Getcwd(buf []byte) (n int, err error) {
  355. var _p0 unsafe.Pointer
  356. if len(buf) > 0 {
  357. _p0 = unsafe.Pointer(&buf[0])
  358. } else {
  359. _p0 = unsafe.Pointer(&_zero)
  360. }
  361. r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  362. n = int(r0)
  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 ioctl(fd int, req uint, arg uintptr) (err error) {
  370. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  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 Access(path string, mode uint32) (err error) {
  378. var _p0 *byte
  379. _p0, err = BytePtrFromString(path)
  380. if err != nil {
  381. return
  382. }
  383. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  384. if e1 != 0 {
  385. err = errnoErr(e1)
  386. }
  387. return
  388. }
  389. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  390. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  391. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  392. if e1 != 0 {
  393. err = errnoErr(e1)
  394. }
  395. return
  396. }
  397. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  398. func Chdir(path string) (err error) {
  399. var _p0 *byte
  400. _p0, err = BytePtrFromString(path)
  401. if err != nil {
  402. return
  403. }
  404. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  405. if e1 != 0 {
  406. err = errnoErr(e1)
  407. }
  408. return
  409. }
  410. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  411. func Chflags(path string, flags int) (err error) {
  412. var _p0 *byte
  413. _p0, err = BytePtrFromString(path)
  414. if err != nil {
  415. return
  416. }
  417. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  418. if e1 != 0 {
  419. err = errnoErr(e1)
  420. }
  421. return
  422. }
  423. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  424. func Chmod(path string, mode uint32) (err error) {
  425. var _p0 *byte
  426. _p0, err = BytePtrFromString(path)
  427. if err != nil {
  428. return
  429. }
  430. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  431. if e1 != 0 {
  432. err = errnoErr(e1)
  433. }
  434. return
  435. }
  436. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  437. func Chown(path string, uid int, gid int) (err error) {
  438. var _p0 *byte
  439. _p0, err = BytePtrFromString(path)
  440. if err != nil {
  441. return
  442. }
  443. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  444. if e1 != 0 {
  445. err = errnoErr(e1)
  446. }
  447. return
  448. }
  449. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  450. func Chroot(path string) (err error) {
  451. var _p0 *byte
  452. _p0, err = BytePtrFromString(path)
  453. if err != nil {
  454. return
  455. }
  456. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  457. if e1 != 0 {
  458. err = errnoErr(e1)
  459. }
  460. return
  461. }
  462. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  463. func Close(fd int) (err error) {
  464. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  465. if e1 != 0 {
  466. err = errnoErr(e1)
  467. }
  468. return
  469. }
  470. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  471. func Dup(fd int) (nfd int, err error) {
  472. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  473. nfd = int(r0)
  474. if e1 != 0 {
  475. err = errnoErr(e1)
  476. }
  477. return
  478. }
  479. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  480. func Dup2(from int, to int) (err error) {
  481. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  482. if e1 != 0 {
  483. err = errnoErr(e1)
  484. }
  485. return
  486. }
  487. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  488. func Exit(code int) {
  489. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  490. return
  491. }
  492. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  493. func Fchdir(fd int) (err error) {
  494. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  495. if e1 != 0 {
  496. err = errnoErr(e1)
  497. }
  498. return
  499. }
  500. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  501. func Fchflags(fd int, flags int) (err error) {
  502. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  503. if e1 != 0 {
  504. err = errnoErr(e1)
  505. }
  506. return
  507. }
  508. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  509. func Fchmod(fd int, mode uint32) (err error) {
  510. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  511. if e1 != 0 {
  512. err = errnoErr(e1)
  513. }
  514. return
  515. }
  516. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  517. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  518. var _p0 *byte
  519. _p0, err = BytePtrFromString(path)
  520. if err != nil {
  521. return
  522. }
  523. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  524. if e1 != 0 {
  525. err = errnoErr(e1)
  526. }
  527. return
  528. }
  529. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  530. func Fchown(fd int, uid int, gid int) (err error) {
  531. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  532. if e1 != 0 {
  533. err = errnoErr(e1)
  534. }
  535. return
  536. }
  537. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  538. func Flock(fd int, how int) (err error) {
  539. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  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 Fpathconf(fd int, name int) (val int, err error) {
  547. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  548. val = int(r0)
  549. if e1 != 0 {
  550. err = errnoErr(e1)
  551. }
  552. return
  553. }
  554. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  555. func Fstat(fd int, stat *Stat_t) (err error) {
  556. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  557. if e1 != 0 {
  558. err = errnoErr(e1)
  559. }
  560. return
  561. }
  562. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  563. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  564. var _p0 *byte
  565. _p0, err = BytePtrFromString(path)
  566. if err != nil {
  567. return
  568. }
  569. _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  570. if e1 != 0 {
  571. err = errnoErr(e1)
  572. }
  573. return
  574. }
  575. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  576. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  577. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  578. if e1 != 0 {
  579. err = errnoErr(e1)
  580. }
  581. return
  582. }
  583. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  584. func Fsync(fd int) (err error) {
  585. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  586. if e1 != 0 {
  587. err = errnoErr(e1)
  588. }
  589. return
  590. }
  591. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  592. func Ftruncate(fd int, length int64) (err error) {
  593. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
  594. if e1 != 0 {
  595. err = errnoErr(e1)
  596. }
  597. return
  598. }
  599. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  600. func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
  601. var _p0 unsafe.Pointer
  602. if len(buf) > 0 {
  603. _p0 = unsafe.Pointer(&buf[0])
  604. } else {
  605. _p0 = unsafe.Pointer(&_zero)
  606. }
  607. r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  608. n = int(r0)
  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 Getdtablesize() (size int) {
  616. r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
  617. size = int(r0)
  618. return
  619. }
  620. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  621. func Getegid() (egid int) {
  622. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  623. egid = int(r0)
  624. return
  625. }
  626. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  627. func Geteuid() (uid int) {
  628. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  629. uid = int(r0)
  630. return
  631. }
  632. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  633. func Getgid() (gid int) {
  634. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  635. gid = int(r0)
  636. return
  637. }
  638. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  639. func Getpgid(pid int) (pgid int, err error) {
  640. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  641. pgid = int(r0)
  642. if e1 != 0 {
  643. err = errnoErr(e1)
  644. }
  645. return
  646. }
  647. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  648. func Getpgrp() (pgrp int) {
  649. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  650. pgrp = int(r0)
  651. return
  652. }
  653. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  654. func Getpid() (pid int) {
  655. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  656. pid = int(r0)
  657. return
  658. }
  659. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  660. func Getppid() (ppid int) {
  661. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  662. ppid = int(r0)
  663. return
  664. }
  665. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  666. func Getpriority(which int, who int) (prio int, err error) {
  667. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  668. prio = int(r0)
  669. if e1 != 0 {
  670. err = errnoErr(e1)
  671. }
  672. return
  673. }
  674. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  675. func Getrlimit(which int, lim *Rlimit) (err error) {
  676. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  677. if e1 != 0 {
  678. err = errnoErr(e1)
  679. }
  680. return
  681. }
  682. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  683. func Getrusage(who int, rusage *Rusage) (err error) {
  684. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  685. if e1 != 0 {
  686. err = errnoErr(e1)
  687. }
  688. return
  689. }
  690. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  691. func Getsid(pid int) (sid int, err error) {
  692. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  693. sid = int(r0)
  694. if e1 != 0 {
  695. err = errnoErr(e1)
  696. }
  697. return
  698. }
  699. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  700. func Gettimeofday(tv *Timeval) (err error) {
  701. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  702. if e1 != 0 {
  703. err = errnoErr(e1)
  704. }
  705. return
  706. }
  707. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  708. func Getuid() (uid int) {
  709. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  710. uid = int(r0)
  711. return
  712. }
  713. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  714. func Issetugid() (tainted bool) {
  715. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  716. tainted = bool(r0 != 0)
  717. return
  718. }
  719. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  720. func Kill(pid int, signum syscall.Signal) (err error) {
  721. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  722. if e1 != 0 {
  723. err = errnoErr(e1)
  724. }
  725. return
  726. }
  727. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  728. func Kqueue() (fd int, err error) {
  729. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  730. fd = int(r0)
  731. if e1 != 0 {
  732. err = errnoErr(e1)
  733. }
  734. return
  735. }
  736. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  737. func Lchown(path string, uid int, gid int) (err error) {
  738. var _p0 *byte
  739. _p0, err = BytePtrFromString(path)
  740. if err != nil {
  741. return
  742. }
  743. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  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 Link(path string, link string) (err error) {
  751. var _p0 *byte
  752. _p0, err = BytePtrFromString(path)
  753. if err != nil {
  754. return
  755. }
  756. var _p1 *byte
  757. _p1, err = BytePtrFromString(link)
  758. if err != nil {
  759. return
  760. }
  761. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  762. if e1 != 0 {
  763. err = errnoErr(e1)
  764. }
  765. return
  766. }
  767. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  768. func Listen(s int, backlog int) (err error) {
  769. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  770. if e1 != 0 {
  771. err = errnoErr(e1)
  772. }
  773. return
  774. }
  775. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  776. func Lstat(path string, stat *Stat_t) (err error) {
  777. var _p0 *byte
  778. _p0, err = BytePtrFromString(path)
  779. if err != nil {
  780. return
  781. }
  782. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Mkdir(path string, mode uint32) (err error) {
  790. var _p0 *byte
  791. _p0, err = BytePtrFromString(path)
  792. if err != nil {
  793. return
  794. }
  795. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  796. if e1 != 0 {
  797. err = errnoErr(e1)
  798. }
  799. return
  800. }
  801. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  802. func Mkfifo(path string, mode uint32) (err error) {
  803. var _p0 *byte
  804. _p0, err = BytePtrFromString(path)
  805. if err != nil {
  806. return
  807. }
  808. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  809. if e1 != 0 {
  810. err = errnoErr(e1)
  811. }
  812. return
  813. }
  814. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  815. func Mknod(path string, mode uint32, dev int) (err error) {
  816. var _p0 *byte
  817. _p0, err = BytePtrFromString(path)
  818. if err != nil {
  819. return
  820. }
  821. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  822. if e1 != 0 {
  823. err = errnoErr(e1)
  824. }
  825. return
  826. }
  827. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  828. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  829. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 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 Open(path string, mode int, perm uint32) (fd int, err error) {
  837. var _p0 *byte
  838. _p0, err = BytePtrFromString(path)
  839. if err != nil {
  840. return
  841. }
  842. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  843. fd = int(r0)
  844. if e1 != 0 {
  845. err = errnoErr(e1)
  846. }
  847. return
  848. }
  849. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  850. func Pathconf(path string, name int) (val int, err error) {
  851. var _p0 *byte
  852. _p0, err = BytePtrFromString(path)
  853. if err != nil {
  854. return
  855. }
  856. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  857. val = int(r0)
  858. if e1 != 0 {
  859. err = errnoErr(e1)
  860. }
  861. return
  862. }
  863. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  864. func read(fd int, p []byte) (n int, err error) {
  865. var _p0 unsafe.Pointer
  866. if len(p) > 0 {
  867. _p0 = unsafe.Pointer(&p[0])
  868. } else {
  869. _p0 = unsafe.Pointer(&_zero)
  870. }
  871. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  872. n = int(r0)
  873. if e1 != 0 {
  874. err = errnoErr(e1)
  875. }
  876. return
  877. }
  878. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  879. func Readlink(path string, buf []byte) (n int, err error) {
  880. var _p0 *byte
  881. _p0, err = BytePtrFromString(path)
  882. if err != nil {
  883. return
  884. }
  885. var _p1 unsafe.Pointer
  886. if len(buf) > 0 {
  887. _p1 = unsafe.Pointer(&buf[0])
  888. } else {
  889. _p1 = unsafe.Pointer(&_zero)
  890. }
  891. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  892. n = int(r0)
  893. if e1 != 0 {
  894. err = errnoErr(e1)
  895. }
  896. return
  897. }
  898. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  899. func Rename(from string, to string) (err error) {
  900. var _p0 *byte
  901. _p0, err = BytePtrFromString(from)
  902. if err != nil {
  903. return
  904. }
  905. var _p1 *byte
  906. _p1, err = BytePtrFromString(to)
  907. if err != nil {
  908. return
  909. }
  910. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  911. if e1 != 0 {
  912. err = errnoErr(e1)
  913. }
  914. return
  915. }
  916. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  917. func Revoke(path string) (err error) {
  918. var _p0 *byte
  919. _p0, err = BytePtrFromString(path)
  920. if err != nil {
  921. return
  922. }
  923. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  924. if e1 != 0 {
  925. err = errnoErr(e1)
  926. }
  927. return
  928. }
  929. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  930. func Rmdir(path string) (err error) {
  931. var _p0 *byte
  932. _p0, err = BytePtrFromString(path)
  933. if err != nil {
  934. return
  935. }
  936. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 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 Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  944. r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
  945. newoffset = int64(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 Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  953. _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  954. if e1 != 0 {
  955. err = errnoErr(e1)
  956. }
  957. return
  958. }
  959. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  960. func Setegid(egid int) (err error) {
  961. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  962. if e1 != 0 {
  963. err = errnoErr(e1)
  964. }
  965. return
  966. }
  967. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  968. func Seteuid(euid int) (err error) {
  969. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  970. if e1 != 0 {
  971. err = errnoErr(e1)
  972. }
  973. return
  974. }
  975. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  976. func Setgid(gid int) (err error) {
  977. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  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 Setlogin(name string) (err error) {
  985. var _p0 *byte
  986. _p0, err = BytePtrFromString(name)
  987. if err != nil {
  988. return
  989. }
  990. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  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 Setpgid(pid int, pgid int) (err error) {
  998. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  999. if e1 != 0 {
  1000. err = errnoErr(e1)
  1001. }
  1002. return
  1003. }
  1004. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1005. func Setpriority(which int, who int, prio int) (err error) {
  1006. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1007. if e1 != 0 {
  1008. err = errnoErr(e1)
  1009. }
  1010. return
  1011. }
  1012. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1013. func Setregid(rgid int, egid int) (err error) {
  1014. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1015. if e1 != 0 {
  1016. err = errnoErr(e1)
  1017. }
  1018. return
  1019. }
  1020. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1021. func Setreuid(ruid int, euid int) (err error) {
  1022. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1023. if e1 != 0 {
  1024. err = errnoErr(e1)
  1025. }
  1026. return
  1027. }
  1028. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1029. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1030. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1031. if e1 != 0 {
  1032. err = errnoErr(e1)
  1033. }
  1034. return
  1035. }
  1036. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1037. func Setresuid(ruid int, euid int, suid int) (err error) {
  1038. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1039. if e1 != 0 {
  1040. err = errnoErr(e1)
  1041. }
  1042. return
  1043. }
  1044. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1045. func Setrlimit(which int, lim *Rlimit) (err error) {
  1046. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1047. if e1 != 0 {
  1048. err = errnoErr(e1)
  1049. }
  1050. return
  1051. }
  1052. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1053. func Setsid() (pid int, err error) {
  1054. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1055. pid = int(r0)
  1056. if e1 != 0 {
  1057. err = errnoErr(e1)
  1058. }
  1059. return
  1060. }
  1061. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1062. func Settimeofday(tp *Timeval) (err error) {
  1063. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1064. if e1 != 0 {
  1065. err = errnoErr(e1)
  1066. }
  1067. return
  1068. }
  1069. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1070. func Setuid(uid int) (err error) {
  1071. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1072. if e1 != 0 {
  1073. err = errnoErr(e1)
  1074. }
  1075. return
  1076. }
  1077. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1078. func Stat(path string, stat *Stat_t) (err error) {
  1079. var _p0 *byte
  1080. _p0, err = BytePtrFromString(path)
  1081. if err != nil {
  1082. return
  1083. }
  1084. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1085. if e1 != 0 {
  1086. err = errnoErr(e1)
  1087. }
  1088. return
  1089. }
  1090. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1091. func Statfs(path string, stat *Statfs_t) (err error) {
  1092. var _p0 *byte
  1093. _p0, err = BytePtrFromString(path)
  1094. if err != nil {
  1095. return
  1096. }
  1097. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1098. if e1 != 0 {
  1099. err = errnoErr(e1)
  1100. }
  1101. return
  1102. }
  1103. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1104. func Symlink(path string, link string) (err error) {
  1105. var _p0 *byte
  1106. _p0, err = BytePtrFromString(path)
  1107. if err != nil {
  1108. return
  1109. }
  1110. var _p1 *byte
  1111. _p1, err = BytePtrFromString(link)
  1112. if err != nil {
  1113. return
  1114. }
  1115. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1116. if e1 != 0 {
  1117. err = errnoErr(e1)
  1118. }
  1119. return
  1120. }
  1121. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1122. func Sync() (err error) {
  1123. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1124. if e1 != 0 {
  1125. err = errnoErr(e1)
  1126. }
  1127. return
  1128. }
  1129. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1130. func Truncate(path string, length int64) (err error) {
  1131. var _p0 *byte
  1132. _p0, err = BytePtrFromString(path)
  1133. if err != nil {
  1134. return
  1135. }
  1136. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
  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 Umask(newmask int) (oldmask int) {
  1144. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1145. oldmask = int(r0)
  1146. return
  1147. }
  1148. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1149. func Undelete(path string) (err error) {
  1150. var _p0 *byte
  1151. _p0, err = BytePtrFromString(path)
  1152. if err != nil {
  1153. return
  1154. }
  1155. _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1156. if e1 != 0 {
  1157. err = errnoErr(e1)
  1158. }
  1159. return
  1160. }
  1161. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1162. func Unlink(path string) (err error) {
  1163. var _p0 *byte
  1164. _p0, err = BytePtrFromString(path)
  1165. if err != nil {
  1166. return
  1167. }
  1168. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1169. if e1 != 0 {
  1170. err = errnoErr(e1)
  1171. }
  1172. return
  1173. }
  1174. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1175. func Unmount(path string, flags int) (err error) {
  1176. var _p0 *byte
  1177. _p0, err = BytePtrFromString(path)
  1178. if err != nil {
  1179. return
  1180. }
  1181. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1182. if e1 != 0 {
  1183. err = errnoErr(e1)
  1184. }
  1185. return
  1186. }
  1187. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1188. func write(fd int, p []byte) (n int, err error) {
  1189. var _p0 unsafe.Pointer
  1190. if len(p) > 0 {
  1191. _p0 = unsafe.Pointer(&p[0])
  1192. } else {
  1193. _p0 = unsafe.Pointer(&_zero)
  1194. }
  1195. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1196. n = int(r0)
  1197. if e1 != 0 {
  1198. err = errnoErr(e1)
  1199. }
  1200. return
  1201. }
  1202. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1203. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1204. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
  1205. ret = uintptr(r0)
  1206. if e1 != 0 {
  1207. err = errnoErr(e1)
  1208. }
  1209. return
  1210. }
  1211. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1212. func munmap(addr uintptr, length uintptr) (err error) {
  1213. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1214. if e1 != 0 {
  1215. err = errnoErr(e1)
  1216. }
  1217. return
  1218. }
  1219. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1220. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1221. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1222. n = int(r0)
  1223. if e1 != 0 {
  1224. err = errnoErr(e1)
  1225. }
  1226. return
  1227. }
  1228. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1229. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1230. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1231. n = int(r0)
  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 accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
  1239. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1240. nfd = int(r0)
  1241. if e1 != 0 {
  1242. err = errnoErr(e1)
  1243. }
  1244. return
  1245. }
  1246. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1247. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  1248. var _p0 *byte
  1249. _p0, err = BytePtrFromString(path)
  1250. if err != nil {
  1251. return
  1252. }
  1253. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  1254. if e1 != 0 {
  1255. err = errnoErr(e1)
  1256. }
  1257. return
  1258. }