zsyscall_solaris_amd64.go 41 KB

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