zsyscall_solaris_amd64.go 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588
  1. // mksyscall_solaris.pl -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build solaris,amd64
  4. package unix
  5. import (
  6. "syscall"
  7. "unsafe"
  8. )
  9. //go:cgo_import_dynamic libc_pipe pipe "libc.so"
  10. //go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
  11. //go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
  12. //go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
  13. //go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
  14. //go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
  15. //go:cgo_import_dynamic libc_gethostname gethostname "libc.so"
  16. //go:cgo_import_dynamic libc_utimes utimes "libc.so"
  17. //go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
  18. //go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
  19. //go:cgo_import_dynamic libc_futimesat futimesat "libc.so"
  20. //go:cgo_import_dynamic libc_accept accept "libsocket.so"
  21. //go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so"
  22. //go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so"
  23. //go:cgo_import_dynamic libc_acct acct "libc.so"
  24. //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
  25. //go:cgo_import_dynamic libc_access access "libc.so"
  26. //go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
  27. //go:cgo_import_dynamic libc_chdir chdir "libc.so"
  28. //go:cgo_import_dynamic libc_chmod chmod "libc.so"
  29. //go:cgo_import_dynamic libc_chown chown "libc.so"
  30. //go:cgo_import_dynamic libc_chroot chroot "libc.so"
  31. //go:cgo_import_dynamic libc_close close "libc.so"
  32. //go:cgo_import_dynamic libc_creat creat "libc.so"
  33. //go:cgo_import_dynamic libc_dup dup "libc.so"
  34. //go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
  35. //go:cgo_import_dynamic libc_exit exit "libc.so"
  36. //go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
  37. //go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
  38. //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
  39. //go:cgo_import_dynamic libc_fchown fchown "libc.so"
  40. //go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
  41. //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so"
  42. //go:cgo_import_dynamic libc_flock flock "libc.so"
  43. //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
  44. //go:cgo_import_dynamic libc_fstat fstat "libc.so"
  45. //go:cgo_import_dynamic libc_fstatvfs fstatvfs "libc.so"
  46. //go:cgo_import_dynamic libc_getdents getdents "libc.so"
  47. //go:cgo_import_dynamic libc_getgid getgid "libc.so"
  48. //go:cgo_import_dynamic libc_getpid getpid "libc.so"
  49. //go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
  50. //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
  51. //go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
  52. //go:cgo_import_dynamic libc_getegid getegid "libc.so"
  53. //go:cgo_import_dynamic libc_getppid getppid "libc.so"
  54. //go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
  55. //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
  56. //go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
  57. //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
  58. //go:cgo_import_dynamic libc_getuid getuid "libc.so"
  59. //go:cgo_import_dynamic libc_kill kill "libc.so"
  60. //go:cgo_import_dynamic libc_lchown lchown "libc.so"
  61. //go:cgo_import_dynamic libc_link link "libc.so"
  62. //go:cgo_import_dynamic libc___xnet_llisten __xnet_llisten "libsocket.so"
  63. //go:cgo_import_dynamic libc_lstat lstat "libc.so"
  64. //go:cgo_import_dynamic libc_madvise madvise "libc.so"
  65. //go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
  66. //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
  67. //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
  68. //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
  69. //go:cgo_import_dynamic libc_mknod mknod "libc.so"
  70. //go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
  71. //go:cgo_import_dynamic libc_mlock mlock "libc.so"
  72. //go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
  73. //go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
  74. //go:cgo_import_dynamic libc_munlock munlock "libc.so"
  75. //go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
  76. //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
  77. //go:cgo_import_dynamic libc_open open "libc.so"
  78. //go:cgo_import_dynamic libc_openat openat "libc.so"
  79. //go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
  80. //go:cgo_import_dynamic libc_pause pause "libc.so"
  81. //go:cgo_import_dynamic libc_pread pread "libc.so"
  82. //go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
  83. //go:cgo_import_dynamic libc_read read "libc.so"
  84. //go:cgo_import_dynamic libc_readlink readlink "libc.so"
  85. //go:cgo_import_dynamic libc_rename rename "libc.so"
  86. //go:cgo_import_dynamic libc_renameat renameat "libc.so"
  87. //go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
  88. //go:cgo_import_dynamic libc_lseek lseek "libc.so"
  89. //go:cgo_import_dynamic libc_setegid setegid "libc.so"
  90. //go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
  91. //go:cgo_import_dynamic libc_setgid setgid "libc.so"
  92. //go:cgo_import_dynamic libc_sethostname sethostname "libc.so"
  93. //go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
  94. //go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
  95. //go:cgo_import_dynamic libc_setregid setregid "libc.so"
  96. //go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
  97. //go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
  98. //go:cgo_import_dynamic libc_setsid setsid "libc.so"
  99. //go:cgo_import_dynamic libc_setuid setuid "libc.so"
  100. //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so"
  101. //go:cgo_import_dynamic libc_stat stat "libc.so"
  102. //go:cgo_import_dynamic libc_statvfs statvfs "libc.so"
  103. //go:cgo_import_dynamic libc_symlink symlink "libc.so"
  104. //go:cgo_import_dynamic libc_sync sync "libc.so"
  105. //go:cgo_import_dynamic libc_times times "libc.so"
  106. //go:cgo_import_dynamic libc_truncate truncate "libc.so"
  107. //go:cgo_import_dynamic libc_fsync fsync "libc.so"
  108. //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
  109. //go:cgo_import_dynamic libc_umask umask "libc.so"
  110. //go:cgo_import_dynamic libc_uname uname "libc.so"
  111. //go:cgo_import_dynamic libc_umount umount "libc.so"
  112. //go:cgo_import_dynamic libc_unlink unlink "libc.so"
  113. //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
  114. //go:cgo_import_dynamic libc_ustat ustat "libc.so"
  115. //go:cgo_import_dynamic libc_utime utime "libc.so"
  116. //go:cgo_import_dynamic libc___xnet_bind __xnet_bind "libsocket.so"
  117. //go:cgo_import_dynamic libc___xnet_connect __xnet_connect "libsocket.so"
  118. //go:cgo_import_dynamic libc_mmap mmap "libc.so"
  119. //go:cgo_import_dynamic libc_munmap munmap "libc.so"
  120. //go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto "libsocket.so"
  121. //go:cgo_import_dynamic libc___xnet_socket __xnet_socket "libsocket.so"
  122. //go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair "libsocket.so"
  123. //go:cgo_import_dynamic libc_write write "libc.so"
  124. //go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
  125. //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
  126. //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
  127. //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
  128. //go:linkname procpipe libc_pipe
  129. //go:linkname procgetsockname libc_getsockname
  130. //go:linkname procGetcwd libc_getcwd
  131. //go:linkname procgetgroups libc_getgroups
  132. //go:linkname procsetgroups libc_setgroups
  133. //go:linkname procwait4 libc_wait4
  134. //go:linkname procgethostname libc_gethostname
  135. //go:linkname procutimes libc_utimes
  136. //go:linkname procutimensat libc_utimensat
  137. //go:linkname procfcntl libc_fcntl
  138. //go:linkname procfutimesat libc_futimesat
  139. //go:linkname procaccept libc_accept
  140. //go:linkname proc__xnet_recvmsg libc___xnet_recvmsg
  141. //go:linkname proc__xnet_sendmsg libc___xnet_sendmsg
  142. //go:linkname procacct libc_acct
  143. //go:linkname procioctl libc_ioctl
  144. //go:linkname procAccess libc_access
  145. //go:linkname procAdjtime libc_adjtime
  146. //go:linkname procChdir libc_chdir
  147. //go:linkname procChmod libc_chmod
  148. //go:linkname procChown libc_chown
  149. //go:linkname procChroot libc_chroot
  150. //go:linkname procClose libc_close
  151. //go:linkname procCreat libc_creat
  152. //go:linkname procDup libc_dup
  153. //go:linkname procDup2 libc_dup2
  154. //go:linkname procExit libc_exit
  155. //go:linkname procFchdir libc_fchdir
  156. //go:linkname procFchmod libc_fchmod
  157. //go:linkname procFchmodat libc_fchmodat
  158. //go:linkname procFchown libc_fchown
  159. //go:linkname procFchownat libc_fchownat
  160. //go:linkname procFdatasync libc_fdatasync
  161. //go:linkname procFlock libc_flock
  162. //go:linkname procFpathconf libc_fpathconf
  163. //go:linkname procFstat libc_fstat
  164. //go:linkname procFstatvfs libc_fstatvfs
  165. //go:linkname procGetdents libc_getdents
  166. //go:linkname procGetgid libc_getgid
  167. //go:linkname procGetpid libc_getpid
  168. //go:linkname procGetpgid libc_getpgid
  169. //go:linkname procGetpgrp libc_getpgrp
  170. //go:linkname procGeteuid libc_geteuid
  171. //go:linkname procGetegid libc_getegid
  172. //go:linkname procGetppid libc_getppid
  173. //go:linkname procGetpriority libc_getpriority
  174. //go:linkname procGetrlimit libc_getrlimit
  175. //go:linkname procGetrusage libc_getrusage
  176. //go:linkname procGettimeofday libc_gettimeofday
  177. //go:linkname procGetuid libc_getuid
  178. //go:linkname procKill libc_kill
  179. //go:linkname procLchown libc_lchown
  180. //go:linkname procLink libc_link
  181. //go:linkname proc__xnet_llisten libc___xnet_llisten
  182. //go:linkname procLstat libc_lstat
  183. //go:linkname procMadvise libc_madvise
  184. //go:linkname procMkdir libc_mkdir
  185. //go:linkname procMkdirat libc_mkdirat
  186. //go:linkname procMkfifo libc_mkfifo
  187. //go:linkname procMkfifoat libc_mkfifoat
  188. //go:linkname procMknod libc_mknod
  189. //go:linkname procMknodat libc_mknodat
  190. //go:linkname procMlock libc_mlock
  191. //go:linkname procMlockall libc_mlockall
  192. //go:linkname procMprotect libc_mprotect
  193. //go:linkname procMunlock libc_munlock
  194. //go:linkname procMunlockall libc_munlockall
  195. //go:linkname procNanosleep libc_nanosleep
  196. //go:linkname procOpen libc_open
  197. //go:linkname procOpenat libc_openat
  198. //go:linkname procPathconf libc_pathconf
  199. //go:linkname procPause libc_pause
  200. //go:linkname procPread libc_pread
  201. //go:linkname procPwrite libc_pwrite
  202. //go:linkname procread libc_read
  203. //go:linkname procReadlink libc_readlink
  204. //go:linkname procRename libc_rename
  205. //go:linkname procRenameat libc_renameat
  206. //go:linkname procRmdir libc_rmdir
  207. //go:linkname proclseek libc_lseek
  208. //go:linkname procSetegid libc_setegid
  209. //go:linkname procSeteuid libc_seteuid
  210. //go:linkname procSetgid libc_setgid
  211. //go:linkname procSethostname libc_sethostname
  212. //go:linkname procSetpgid libc_setpgid
  213. //go:linkname procSetpriority libc_setpriority
  214. //go:linkname procSetregid libc_setregid
  215. //go:linkname procSetreuid libc_setreuid
  216. //go:linkname procSetrlimit libc_setrlimit
  217. //go:linkname procSetsid libc_setsid
  218. //go:linkname procSetuid libc_setuid
  219. //go:linkname procshutdown libc_shutdown
  220. //go:linkname procStat libc_stat
  221. //go:linkname procStatvfs libc_statvfs
  222. //go:linkname procSymlink libc_symlink
  223. //go:linkname procSync libc_sync
  224. //go:linkname procTimes libc_times
  225. //go:linkname procTruncate libc_truncate
  226. //go:linkname procFsync libc_fsync
  227. //go:linkname procFtruncate libc_ftruncate
  228. //go:linkname procUmask libc_umask
  229. //go:linkname procUname libc_uname
  230. //go:linkname procumount libc_umount
  231. //go:linkname procUnlink libc_unlink
  232. //go:linkname procUnlinkat libc_unlinkat
  233. //go:linkname procUstat libc_ustat
  234. //go:linkname procUtime libc_utime
  235. //go:linkname proc__xnet_bind libc___xnet_bind
  236. //go:linkname proc__xnet_connect libc___xnet_connect
  237. //go:linkname procmmap libc_mmap
  238. //go:linkname procmunmap libc_munmap
  239. //go:linkname proc__xnet_sendto libc___xnet_sendto
  240. //go:linkname proc__xnet_socket libc___xnet_socket
  241. //go:linkname proc__xnet_socketpair libc___xnet_socketpair
  242. //go:linkname procwrite libc_write
  243. //go:linkname proc__xnet_getsockopt libc___xnet_getsockopt
  244. //go:linkname procgetpeername libc_getpeername
  245. //go:linkname procsetsockopt libc_setsockopt
  246. //go:linkname procrecvfrom libc_recvfrom
  247. var (
  248. procpipe,
  249. procgetsockname,
  250. procGetcwd,
  251. procgetgroups,
  252. procsetgroups,
  253. procwait4,
  254. procgethostname,
  255. procutimes,
  256. procutimensat,
  257. procfcntl,
  258. procfutimesat,
  259. procaccept,
  260. proc__xnet_recvmsg,
  261. proc__xnet_sendmsg,
  262. procacct,
  263. procioctl,
  264. procAccess,
  265. procAdjtime,
  266. procChdir,
  267. procChmod,
  268. procChown,
  269. procChroot,
  270. procClose,
  271. procCreat,
  272. procDup,
  273. procDup2,
  274. procExit,
  275. procFchdir,
  276. procFchmod,
  277. procFchmodat,
  278. procFchown,
  279. procFchownat,
  280. procFdatasync,
  281. procFlock,
  282. procFpathconf,
  283. procFstat,
  284. procFstatvfs,
  285. procGetdents,
  286. procGetgid,
  287. procGetpid,
  288. procGetpgid,
  289. procGetpgrp,
  290. procGeteuid,
  291. procGetegid,
  292. procGetppid,
  293. procGetpriority,
  294. procGetrlimit,
  295. procGetrusage,
  296. procGettimeofday,
  297. procGetuid,
  298. procKill,
  299. procLchown,
  300. procLink,
  301. proc__xnet_llisten,
  302. procLstat,
  303. procMadvise,
  304. procMkdir,
  305. procMkdirat,
  306. procMkfifo,
  307. procMkfifoat,
  308. procMknod,
  309. procMknodat,
  310. procMlock,
  311. procMlockall,
  312. procMprotect,
  313. procMunlock,
  314. procMunlockall,
  315. procNanosleep,
  316. procOpen,
  317. procOpenat,
  318. procPathconf,
  319. procPause,
  320. procPread,
  321. procPwrite,
  322. procread,
  323. procReadlink,
  324. procRename,
  325. procRenameat,
  326. procRmdir,
  327. proclseek,
  328. procSetegid,
  329. procSeteuid,
  330. procSetgid,
  331. procSethostname,
  332. procSetpgid,
  333. procSetpriority,
  334. procSetregid,
  335. procSetreuid,
  336. procSetrlimit,
  337. procSetsid,
  338. procSetuid,
  339. procshutdown,
  340. procStat,
  341. procStatvfs,
  342. procSymlink,
  343. procSync,
  344. procTimes,
  345. procTruncate,
  346. procFsync,
  347. procFtruncate,
  348. procUmask,
  349. procUname,
  350. procumount,
  351. procUnlink,
  352. procUnlinkat,
  353. procUstat,
  354. procUtime,
  355. proc__xnet_bind,
  356. proc__xnet_connect,
  357. procmmap,
  358. procmunmap,
  359. proc__xnet_sendto,
  360. proc__xnet_socket,
  361. proc__xnet_socketpair,
  362. procwrite,
  363. proc__xnet_getsockopt,
  364. procgetpeername,
  365. procsetsockopt,
  366. procrecvfrom syscallFunc
  367. )
  368. func pipe(p *[2]_C_int) (n int, err error) {
  369. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)
  370. n = int(r0)
  371. if e1 != 0 {
  372. err = e1
  373. }
  374. return
  375. }
  376. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  377. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  378. if e1 != 0 {
  379. err = e1
  380. }
  381. return
  382. }
  383. func Getcwd(buf []byte) (n int, err error) {
  384. var _p0 *byte
  385. if len(buf) > 0 {
  386. _p0 = &buf[0]
  387. }
  388. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
  389. n = int(r0)
  390. if e1 != 0 {
  391. err = e1
  392. }
  393. return
  394. }
  395. func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
  396. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
  397. n = int(r0)
  398. if e1 != 0 {
  399. err = e1
  400. }
  401. return
  402. }
  403. func setgroups(ngid int, gid *_Gid_t) (err error) {
  404. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
  405. if e1 != 0 {
  406. err = e1
  407. }
  408. return
  409. }
  410. func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) {
  411. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  412. wpid = int32(r0)
  413. if e1 != 0 {
  414. err = e1
  415. }
  416. return
  417. }
  418. func gethostname(buf []byte) (n int, err error) {
  419. var _p0 *byte
  420. if len(buf) > 0 {
  421. _p0 = &buf[0]
  422. }
  423. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
  424. n = int(r0)
  425. if e1 != 0 {
  426. err = e1
  427. }
  428. return
  429. }
  430. func utimes(path string, times *[2]Timeval) (err error) {
  431. var _p0 *byte
  432. _p0, err = BytePtrFromString(path)
  433. if err != nil {
  434. return
  435. }
  436. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)
  437. if e1 != 0 {
  438. err = e1
  439. }
  440. return
  441. }
  442. func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) {
  443. var _p0 *byte
  444. _p0, err = BytePtrFromString(path)
  445. if err != nil {
  446. return
  447. }
  448. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
  449. if e1 != 0 {
  450. err = e1
  451. }
  452. return
  453. }
  454. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  455. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
  456. val = int(r0)
  457. if e1 != 0 {
  458. err = e1
  459. }
  460. return
  461. }
  462. func futimesat(fildes int, path *byte, times *[2]Timeval) (err error) {
  463. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0)
  464. if e1 != 0 {
  465. err = e1
  466. }
  467. return
  468. }
  469. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  470. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  471. fd = int(r0)
  472. if e1 != 0 {
  473. err = e1
  474. }
  475. return
  476. }
  477. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  478. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
  479. n = int(r0)
  480. if e1 != 0 {
  481. err = e1
  482. }
  483. return
  484. }
  485. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  486. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
  487. n = int(r0)
  488. if e1 != 0 {
  489. err = e1
  490. }
  491. return
  492. }
  493. func acct(path *byte) (err error) {
  494. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0)
  495. if e1 != 0 {
  496. err = e1
  497. }
  498. return
  499. }
  500. func ioctl(fd int, req uint, arg uintptr) (err error) {
  501. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
  502. if e1 != 0 {
  503. err = e1
  504. }
  505. return
  506. }
  507. func Access(path string, mode uint32) (err error) {
  508. var _p0 *byte
  509. _p0, err = BytePtrFromString(path)
  510. if err != nil {
  511. return
  512. }
  513. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  514. if e1 != 0 {
  515. err = e1
  516. }
  517. return
  518. }
  519. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  520. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)
  521. if e1 != 0 {
  522. err = e1
  523. }
  524. return
  525. }
  526. func Chdir(path string) (err error) {
  527. var _p0 *byte
  528. _p0, err = BytePtrFromString(path)
  529. if err != nil {
  530. return
  531. }
  532. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  533. if e1 != 0 {
  534. err = e1
  535. }
  536. return
  537. }
  538. func Chmod(path string, mode uint32) (err error) {
  539. var _p0 *byte
  540. _p0, err = BytePtrFromString(path)
  541. if err != nil {
  542. return
  543. }
  544. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  545. if e1 != 0 {
  546. err = e1
  547. }
  548. return
  549. }
  550. func Chown(path string, uid int, gid int) (err error) {
  551. var _p0 *byte
  552. _p0, err = BytePtrFromString(path)
  553. if err != nil {
  554. return
  555. }
  556. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
  557. if e1 != 0 {
  558. err = e1
  559. }
  560. return
  561. }
  562. func Chroot(path string) (err error) {
  563. var _p0 *byte
  564. _p0, err = BytePtrFromString(path)
  565. if err != nil {
  566. return
  567. }
  568. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  569. if e1 != 0 {
  570. err = e1
  571. }
  572. return
  573. }
  574. func Close(fd int) (err error) {
  575. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  576. if e1 != 0 {
  577. err = e1
  578. }
  579. return
  580. }
  581. func Creat(path string, mode uint32) (fd int, err error) {
  582. var _p0 *byte
  583. _p0, err = BytePtrFromString(path)
  584. if err != nil {
  585. return
  586. }
  587. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  588. fd = int(r0)
  589. if e1 != 0 {
  590. err = e1
  591. }
  592. return
  593. }
  594. func Dup(fd int) (nfd int, err error) {
  595. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  596. nfd = int(r0)
  597. if e1 != 0 {
  598. err = e1
  599. }
  600. return
  601. }
  602. func Dup2(oldfd int, newfd int) (err error) {
  603. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)
  604. if e1 != 0 {
  605. err = e1
  606. }
  607. return
  608. }
  609. func Exit(code int) {
  610. sysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 0, 0)
  611. return
  612. }
  613. func Fchdir(fd int) (err error) {
  614. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  615. if e1 != 0 {
  616. err = e1
  617. }
  618. return
  619. }
  620. func Fchmod(fd int, mode uint32) (err error) {
  621. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
  622. if e1 != 0 {
  623. err = e1
  624. }
  625. return
  626. }
  627. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  628. var _p0 *byte
  629. _p0, err = BytePtrFromString(path)
  630. if err != nil {
  631. return
  632. }
  633. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  634. if e1 != 0 {
  635. err = e1
  636. }
  637. return
  638. }
  639. func Fchown(fd int, uid int, gid int) (err error) {
  640. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
  641. if e1 != 0 {
  642. err = e1
  643. }
  644. return
  645. }
  646. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  647. var _p0 *byte
  648. _p0, err = BytePtrFromString(path)
  649. if err != nil {
  650. return
  651. }
  652. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  653. if e1 != 0 {
  654. err = e1
  655. }
  656. return
  657. }
  658. func Fdatasync(fd int) (err error) {
  659. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  660. if e1 != 0 {
  661. err = e1
  662. }
  663. return
  664. }
  665. func Flock(fd int, how int) (err error) {
  666. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0)
  667. if e1 != 0 {
  668. err = e1
  669. }
  670. return
  671. }
  672. func Fpathconf(fd int, name int) (val int, err error) {
  673. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
  674. val = int(r0)
  675. if e1 != 0 {
  676. err = e1
  677. }
  678. return
  679. }
  680. func Fstat(fd int, stat *Stat_t) (err error) {
  681. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
  682. if e1 != 0 {
  683. err = e1
  684. }
  685. return
  686. }
  687. func Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) {
  688. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatvfs)), 2, uintptr(fd), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
  689. if e1 != 0 {
  690. err = e1
  691. }
  692. return
  693. }
  694. func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
  695. var _p0 *byte
  696. if len(buf) > 0 {
  697. _p0 = &buf[0]
  698. }
  699. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  700. n = int(r0)
  701. if e1 != 0 {
  702. err = e1
  703. }
  704. return
  705. }
  706. func Getgid() (gid int) {
  707. r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0)
  708. gid = int(r0)
  709. return
  710. }
  711. func Getpid() (pid int) {
  712. r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0)
  713. pid = int(r0)
  714. return
  715. }
  716. func Getpgid(pid int) (pgid int, err error) {
  717. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
  718. pgid = int(r0)
  719. if e1 != 0 {
  720. err = e1
  721. }
  722. return
  723. }
  724. func Getpgrp() (pgid int, err error) {
  725. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0)
  726. pgid = int(r0)
  727. if e1 != 0 {
  728. err = e1
  729. }
  730. return
  731. }
  732. func Geteuid() (euid int) {
  733. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0)
  734. euid = int(r0)
  735. return
  736. }
  737. func Getegid() (egid int) {
  738. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0)
  739. egid = int(r0)
  740. return
  741. }
  742. func Getppid() (ppid int) {
  743. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 0, 0, 0)
  744. ppid = int(r0)
  745. return
  746. }
  747. func Getpriority(which int, who int) (n int, err error) {
  748. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
  749. n = int(r0)
  750. if e1 != 0 {
  751. err = e1
  752. }
  753. return
  754. }
  755. func Getrlimit(which int, lim *Rlimit) (err error) {
  756. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
  757. if e1 != 0 {
  758. err = e1
  759. }
  760. return
  761. }
  762. func Getrusage(who int, rusage *Rusage) (err error) {
  763. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0)
  764. if e1 != 0 {
  765. err = e1
  766. }
  767. return
  768. }
  769. func Gettimeofday(tv *Timeval) (err error) {
  770. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
  771. if e1 != 0 {
  772. err = e1
  773. }
  774. return
  775. }
  776. func Getuid() (uid int) {
  777. r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0)
  778. uid = int(r0)
  779. return
  780. }
  781. func Kill(pid int, signum syscall.Signal) (err error) {
  782. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
  783. if e1 != 0 {
  784. err = e1
  785. }
  786. return
  787. }
  788. func Lchown(path string, uid int, gid int) (err error) {
  789. var _p0 *byte
  790. _p0, err = BytePtrFromString(path)
  791. if err != nil {
  792. return
  793. }
  794. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
  795. if e1 != 0 {
  796. err = e1
  797. }
  798. return
  799. }
  800. func Link(path string, link string) (err error) {
  801. var _p0 *byte
  802. _p0, err = BytePtrFromString(path)
  803. if err != nil {
  804. return
  805. }
  806. var _p1 *byte
  807. _p1, err = BytePtrFromString(link)
  808. if err != nil {
  809. return
  810. }
  811. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
  812. if e1 != 0 {
  813. err = e1
  814. }
  815. return
  816. }
  817. func Listen(s int, backlog int) (err error) {
  818. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
  819. if e1 != 0 {
  820. err = e1
  821. }
  822. return
  823. }
  824. func Lstat(path string, stat *Stat_t) (err error) {
  825. var _p0 *byte
  826. _p0, err = BytePtrFromString(path)
  827. if err != nil {
  828. return
  829. }
  830. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
  831. if e1 != 0 {
  832. err = e1
  833. }
  834. return
  835. }
  836. func Madvise(b []byte, advice int) (err error) {
  837. var _p0 *byte
  838. if len(b) > 0 {
  839. _p0 = &b[0]
  840. }
  841. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMadvise)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0)
  842. if e1 != 0 {
  843. err = e1
  844. }
  845. return
  846. }
  847. func Mkdir(path string, mode uint32) (err error) {
  848. var _p0 *byte
  849. _p0, err = BytePtrFromString(path)
  850. if err != nil {
  851. return
  852. }
  853. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  854. if e1 != 0 {
  855. err = e1
  856. }
  857. return
  858. }
  859. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  860. var _p0 *byte
  861. _p0, err = BytePtrFromString(path)
  862. if err != nil {
  863. return
  864. }
  865. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
  866. if e1 != 0 {
  867. err = e1
  868. }
  869. return
  870. }
  871. func Mkfifo(path string, mode uint32) (err error) {
  872. var _p0 *byte
  873. _p0, err = BytePtrFromString(path)
  874. if err != nil {
  875. return
  876. }
  877. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  878. if e1 != 0 {
  879. err = e1
  880. }
  881. return
  882. }
  883. func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
  884. var _p0 *byte
  885. _p0, err = BytePtrFromString(path)
  886. if err != nil {
  887. return
  888. }
  889. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
  890. if e1 != 0 {
  891. err = e1
  892. }
  893. return
  894. }
  895. func Mknod(path string, mode uint32, dev int) (err error) {
  896. var _p0 *byte
  897. _p0, err = BytePtrFromString(path)
  898. if err != nil {
  899. return
  900. }
  901. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
  902. if e1 != 0 {
  903. err = e1
  904. }
  905. return
  906. }
  907. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  908. var _p0 *byte
  909. _p0, err = BytePtrFromString(path)
  910. if err != nil {
  911. return
  912. }
  913. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  914. if e1 != 0 {
  915. err = e1
  916. }
  917. return
  918. }
  919. func Mlock(b []byte) (err error) {
  920. var _p0 *byte
  921. if len(b) > 0 {
  922. _p0 = &b[0]
  923. }
  924. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
  925. if e1 != 0 {
  926. err = e1
  927. }
  928. return
  929. }
  930. func Mlockall(flags int) (err error) {
  931. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0)
  932. if e1 != 0 {
  933. err = e1
  934. }
  935. return
  936. }
  937. func Mprotect(b []byte, prot int) (err error) {
  938. var _p0 *byte
  939. if len(b) > 0 {
  940. _p0 = &b[0]
  941. }
  942. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMprotect)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(prot), 0, 0, 0)
  943. if e1 != 0 {
  944. err = e1
  945. }
  946. return
  947. }
  948. func Munlock(b []byte) (err error) {
  949. var _p0 *byte
  950. if len(b) > 0 {
  951. _p0 = &b[0]
  952. }
  953. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
  954. if e1 != 0 {
  955. err = e1
  956. }
  957. return
  958. }
  959. func Munlockall() (err error) {
  960. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0)
  961. if e1 != 0 {
  962. err = e1
  963. }
  964. return
  965. }
  966. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  967. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
  968. if e1 != 0 {
  969. err = e1
  970. }
  971. return
  972. }
  973. func Open(path string, mode int, perm uint32) (fd int, err error) {
  974. var _p0 *byte
  975. _p0, err = BytePtrFromString(path)
  976. if err != nil {
  977. return
  978. }
  979. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
  980. fd = int(r0)
  981. if e1 != 0 {
  982. err = e1
  983. }
  984. return
  985. }
  986. func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  987. var _p0 *byte
  988. _p0, err = BytePtrFromString(path)
  989. if err != nil {
  990. return
  991. }
  992. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  993. fd = int(r0)
  994. if e1 != 0 {
  995. err = e1
  996. }
  997. return
  998. }
  999. func Pathconf(path string, name int) (val int, err error) {
  1000. var _p0 *byte
  1001. _p0, err = BytePtrFromString(path)
  1002. if err != nil {
  1003. return
  1004. }
  1005. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
  1006. val = int(r0)
  1007. if e1 != 0 {
  1008. err = e1
  1009. }
  1010. return
  1011. }
  1012. func Pause() (err error) {
  1013. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0)
  1014. if e1 != 0 {
  1015. err = e1
  1016. }
  1017. return
  1018. }
  1019. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1020. var _p0 *byte
  1021. if len(p) > 0 {
  1022. _p0 = &p[0]
  1023. }
  1024. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
  1025. n = int(r0)
  1026. if e1 != 0 {
  1027. err = e1
  1028. }
  1029. return
  1030. }
  1031. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1032. var _p0 *byte
  1033. if len(p) > 0 {
  1034. _p0 = &p[0]
  1035. }
  1036. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
  1037. n = int(r0)
  1038. if e1 != 0 {
  1039. err = e1
  1040. }
  1041. return
  1042. }
  1043. func read(fd int, p []byte) (n int, err error) {
  1044. var _p0 *byte
  1045. if len(p) > 0 {
  1046. _p0 = &p[0]
  1047. }
  1048. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
  1049. n = int(r0)
  1050. if e1 != 0 {
  1051. err = e1
  1052. }
  1053. return
  1054. }
  1055. func Readlink(path string, buf []byte) (n int, err error) {
  1056. var _p0 *byte
  1057. _p0, err = BytePtrFromString(path)
  1058. if err != nil {
  1059. return
  1060. }
  1061. var _p1 *byte
  1062. if len(buf) > 0 {
  1063. _p1 = &buf[0]
  1064. }
  1065. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
  1066. n = int(r0)
  1067. if e1 != 0 {
  1068. err = e1
  1069. }
  1070. return
  1071. }
  1072. func Rename(from string, to string) (err error) {
  1073. var _p0 *byte
  1074. _p0, err = BytePtrFromString(from)
  1075. if err != nil {
  1076. return
  1077. }
  1078. var _p1 *byte
  1079. _p1, err = BytePtrFromString(to)
  1080. if err != nil {
  1081. return
  1082. }
  1083. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
  1084. if e1 != 0 {
  1085. err = e1
  1086. }
  1087. return
  1088. }
  1089. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1090. var _p0 *byte
  1091. _p0, err = BytePtrFromString(oldpath)
  1092. if err != nil {
  1093. return
  1094. }
  1095. var _p1 *byte
  1096. _p1, err = BytePtrFromString(newpath)
  1097. if err != nil {
  1098. return
  1099. }
  1100. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1101. if e1 != 0 {
  1102. err = e1
  1103. }
  1104. return
  1105. }
  1106. func Rmdir(path string) (err error) {
  1107. var _p0 *byte
  1108. _p0, err = BytePtrFromString(path)
  1109. if err != nil {
  1110. return
  1111. }
  1112. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  1113. if e1 != 0 {
  1114. err = e1
  1115. }
  1116. return
  1117. }
  1118. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1119. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
  1120. newoffset = int64(r0)
  1121. if e1 != 0 {
  1122. err = e1
  1123. }
  1124. return
  1125. }
  1126. func Setegid(egid int) (err error) {
  1127. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)
  1128. if e1 != 0 {
  1129. err = e1
  1130. }
  1131. return
  1132. }
  1133. func Seteuid(euid int) (err error) {
  1134. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0)
  1135. if e1 != 0 {
  1136. err = e1
  1137. }
  1138. return
  1139. }
  1140. func Setgid(gid int) (err error) {
  1141. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0)
  1142. if e1 != 0 {
  1143. err = e1
  1144. }
  1145. return
  1146. }
  1147. func Sethostname(p []byte) (err error) {
  1148. var _p0 *byte
  1149. if len(p) > 0 {
  1150. _p0 = &p[0]
  1151. }
  1152. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0, 0)
  1153. if e1 != 0 {
  1154. err = e1
  1155. }
  1156. return
  1157. }
  1158. func Setpgid(pid int, pgid int) (err error) {
  1159. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
  1160. if e1 != 0 {
  1161. err = e1
  1162. }
  1163. return
  1164. }
  1165. func Setpriority(which int, who int, prio int) (err error) {
  1166. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
  1167. if e1 != 0 {
  1168. err = e1
  1169. }
  1170. return
  1171. }
  1172. func Setregid(rgid int, egid int) (err error) {
  1173. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
  1174. if e1 != 0 {
  1175. err = e1
  1176. }
  1177. return
  1178. }
  1179. func Setreuid(ruid int, euid int) (err error) {
  1180. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
  1181. if e1 != 0 {
  1182. err = e1
  1183. }
  1184. return
  1185. }
  1186. func Setrlimit(which int, lim *Rlimit) (err error) {
  1187. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
  1188. if e1 != 0 {
  1189. err = e1
  1190. }
  1191. return
  1192. }
  1193. func Setsid() (pid int, err error) {
  1194. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0)
  1195. pid = int(r0)
  1196. if e1 != 0 {
  1197. err = e1
  1198. }
  1199. return
  1200. }
  1201. func Setuid(uid int) (err error) {
  1202. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
  1203. if e1 != 0 {
  1204. err = e1
  1205. }
  1206. return
  1207. }
  1208. func Shutdown(s int, how int) (err error) {
  1209. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
  1210. if e1 != 0 {
  1211. err = e1
  1212. }
  1213. return
  1214. }
  1215. func Stat(path string, stat *Stat_t) (err error) {
  1216. var _p0 *byte
  1217. _p0, err = BytePtrFromString(path)
  1218. if err != nil {
  1219. return
  1220. }
  1221. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
  1222. if e1 != 0 {
  1223. err = e1
  1224. }
  1225. return
  1226. }
  1227. func Statvfs(path string, vfsstat *Statvfs_t) (err error) {
  1228. var _p0 *byte
  1229. _p0, err = BytePtrFromString(path)
  1230. if err != nil {
  1231. return
  1232. }
  1233. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStatvfs)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
  1234. if e1 != 0 {
  1235. err = e1
  1236. }
  1237. return
  1238. }
  1239. func Symlink(path string, link string) (err error) {
  1240. var _p0 *byte
  1241. _p0, err = BytePtrFromString(path)
  1242. if err != nil {
  1243. return
  1244. }
  1245. var _p1 *byte
  1246. _p1, err = BytePtrFromString(link)
  1247. if err != nil {
  1248. return
  1249. }
  1250. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
  1251. if e1 != 0 {
  1252. err = e1
  1253. }
  1254. return
  1255. }
  1256. func Sync() (err error) {
  1257. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0)
  1258. if e1 != 0 {
  1259. err = e1
  1260. }
  1261. return
  1262. }
  1263. func Times(tms *Tms) (ticks uintptr, err error) {
  1264. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0)
  1265. ticks = uintptr(r0)
  1266. if e1 != 0 {
  1267. err = e1
  1268. }
  1269. return
  1270. }
  1271. func Truncate(path string, length int64) (err error) {
  1272. var _p0 *byte
  1273. _p0, err = BytePtrFromString(path)
  1274. if err != nil {
  1275. return
  1276. }
  1277. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
  1278. if e1 != 0 {
  1279. err = e1
  1280. }
  1281. return
  1282. }
  1283. func Fsync(fd int) (err error) {
  1284. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  1285. if e1 != 0 {
  1286. err = e1
  1287. }
  1288. return
  1289. }
  1290. func Ftruncate(fd int, length int64) (err error) {
  1291. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
  1292. if e1 != 0 {
  1293. err = e1
  1294. }
  1295. return
  1296. }
  1297. func Umask(mask int) (oldmask int) {
  1298. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 0, 0)
  1299. oldmask = int(r0)
  1300. return
  1301. }
  1302. func Uname(buf *Utsname) (err error) {
  1303. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0)
  1304. if e1 != 0 {
  1305. err = e1
  1306. }
  1307. return
  1308. }
  1309. func Unmount(target string, flags int) (err error) {
  1310. var _p0 *byte
  1311. _p0, err = BytePtrFromString(target)
  1312. if err != nil {
  1313. return
  1314. }
  1315. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0)
  1316. if e1 != 0 {
  1317. err = e1
  1318. }
  1319. return
  1320. }
  1321. func Unlink(path string) (err error) {
  1322. var _p0 *byte
  1323. _p0, err = BytePtrFromString(path)
  1324. if err != nil {
  1325. return
  1326. }
  1327. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  1328. if e1 != 0 {
  1329. err = e1
  1330. }
  1331. return
  1332. }
  1333. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1334. var _p0 *byte
  1335. _p0, err = BytePtrFromString(path)
  1336. if err != nil {
  1337. return
  1338. }
  1339. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0)
  1340. if e1 != 0 {
  1341. err = e1
  1342. }
  1343. return
  1344. }
  1345. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  1346. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0)
  1347. if e1 != 0 {
  1348. err = e1
  1349. }
  1350. return
  1351. }
  1352. func Utime(path string, buf *Utimbuf) (err error) {
  1353. var _p0 *byte
  1354. _p0, err = BytePtrFromString(path)
  1355. if err != nil {
  1356. return
  1357. }
  1358. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0)
  1359. if e1 != 0 {
  1360. err = e1
  1361. }
  1362. return
  1363. }
  1364. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1365. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
  1366. if e1 != 0 {
  1367. err = e1
  1368. }
  1369. return
  1370. }
  1371. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1372. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
  1373. if e1 != 0 {
  1374. err = e1
  1375. }
  1376. return
  1377. }
  1378. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1379. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
  1380. ret = uintptr(r0)
  1381. if e1 != 0 {
  1382. err = e1
  1383. }
  1384. return
  1385. }
  1386. func munmap(addr uintptr, length uintptr) (err error) {
  1387. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
  1388. if e1 != 0 {
  1389. err = e1
  1390. }
  1391. return
  1392. }
  1393. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1394. var _p0 *byte
  1395. if len(buf) > 0 {
  1396. _p0 = &buf[0]
  1397. }
  1398. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1399. if e1 != 0 {
  1400. err = e1
  1401. }
  1402. return
  1403. }
  1404. func socket(domain int, typ int, proto int) (fd int, err error) {
  1405. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
  1406. fd = int(r0)
  1407. if e1 != 0 {
  1408. err = e1
  1409. }
  1410. return
  1411. }
  1412. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1413. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1414. if e1 != 0 {
  1415. err = e1
  1416. }
  1417. return
  1418. }
  1419. func write(fd int, p []byte) (n int, err error) {
  1420. var _p0 *byte
  1421. if len(p) > 0 {
  1422. _p0 = &p[0]
  1423. }
  1424. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
  1425. n = int(r0)
  1426. if e1 != 0 {
  1427. err = e1
  1428. }
  1429. return
  1430. }
  1431. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1432. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1433. if e1 != 0 {
  1434. err = e1
  1435. }
  1436. return
  1437. }
  1438. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1439. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  1440. if e1 != 0 {
  1441. err = e1
  1442. }
  1443. return
  1444. }
  1445. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1446. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1447. if e1 != 0 {
  1448. err = e1
  1449. }
  1450. return
  1451. }
  1452. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1453. var _p0 *byte
  1454. if len(p) > 0 {
  1455. _p0 = &p[0]
  1456. }
  1457. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1458. n = int(r0)
  1459. if e1 != 0 {
  1460. err = e1
  1461. }
  1462. return
  1463. }