zsyscall_solaris_amd64.go 45 KB

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