zsyscall_solaris_amd64.go 44 KB

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