zsyscall_solaris_amd64.go 42 KB

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