zsyscall_solaris_amd64.go 45 KB

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