zsyscall_solaris_amd64.go 41 KB

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