zsyscall_solaris_amd64.go 42 KB

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