zsyscall_solaris_amd64.go 44 KB

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