zsyscall_freebsd_arm64.go 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026
  1. // go run mksyscall.go -tags freebsd,arm64 -- syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build freebsd,arm64
  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 utimes(path string, timeval *[2]Timeval) (err error) {
  176. var _p0 *byte
  177. _p0, err = BytePtrFromString(path)
  178. if err != nil {
  179. return
  180. }
  181. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  182. if e1 != 0 {
  183. err = errnoErr(e1)
  184. }
  185. return
  186. }
  187. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  188. func futimes(fd int, timeval *[2]Timeval) (err error) {
  189. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  190. if e1 != 0 {
  191. err = errnoErr(e1)
  192. }
  193. return
  194. }
  195. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  196. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  197. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  198. val = int(r0)
  199. if e1 != 0 {
  200. err = errnoErr(e1)
  201. }
  202. return
  203. }
  204. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  205. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  206. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  207. n = int(r0)
  208. if e1 != 0 {
  209. err = errnoErr(e1)
  210. }
  211. return
  212. }
  213. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  214. func Madvise(b []byte, behav int) (err error) {
  215. var _p0 unsafe.Pointer
  216. if len(b) > 0 {
  217. _p0 = unsafe.Pointer(&b[0])
  218. } else {
  219. _p0 = unsafe.Pointer(&_zero)
  220. }
  221. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
  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 Mlock(b []byte) (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_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  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 Mlockall(flags int) (err error) {
  243. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  244. if e1 != 0 {
  245. err = errnoErr(e1)
  246. }
  247. return
  248. }
  249. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  250. func Mprotect(b []byte, prot int) (err error) {
  251. var _p0 unsafe.Pointer
  252. if len(b) > 0 {
  253. _p0 = unsafe.Pointer(&b[0])
  254. } else {
  255. _p0 = unsafe.Pointer(&_zero)
  256. }
  257. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  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 Msync(b []byte, flags 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_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  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 Munlock(b []byte) (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_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  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 Munlockall() (err error) {
  293. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  294. if e1 != 0 {
  295. err = errnoErr(e1)
  296. }
  297. return
  298. }
  299. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  300. func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
  301. var _p0 unsafe.Pointer
  302. if len(mib) > 0 {
  303. _p0 = unsafe.Pointer(&mib[0])
  304. } else {
  305. _p0 = unsafe.Pointer(&_zero)
  306. }
  307. _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
  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 pipe2(p *[2]_C_int, flags int) (err error) {
  315. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 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 Getcwd(buf []byte) (n int, err error) {
  323. var _p0 unsafe.Pointer
  324. if len(buf) > 0 {
  325. _p0 = unsafe.Pointer(&buf[0])
  326. } else {
  327. _p0 = unsafe.Pointer(&_zero)
  328. }
  329. r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  330. n = int(r0)
  331. if e1 != 0 {
  332. err = errnoErr(e1)
  333. }
  334. return
  335. }
  336. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  337. func ioctl(fd int, req uint, arg uintptr) (err error) {
  338. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  339. if e1 != 0 {
  340. err = errnoErr(e1)
  341. }
  342. return
  343. }
  344. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  345. func ptrace(request int, pid int, addr uintptr, data int) (err error) {
  346. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  347. if e1 != 0 {
  348. err = errnoErr(e1)
  349. }
  350. return
  351. }
  352. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  353. func Access(path string, mode uint32) (err error) {
  354. var _p0 *byte
  355. _p0, err = BytePtrFromString(path)
  356. if err != nil {
  357. return
  358. }
  359. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  360. if e1 != 0 {
  361. err = errnoErr(e1)
  362. }
  363. return
  364. }
  365. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  366. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  367. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  368. if e1 != 0 {
  369. err = errnoErr(e1)
  370. }
  371. return
  372. }
  373. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  374. func CapEnter() (err error) {
  375. _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
  376. if e1 != 0 {
  377. err = errnoErr(e1)
  378. }
  379. return
  380. }
  381. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  382. func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
  383. _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
  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 capRightsLimit(fd int, rightsp *CapRights) (err error) {
  391. _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 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 ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  494. var _p0 *byte
  495. _p0, err = BytePtrFromString(attrname)
  496. if err != nil {
  497. return
  498. }
  499. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
  500. ret = int(r0)
  501. if e1 != 0 {
  502. err = errnoErr(e1)
  503. }
  504. return
  505. }
  506. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  507. func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  508. var _p0 *byte
  509. _p0, err = BytePtrFromString(attrname)
  510. if err != nil {
  511. return
  512. }
  513. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
  514. ret = int(r0)
  515. if e1 != 0 {
  516. err = errnoErr(e1)
  517. }
  518. return
  519. }
  520. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  521. func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
  522. var _p0 *byte
  523. _p0, err = BytePtrFromString(attrname)
  524. if err != nil {
  525. return
  526. }
  527. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
  528. if e1 != 0 {
  529. err = errnoErr(e1)
  530. }
  531. return
  532. }
  533. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  534. func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  535. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  536. ret = int(r0)
  537. if e1 != 0 {
  538. err = errnoErr(e1)
  539. }
  540. return
  541. }
  542. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  543. func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  544. var _p0 *byte
  545. _p0, err = BytePtrFromString(file)
  546. if err != nil {
  547. return
  548. }
  549. var _p1 *byte
  550. _p1, err = BytePtrFromString(attrname)
  551. if err != nil {
  552. return
  553. }
  554. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  555. ret = int(r0)
  556. if e1 != 0 {
  557. err = errnoErr(e1)
  558. }
  559. return
  560. }
  561. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  562. func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  563. var _p0 *byte
  564. _p0, err = BytePtrFromString(file)
  565. if err != nil {
  566. return
  567. }
  568. var _p1 *byte
  569. _p1, err = BytePtrFromString(attrname)
  570. if err != nil {
  571. return
  572. }
  573. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  574. ret = int(r0)
  575. if e1 != 0 {
  576. err = errnoErr(e1)
  577. }
  578. return
  579. }
  580. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  581. func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
  582. var _p0 *byte
  583. _p0, err = BytePtrFromString(file)
  584. if err != nil {
  585. return
  586. }
  587. var _p1 *byte
  588. _p1, err = BytePtrFromString(attrname)
  589. if err != nil {
  590. return
  591. }
  592. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
  593. if e1 != 0 {
  594. err = errnoErr(e1)
  595. }
  596. return
  597. }
  598. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  599. func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  600. var _p0 *byte
  601. _p0, err = BytePtrFromString(file)
  602. if err != nil {
  603. return
  604. }
  605. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  606. ret = int(r0)
  607. if e1 != 0 {
  608. err = errnoErr(e1)
  609. }
  610. return
  611. }
  612. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  613. func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  614. var _p0 *byte
  615. _p0, err = BytePtrFromString(link)
  616. if err != nil {
  617. return
  618. }
  619. var _p1 *byte
  620. _p1, err = BytePtrFromString(attrname)
  621. if err != nil {
  622. return
  623. }
  624. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  625. ret = int(r0)
  626. if e1 != 0 {
  627. err = errnoErr(e1)
  628. }
  629. return
  630. }
  631. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  632. func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  633. var _p0 *byte
  634. _p0, err = BytePtrFromString(link)
  635. if err != nil {
  636. return
  637. }
  638. var _p1 *byte
  639. _p1, err = BytePtrFromString(attrname)
  640. if err != nil {
  641. return
  642. }
  643. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  644. ret = int(r0)
  645. if e1 != 0 {
  646. err = errnoErr(e1)
  647. }
  648. return
  649. }
  650. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  651. func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
  652. var _p0 *byte
  653. _p0, err = BytePtrFromString(link)
  654. if err != nil {
  655. return
  656. }
  657. var _p1 *byte
  658. _p1, err = BytePtrFromString(attrname)
  659. if err != nil {
  660. return
  661. }
  662. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
  663. if e1 != 0 {
  664. err = errnoErr(e1)
  665. }
  666. return
  667. }
  668. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  669. func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  670. var _p0 *byte
  671. _p0, err = BytePtrFromString(link)
  672. if err != nil {
  673. return
  674. }
  675. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  676. ret = int(r0)
  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 Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  684. _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 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 Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  692. var _p0 *byte
  693. _p0, err = BytePtrFromString(path)
  694. if err != nil {
  695. return
  696. }
  697. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  698. if e1 != 0 {
  699. err = errnoErr(e1)
  700. }
  701. return
  702. }
  703. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  704. func Fchdir(fd int) (err error) {
  705. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  706. if e1 != 0 {
  707. err = errnoErr(e1)
  708. }
  709. return
  710. }
  711. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  712. func Fchflags(fd int, flags int) (err error) {
  713. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  714. if e1 != 0 {
  715. err = errnoErr(e1)
  716. }
  717. return
  718. }
  719. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  720. func Fchmod(fd int, mode uint32) (err error) {
  721. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 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 Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  729. var _p0 *byte
  730. _p0, err = BytePtrFromString(path)
  731. if err != nil {
  732. return
  733. }
  734. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  735. if e1 != 0 {
  736. err = errnoErr(e1)
  737. }
  738. return
  739. }
  740. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  741. func Fchown(fd int, uid int, gid int) (err error) {
  742. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  743. if e1 != 0 {
  744. err = errnoErr(e1)
  745. }
  746. return
  747. }
  748. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  749. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  750. var _p0 *byte
  751. _p0, err = BytePtrFromString(path)
  752. if err != nil {
  753. return
  754. }
  755. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  756. if e1 != 0 {
  757. err = errnoErr(e1)
  758. }
  759. return
  760. }
  761. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  762. func Flock(fd int, how int) (err error) {
  763. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  764. if e1 != 0 {
  765. err = errnoErr(e1)
  766. }
  767. return
  768. }
  769. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  770. func Fpathconf(fd int, name int) (val int, err error) {
  771. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  772. val = int(r0)
  773. if e1 != 0 {
  774. err = errnoErr(e1)
  775. }
  776. return
  777. }
  778. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  779. func fstat(fd int, stat *stat_freebsd11_t) (err error) {
  780. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  781. if e1 != 0 {
  782. err = errnoErr(e1)
  783. }
  784. return
  785. }
  786. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  787. func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
  788. _, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  789. if e1 != 0 {
  790. err = errnoErr(e1)
  791. }
  792. return
  793. }
  794. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  795. func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
  796. var _p0 *byte
  797. _p0, err = BytePtrFromString(path)
  798. if err != nil {
  799. return
  800. }
  801. _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  802. if e1 != 0 {
  803. err = errnoErr(e1)
  804. }
  805. return
  806. }
  807. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  808. func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
  809. var _p0 *byte
  810. _p0, err = BytePtrFromString(path)
  811. if err != nil {
  812. return
  813. }
  814. _, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  815. if e1 != 0 {
  816. err = errnoErr(e1)
  817. }
  818. return
  819. }
  820. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  821. func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
  822. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  823. if e1 != 0 {
  824. err = errnoErr(e1)
  825. }
  826. return
  827. }
  828. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  829. func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
  830. _, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  831. if e1 != 0 {
  832. err = errnoErr(e1)
  833. }
  834. return
  835. }
  836. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  837. func Fsync(fd int) (err error) {
  838. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  839. if e1 != 0 {
  840. err = errnoErr(e1)
  841. }
  842. return
  843. }
  844. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  845. func Ftruncate(fd int, length int64) (err error) {
  846. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  847. if e1 != 0 {
  848. err = errnoErr(e1)
  849. }
  850. return
  851. }
  852. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  853. func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
  854. var _p0 unsafe.Pointer
  855. if len(buf) > 0 {
  856. _p0 = unsafe.Pointer(&buf[0])
  857. } else {
  858. _p0 = unsafe.Pointer(&_zero)
  859. }
  860. r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  861. n = int(r0)
  862. if e1 != 0 {
  863. err = errnoErr(e1)
  864. }
  865. return
  866. }
  867. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  868. func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
  869. var _p0 unsafe.Pointer
  870. if len(buf) > 0 {
  871. _p0 = unsafe.Pointer(&buf[0])
  872. } else {
  873. _p0 = unsafe.Pointer(&_zero)
  874. }
  875. r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  876. n = int(r0)
  877. if e1 != 0 {
  878. err = errnoErr(e1)
  879. }
  880. return
  881. }
  882. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  883. func Getdtablesize() (size int) {
  884. r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
  885. size = int(r0)
  886. return
  887. }
  888. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  889. func Getegid() (egid int) {
  890. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  891. egid = int(r0)
  892. return
  893. }
  894. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  895. func Geteuid() (uid int) {
  896. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  897. uid = int(r0)
  898. return
  899. }
  900. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  901. func Getgid() (gid int) {
  902. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  903. gid = int(r0)
  904. return
  905. }
  906. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  907. func Getpgid(pid int) (pgid int, err error) {
  908. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  909. pgid = int(r0)
  910. if e1 != 0 {
  911. err = errnoErr(e1)
  912. }
  913. return
  914. }
  915. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  916. func Getpgrp() (pgrp int) {
  917. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  918. pgrp = int(r0)
  919. return
  920. }
  921. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  922. func Getpid() (pid int) {
  923. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  924. pid = int(r0)
  925. return
  926. }
  927. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  928. func Getppid() (ppid int) {
  929. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  930. ppid = int(r0)
  931. return
  932. }
  933. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  934. func Getpriority(which int, who int) (prio int, err error) {
  935. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  936. prio = int(r0)
  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 Getrlimit(which int, lim *Rlimit) (err error) {
  944. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  945. if e1 != 0 {
  946. err = errnoErr(e1)
  947. }
  948. return
  949. }
  950. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  951. func Getrusage(who int, rusage *Rusage) (err error) {
  952. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  953. if e1 != 0 {
  954. err = errnoErr(e1)
  955. }
  956. return
  957. }
  958. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  959. func Getsid(pid int) (sid int, err error) {
  960. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  961. sid = int(r0)
  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 Gettimeofday(tv *Timeval) (err error) {
  969. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 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 Getuid() (uid int) {
  977. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  978. uid = int(r0)
  979. return
  980. }
  981. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  982. func Issetugid() (tainted bool) {
  983. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  984. tainted = bool(r0 != 0)
  985. return
  986. }
  987. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  988. func Kill(pid int, signum syscall.Signal) (err error) {
  989. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  990. if e1 != 0 {
  991. err = errnoErr(e1)
  992. }
  993. return
  994. }
  995. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  996. func Kqueue() (fd int, err error) {
  997. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  998. fd = int(r0)
  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 Lchown(path string, uid int, gid int) (err error) {
  1006. var _p0 *byte
  1007. _p0, err = BytePtrFromString(path)
  1008. if err != nil {
  1009. return
  1010. }
  1011. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1012. if e1 != 0 {
  1013. err = errnoErr(e1)
  1014. }
  1015. return
  1016. }
  1017. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1018. func Link(path string, link string) (err error) {
  1019. var _p0 *byte
  1020. _p0, err = BytePtrFromString(path)
  1021. if err != nil {
  1022. return
  1023. }
  1024. var _p1 *byte
  1025. _p1, err = BytePtrFromString(link)
  1026. if err != nil {
  1027. return
  1028. }
  1029. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1030. if e1 != 0 {
  1031. err = errnoErr(e1)
  1032. }
  1033. return
  1034. }
  1035. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1036. func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  1037. var _p0 *byte
  1038. _p0, err = BytePtrFromString(path)
  1039. if err != nil {
  1040. return
  1041. }
  1042. var _p1 *byte
  1043. _p1, err = BytePtrFromString(link)
  1044. if err != nil {
  1045. return
  1046. }
  1047. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  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 Listen(s int, backlog int) (err error) {
  1055. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  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 lstat(path string, stat *stat_freebsd11_t) (err error) {
  1063. var _p0 *byte
  1064. _p0, err = BytePtrFromString(path)
  1065. if err != nil {
  1066. return
  1067. }
  1068. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1069. if e1 != 0 {
  1070. err = errnoErr(e1)
  1071. }
  1072. return
  1073. }
  1074. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1075. func Mkdir(path string, mode uint32) (err error) {
  1076. var _p0 *byte
  1077. _p0, err = BytePtrFromString(path)
  1078. if err != nil {
  1079. return
  1080. }
  1081. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1082. if e1 != 0 {
  1083. err = errnoErr(e1)
  1084. }
  1085. return
  1086. }
  1087. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1088. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  1089. var _p0 *byte
  1090. _p0, err = BytePtrFromString(path)
  1091. if err != nil {
  1092. return
  1093. }
  1094. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1095. if e1 != 0 {
  1096. err = errnoErr(e1)
  1097. }
  1098. return
  1099. }
  1100. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1101. func Mkfifo(path string, mode uint32) (err error) {
  1102. var _p0 *byte
  1103. _p0, err = BytePtrFromString(path)
  1104. if err != nil {
  1105. return
  1106. }
  1107. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1108. if e1 != 0 {
  1109. err = errnoErr(e1)
  1110. }
  1111. return
  1112. }
  1113. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1114. func mknod(path string, mode uint32, dev int) (err error) {
  1115. var _p0 *byte
  1116. _p0, err = BytePtrFromString(path)
  1117. if err != nil {
  1118. return
  1119. }
  1120. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  1121. if e1 != 0 {
  1122. err = errnoErr(e1)
  1123. }
  1124. return
  1125. }
  1126. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1127. func mknodat(fd int, path string, mode uint32, dev int) (err error) {
  1128. var _p0 *byte
  1129. _p0, err = BytePtrFromString(path)
  1130. if err != nil {
  1131. return
  1132. }
  1133. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  1134. if e1 != 0 {
  1135. err = errnoErr(e1)
  1136. }
  1137. return
  1138. }
  1139. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1140. func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
  1141. var _p0 *byte
  1142. _p0, err = BytePtrFromString(path)
  1143. if err != nil {
  1144. return
  1145. }
  1146. _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  1147. if e1 != 0 {
  1148. err = errnoErr(e1)
  1149. }
  1150. return
  1151. }
  1152. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1153. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1154. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  1155. if e1 != 0 {
  1156. err = errnoErr(e1)
  1157. }
  1158. return
  1159. }
  1160. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1161. func Open(path string, mode int, perm uint32) (fd int, err error) {
  1162. var _p0 *byte
  1163. _p0, err = BytePtrFromString(path)
  1164. if err != nil {
  1165. return
  1166. }
  1167. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  1168. fd = int(r0)
  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 Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {
  1176. var _p0 *byte
  1177. _p0, err = BytePtrFromString(path)
  1178. if err != nil {
  1179. return
  1180. }
  1181. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  1182. fd = int(r0)
  1183. if e1 != 0 {
  1184. err = errnoErr(e1)
  1185. }
  1186. return
  1187. }
  1188. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1189. func Pathconf(path string, name int) (val int, err error) {
  1190. var _p0 *byte
  1191. _p0, err = BytePtrFromString(path)
  1192. if err != nil {
  1193. return
  1194. }
  1195. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  1196. val = 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 Pread(fd int, p []byte, offset int64) (n int, err error) {
  1204. var _p0 unsafe.Pointer
  1205. if len(p) > 0 {
  1206. _p0 = unsafe.Pointer(&p[0])
  1207. } else {
  1208. _p0 = unsafe.Pointer(&_zero)
  1209. }
  1210. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1211. n = int(r0)
  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 Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1219. var _p0 unsafe.Pointer
  1220. if len(p) > 0 {
  1221. _p0 = unsafe.Pointer(&p[0])
  1222. } else {
  1223. _p0 = unsafe.Pointer(&_zero)
  1224. }
  1225. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1226. n = int(r0)
  1227. if e1 != 0 {
  1228. err = errnoErr(e1)
  1229. }
  1230. return
  1231. }
  1232. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1233. func read(fd int, p []byte) (n int, err error) {
  1234. var _p0 unsafe.Pointer
  1235. if len(p) > 0 {
  1236. _p0 = unsafe.Pointer(&p[0])
  1237. } else {
  1238. _p0 = unsafe.Pointer(&_zero)
  1239. }
  1240. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1241. n = int(r0)
  1242. if e1 != 0 {
  1243. err = errnoErr(e1)
  1244. }
  1245. return
  1246. }
  1247. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1248. func Readlink(path string, buf []byte) (n int, err error) {
  1249. var _p0 *byte
  1250. _p0, err = BytePtrFromString(path)
  1251. if err != nil {
  1252. return
  1253. }
  1254. var _p1 unsafe.Pointer
  1255. if len(buf) > 0 {
  1256. _p1 = unsafe.Pointer(&buf[0])
  1257. } else {
  1258. _p1 = unsafe.Pointer(&_zero)
  1259. }
  1260. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  1261. n = int(r0)
  1262. if e1 != 0 {
  1263. err = errnoErr(e1)
  1264. }
  1265. return
  1266. }
  1267. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1268. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  1269. var _p0 *byte
  1270. _p0, err = BytePtrFromString(path)
  1271. if err != nil {
  1272. return
  1273. }
  1274. var _p1 unsafe.Pointer
  1275. if len(buf) > 0 {
  1276. _p1 = unsafe.Pointer(&buf[0])
  1277. } else {
  1278. _p1 = unsafe.Pointer(&_zero)
  1279. }
  1280. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  1281. n = int(r0)
  1282. if e1 != 0 {
  1283. err = errnoErr(e1)
  1284. }
  1285. return
  1286. }
  1287. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1288. func Rename(from string, to string) (err error) {
  1289. var _p0 *byte
  1290. _p0, err = BytePtrFromString(from)
  1291. if err != nil {
  1292. return
  1293. }
  1294. var _p1 *byte
  1295. _p1, err = BytePtrFromString(to)
  1296. if err != nil {
  1297. return
  1298. }
  1299. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1300. if e1 != 0 {
  1301. err = errnoErr(e1)
  1302. }
  1303. return
  1304. }
  1305. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1306. func Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1307. var _p0 *byte
  1308. _p0, err = BytePtrFromString(from)
  1309. if err != nil {
  1310. return
  1311. }
  1312. var _p1 *byte
  1313. _p1, err = BytePtrFromString(to)
  1314. if err != nil {
  1315. return
  1316. }
  1317. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1318. if e1 != 0 {
  1319. err = errnoErr(e1)
  1320. }
  1321. return
  1322. }
  1323. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1324. func Revoke(path string) (err error) {
  1325. var _p0 *byte
  1326. _p0, err = BytePtrFromString(path)
  1327. if err != nil {
  1328. return
  1329. }
  1330. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1331. if e1 != 0 {
  1332. err = errnoErr(e1)
  1333. }
  1334. return
  1335. }
  1336. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1337. func Rmdir(path string) (err error) {
  1338. var _p0 *byte
  1339. _p0, err = BytePtrFromString(path)
  1340. if err != nil {
  1341. return
  1342. }
  1343. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1344. if e1 != 0 {
  1345. err = errnoErr(e1)
  1346. }
  1347. return
  1348. }
  1349. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1350. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1351. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1352. newoffset = int64(r0)
  1353. if e1 != 0 {
  1354. err = errnoErr(e1)
  1355. }
  1356. return
  1357. }
  1358. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1359. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1360. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1361. n = int(r0)
  1362. if e1 != 0 {
  1363. err = errnoErr(e1)
  1364. }
  1365. return
  1366. }
  1367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1368. func Setegid(egid int) (err error) {
  1369. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  1370. if e1 != 0 {
  1371. err = errnoErr(e1)
  1372. }
  1373. return
  1374. }
  1375. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1376. func Seteuid(euid int) (err error) {
  1377. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 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 Setgid(gid int) (err error) {
  1385. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  1386. if e1 != 0 {
  1387. err = errnoErr(e1)
  1388. }
  1389. return
  1390. }
  1391. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1392. func Setlogin(name string) (err error) {
  1393. var _p0 *byte
  1394. _p0, err = BytePtrFromString(name)
  1395. if err != nil {
  1396. return
  1397. }
  1398. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1399. if e1 != 0 {
  1400. err = errnoErr(e1)
  1401. }
  1402. return
  1403. }
  1404. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1405. func Setpgid(pid int, pgid int) (err error) {
  1406. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1407. if e1 != 0 {
  1408. err = errnoErr(e1)
  1409. }
  1410. return
  1411. }
  1412. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1413. func Setpriority(which int, who int, prio int) (err error) {
  1414. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1415. if e1 != 0 {
  1416. err = errnoErr(e1)
  1417. }
  1418. return
  1419. }
  1420. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1421. func Setregid(rgid int, egid int) (err error) {
  1422. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1423. if e1 != 0 {
  1424. err = errnoErr(e1)
  1425. }
  1426. return
  1427. }
  1428. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1429. func Setreuid(ruid int, euid int) (err error) {
  1430. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1431. if e1 != 0 {
  1432. err = errnoErr(e1)
  1433. }
  1434. return
  1435. }
  1436. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1437. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1438. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1439. if e1 != 0 {
  1440. err = errnoErr(e1)
  1441. }
  1442. return
  1443. }
  1444. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1445. func Setresuid(ruid int, euid int, suid int) (err error) {
  1446. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1447. if e1 != 0 {
  1448. err = errnoErr(e1)
  1449. }
  1450. return
  1451. }
  1452. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1453. func Setrlimit(which int, lim *Rlimit) (err error) {
  1454. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1455. if e1 != 0 {
  1456. err = errnoErr(e1)
  1457. }
  1458. return
  1459. }
  1460. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1461. func Setsid() (pid int, err error) {
  1462. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1463. pid = int(r0)
  1464. if e1 != 0 {
  1465. err = errnoErr(e1)
  1466. }
  1467. return
  1468. }
  1469. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1470. func Settimeofday(tp *Timeval) (err error) {
  1471. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1472. if e1 != 0 {
  1473. err = errnoErr(e1)
  1474. }
  1475. return
  1476. }
  1477. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1478. func Setuid(uid int) (err error) {
  1479. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1480. if e1 != 0 {
  1481. err = errnoErr(e1)
  1482. }
  1483. return
  1484. }
  1485. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1486. func stat(path string, stat *stat_freebsd11_t) (err error) {
  1487. var _p0 *byte
  1488. _p0, err = BytePtrFromString(path)
  1489. if err != nil {
  1490. return
  1491. }
  1492. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1493. if e1 != 0 {
  1494. err = errnoErr(e1)
  1495. }
  1496. return
  1497. }
  1498. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1499. func statfs(path string, stat *statfs_freebsd11_t) (err error) {
  1500. var _p0 *byte
  1501. _p0, err = BytePtrFromString(path)
  1502. if err != nil {
  1503. return
  1504. }
  1505. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1506. if e1 != 0 {
  1507. err = errnoErr(e1)
  1508. }
  1509. return
  1510. }
  1511. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1512. func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
  1513. var _p0 *byte
  1514. _p0, err = BytePtrFromString(path)
  1515. if err != nil {
  1516. return
  1517. }
  1518. _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1519. if e1 != 0 {
  1520. err = errnoErr(e1)
  1521. }
  1522. return
  1523. }
  1524. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1525. func Symlink(path string, link string) (err error) {
  1526. var _p0 *byte
  1527. _p0, err = BytePtrFromString(path)
  1528. if err != nil {
  1529. return
  1530. }
  1531. var _p1 *byte
  1532. _p1, err = BytePtrFromString(link)
  1533. if err != nil {
  1534. return
  1535. }
  1536. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1537. if e1 != 0 {
  1538. err = errnoErr(e1)
  1539. }
  1540. return
  1541. }
  1542. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1543. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1544. var _p0 *byte
  1545. _p0, err = BytePtrFromString(oldpath)
  1546. if err != nil {
  1547. return
  1548. }
  1549. var _p1 *byte
  1550. _p1, err = BytePtrFromString(newpath)
  1551. if err != nil {
  1552. return
  1553. }
  1554. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1555. if e1 != 0 {
  1556. err = errnoErr(e1)
  1557. }
  1558. return
  1559. }
  1560. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1561. func Sync() (err error) {
  1562. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1563. if e1 != 0 {
  1564. err = errnoErr(e1)
  1565. }
  1566. return
  1567. }
  1568. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1569. func Truncate(path string, length int64) (err error) {
  1570. var _p0 *byte
  1571. _p0, err = BytePtrFromString(path)
  1572. if err != nil {
  1573. return
  1574. }
  1575. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1576. if e1 != 0 {
  1577. err = errnoErr(e1)
  1578. }
  1579. return
  1580. }
  1581. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1582. func Umask(newmask int) (oldmask int) {
  1583. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1584. oldmask = int(r0)
  1585. return
  1586. }
  1587. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1588. func Undelete(path string) (err error) {
  1589. var _p0 *byte
  1590. _p0, err = BytePtrFromString(path)
  1591. if err != nil {
  1592. return
  1593. }
  1594. _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1595. if e1 != 0 {
  1596. err = errnoErr(e1)
  1597. }
  1598. return
  1599. }
  1600. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1601. func Unlink(path string) (err error) {
  1602. var _p0 *byte
  1603. _p0, err = BytePtrFromString(path)
  1604. if err != nil {
  1605. return
  1606. }
  1607. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1608. if e1 != 0 {
  1609. err = errnoErr(e1)
  1610. }
  1611. return
  1612. }
  1613. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1614. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1615. var _p0 *byte
  1616. _p0, err = BytePtrFromString(path)
  1617. if err != nil {
  1618. return
  1619. }
  1620. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1621. if e1 != 0 {
  1622. err = errnoErr(e1)
  1623. }
  1624. return
  1625. }
  1626. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1627. func Unmount(path string, flags int) (err error) {
  1628. var _p0 *byte
  1629. _p0, err = BytePtrFromString(path)
  1630. if err != nil {
  1631. return
  1632. }
  1633. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1634. if e1 != 0 {
  1635. err = errnoErr(e1)
  1636. }
  1637. return
  1638. }
  1639. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1640. func write(fd int, p []byte) (n int, err error) {
  1641. var _p0 unsafe.Pointer
  1642. if len(p) > 0 {
  1643. _p0 = unsafe.Pointer(&p[0])
  1644. } else {
  1645. _p0 = unsafe.Pointer(&_zero)
  1646. }
  1647. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1648. n = int(r0)
  1649. if e1 != 0 {
  1650. err = errnoErr(e1)
  1651. }
  1652. return
  1653. }
  1654. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1655. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1656. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
  1657. ret = uintptr(r0)
  1658. if e1 != 0 {
  1659. err = errnoErr(e1)
  1660. }
  1661. return
  1662. }
  1663. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1664. func munmap(addr uintptr, length uintptr) (err error) {
  1665. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1666. if e1 != 0 {
  1667. err = errnoErr(e1)
  1668. }
  1669. return
  1670. }
  1671. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1672. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1673. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1674. n = int(r0)
  1675. if e1 != 0 {
  1676. err = errnoErr(e1)
  1677. }
  1678. return
  1679. }
  1680. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1681. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1682. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1683. n = int(r0)
  1684. if e1 != 0 {
  1685. err = errnoErr(e1)
  1686. }
  1687. return
  1688. }
  1689. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1690. func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
  1691. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1692. nfd = int(r0)
  1693. if e1 != 0 {
  1694. err = errnoErr(e1)
  1695. }
  1696. return
  1697. }
  1698. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1699. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  1700. var _p0 *byte
  1701. _p0, err = BytePtrFromString(path)
  1702. if err != nil {
  1703. return
  1704. }
  1705. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  1706. if e1 != 0 {
  1707. err = errnoErr(e1)
  1708. }
  1709. return
  1710. }