zsyscall_aix_ppc64.go 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443
  1. // go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. //go:build aix && ppc64
  4. // +build aix,ppc64
  5. package unix
  6. import (
  7. "unsafe"
  8. )
  9. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  10. func utimes(path string, times *[2]Timeval) (err error) {
  11. var _p0 *byte
  12. _p0, err = BytePtrFromString(path)
  13. if err != nil {
  14. return
  15. }
  16. _, e1 := callutimes(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  17. if e1 != 0 {
  18. err = errnoErr(e1)
  19. }
  20. return
  21. }
  22. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  23. func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
  24. var _p0 *byte
  25. _p0, err = BytePtrFromString(path)
  26. if err != nil {
  27. return
  28. }
  29. _, e1 := callutimensat(dirfd, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), flag)
  30. if e1 != 0 {
  31. err = errnoErr(e1)
  32. }
  33. return
  34. }
  35. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  36. func getcwd(buf []byte) (err error) {
  37. var _p0 *byte
  38. if len(buf) > 0 {
  39. _p0 = &buf[0]
  40. }
  41. _, e1 := callgetcwd(uintptr(unsafe.Pointer(_p0)), len(buf))
  42. if e1 != 0 {
  43. err = errnoErr(e1)
  44. }
  45. return
  46. }
  47. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  48. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  49. r0, e1 := callaccept(s, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  50. fd = int(r0)
  51. if e1 != 0 {
  52. err = errnoErr(e1)
  53. }
  54. return
  55. }
  56. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  57. func getdirent(fd int, buf []byte) (n int, err error) {
  58. var _p0 *byte
  59. if len(buf) > 0 {
  60. _p0 = &buf[0]
  61. }
  62. r0, e1 := callgetdirent(fd, uintptr(unsafe.Pointer(_p0)), len(buf))
  63. n = int(r0)
  64. if e1 != 0 {
  65. err = errnoErr(e1)
  66. }
  67. return
  68. }
  69. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  70. func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) {
  71. r0, e1 := callwait4(int(pid), uintptr(unsafe.Pointer(status)), options, uintptr(unsafe.Pointer(rusage)))
  72. wpid = Pid_t(r0)
  73. if e1 != 0 {
  74. err = errnoErr(e1)
  75. }
  76. return
  77. }
  78. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  79. func ioctl(fd int, req uint, arg uintptr) (err error) {
  80. _, e1 := callioctl(fd, int(req), arg)
  81. if e1 != 0 {
  82. err = errnoErr(e1)
  83. }
  84. return
  85. }
  86. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  87. func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) {
  88. r0, e1 := callfcntl(fd, cmd, uintptr(arg))
  89. r = int(r0)
  90. if e1 != 0 {
  91. err = errnoErr(e1)
  92. }
  93. return
  94. }
  95. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  96. func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) {
  97. _, e1 := callfcntl(fd, cmd, uintptr(unsafe.Pointer(lk)))
  98. if e1 != 0 {
  99. err = errnoErr(e1)
  100. }
  101. return
  102. }
  103. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  104. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  105. r0, e1 := callfcntl(uintptr(fd), cmd, uintptr(arg))
  106. val = int(r0)
  107. if e1 != 0 {
  108. err = errnoErr(e1)
  109. }
  110. return
  111. }
  112. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  113. func Acct(path string) (err error) {
  114. var _p0 *byte
  115. _p0, err = BytePtrFromString(path)
  116. if err != nil {
  117. return
  118. }
  119. _, e1 := callacct(uintptr(unsafe.Pointer(_p0)))
  120. if e1 != 0 {
  121. err = errnoErr(e1)
  122. }
  123. return
  124. }
  125. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  126. func Chdir(path string) (err error) {
  127. var _p0 *byte
  128. _p0, err = BytePtrFromString(path)
  129. if err != nil {
  130. return
  131. }
  132. _, e1 := callchdir(uintptr(unsafe.Pointer(_p0)))
  133. if e1 != 0 {
  134. err = errnoErr(e1)
  135. }
  136. return
  137. }
  138. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  139. func Chroot(path string) (err error) {
  140. var _p0 *byte
  141. _p0, err = BytePtrFromString(path)
  142. if err != nil {
  143. return
  144. }
  145. _, e1 := callchroot(uintptr(unsafe.Pointer(_p0)))
  146. if e1 != 0 {
  147. err = errnoErr(e1)
  148. }
  149. return
  150. }
  151. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  152. func Close(fd int) (err error) {
  153. _, e1 := callclose(fd)
  154. if e1 != 0 {
  155. err = errnoErr(e1)
  156. }
  157. return
  158. }
  159. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  160. func Dup(oldfd int) (fd int, err error) {
  161. r0, e1 := calldup(oldfd)
  162. fd = int(r0)
  163. if e1 != 0 {
  164. err = errnoErr(e1)
  165. }
  166. return
  167. }
  168. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  169. func Exit(code int) {
  170. callexit(code)
  171. return
  172. }
  173. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  174. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  175. var _p0 *byte
  176. _p0, err = BytePtrFromString(path)
  177. if err != nil {
  178. return
  179. }
  180. _, e1 := callfaccessat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, flags)
  181. if e1 != 0 {
  182. err = errnoErr(e1)
  183. }
  184. return
  185. }
  186. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  187. func Fchdir(fd int) (err error) {
  188. _, e1 := callfchdir(fd)
  189. if e1 != 0 {
  190. err = errnoErr(e1)
  191. }
  192. return
  193. }
  194. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  195. func Fchmod(fd int, mode uint32) (err error) {
  196. _, e1 := callfchmod(fd, mode)
  197. if e1 != 0 {
  198. err = errnoErr(e1)
  199. }
  200. return
  201. }
  202. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  203. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  204. var _p0 *byte
  205. _p0, err = BytePtrFromString(path)
  206. if err != nil {
  207. return
  208. }
  209. _, e1 := callfchmodat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, flags)
  210. if e1 != 0 {
  211. err = errnoErr(e1)
  212. }
  213. return
  214. }
  215. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  216. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  217. var _p0 *byte
  218. _p0, err = BytePtrFromString(path)
  219. if err != nil {
  220. return
  221. }
  222. _, e1 := callfchownat(dirfd, uintptr(unsafe.Pointer(_p0)), uid, gid, flags)
  223. if e1 != 0 {
  224. err = errnoErr(e1)
  225. }
  226. return
  227. }
  228. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  229. func Fdatasync(fd int) (err error) {
  230. _, e1 := callfdatasync(fd)
  231. if e1 != 0 {
  232. err = errnoErr(e1)
  233. }
  234. return
  235. }
  236. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  237. func Fsync(fd int) (err error) {
  238. _, e1 := callfsync(fd)
  239. if e1 != 0 {
  240. err = errnoErr(e1)
  241. }
  242. return
  243. }
  244. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  245. func Getpgid(pid int) (pgid int, err error) {
  246. r0, e1 := callgetpgid(pid)
  247. pgid = int(r0)
  248. if e1 != 0 {
  249. err = errnoErr(e1)
  250. }
  251. return
  252. }
  253. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  254. func Getpgrp() (pid int) {
  255. r0, _ := callgetpgrp()
  256. pid = int(r0)
  257. return
  258. }
  259. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  260. func Getpid() (pid int) {
  261. r0, _ := callgetpid()
  262. pid = int(r0)
  263. return
  264. }
  265. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  266. func Getppid() (ppid int) {
  267. r0, _ := callgetppid()
  268. ppid = int(r0)
  269. return
  270. }
  271. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  272. func Getpriority(which int, who int) (prio int, err error) {
  273. r0, e1 := callgetpriority(which, who)
  274. prio = int(r0)
  275. if e1 != 0 {
  276. err = errnoErr(e1)
  277. }
  278. return
  279. }
  280. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  281. func Getrusage(who int, rusage *Rusage) (err error) {
  282. _, e1 := callgetrusage(who, uintptr(unsafe.Pointer(rusage)))
  283. if e1 != 0 {
  284. err = errnoErr(e1)
  285. }
  286. return
  287. }
  288. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  289. func Getsid(pid int) (sid int, err error) {
  290. r0, e1 := callgetsid(pid)
  291. sid = int(r0)
  292. if e1 != 0 {
  293. err = errnoErr(e1)
  294. }
  295. return
  296. }
  297. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  298. func Kill(pid int, sig Signal) (err error) {
  299. _, e1 := callkill(pid, int(sig))
  300. if e1 != 0 {
  301. err = errnoErr(e1)
  302. }
  303. return
  304. }
  305. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  306. func Klogctl(typ int, buf []byte) (n int, err error) {
  307. var _p0 *byte
  308. if len(buf) > 0 {
  309. _p0 = &buf[0]
  310. }
  311. r0, e1 := callsyslog(typ, uintptr(unsafe.Pointer(_p0)), len(buf))
  312. n = int(r0)
  313. if e1 != 0 {
  314. err = errnoErr(e1)
  315. }
  316. return
  317. }
  318. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  319. func Mkdir(dirfd int, path string, mode uint32) (err error) {
  320. var _p0 *byte
  321. _p0, err = BytePtrFromString(path)
  322. if err != nil {
  323. return
  324. }
  325. _, e1 := callmkdir(dirfd, uintptr(unsafe.Pointer(_p0)), mode)
  326. if e1 != 0 {
  327. err = errnoErr(e1)
  328. }
  329. return
  330. }
  331. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  332. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  333. var _p0 *byte
  334. _p0, err = BytePtrFromString(path)
  335. if err != nil {
  336. return
  337. }
  338. _, e1 := callmkdirat(dirfd, uintptr(unsafe.Pointer(_p0)), mode)
  339. if e1 != 0 {
  340. err = errnoErr(e1)
  341. }
  342. return
  343. }
  344. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  345. func Mkfifo(path string, mode uint32) (err error) {
  346. var _p0 *byte
  347. _p0, err = BytePtrFromString(path)
  348. if err != nil {
  349. return
  350. }
  351. _, e1 := callmkfifo(uintptr(unsafe.Pointer(_p0)), mode)
  352. if e1 != 0 {
  353. err = errnoErr(e1)
  354. }
  355. return
  356. }
  357. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  358. func Mknod(path string, mode uint32, dev int) (err error) {
  359. var _p0 *byte
  360. _p0, err = BytePtrFromString(path)
  361. if err != nil {
  362. return
  363. }
  364. _, e1 := callmknod(uintptr(unsafe.Pointer(_p0)), mode, dev)
  365. if e1 != 0 {
  366. err = errnoErr(e1)
  367. }
  368. return
  369. }
  370. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  371. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  372. var _p0 *byte
  373. _p0, err = BytePtrFromString(path)
  374. if err != nil {
  375. return
  376. }
  377. _, e1 := callmknodat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, dev)
  378. if e1 != 0 {
  379. err = errnoErr(e1)
  380. }
  381. return
  382. }
  383. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  384. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  385. _, e1 := callnanosleep(uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)))
  386. if e1 != 0 {
  387. err = errnoErr(e1)
  388. }
  389. return
  390. }
  391. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  392. func Open(path string, mode int, perm uint32) (fd int, err error) {
  393. var _p0 *byte
  394. _p0, err = BytePtrFromString(path)
  395. if err != nil {
  396. return
  397. }
  398. r0, e1 := callopen64(uintptr(unsafe.Pointer(_p0)), mode, perm)
  399. fd = int(r0)
  400. if e1 != 0 {
  401. err = errnoErr(e1)
  402. }
  403. return
  404. }
  405. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  406. func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  407. var _p0 *byte
  408. _p0, err = BytePtrFromString(path)
  409. if err != nil {
  410. return
  411. }
  412. r0, e1 := callopenat(dirfd, uintptr(unsafe.Pointer(_p0)), flags, mode)
  413. fd = int(r0)
  414. if e1 != 0 {
  415. err = errnoErr(e1)
  416. }
  417. return
  418. }
  419. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  420. func read(fd int, p []byte) (n int, err error) {
  421. var _p0 *byte
  422. if len(p) > 0 {
  423. _p0 = &p[0]
  424. }
  425. r0, e1 := callread(fd, uintptr(unsafe.Pointer(_p0)), len(p))
  426. n = int(r0)
  427. if e1 != 0 {
  428. err = errnoErr(e1)
  429. }
  430. return
  431. }
  432. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  433. func Readlink(path string, buf []byte) (n int, err error) {
  434. var _p0 *byte
  435. _p0, err = BytePtrFromString(path)
  436. if err != nil {
  437. return
  438. }
  439. var _p1 *byte
  440. if len(buf) > 0 {
  441. _p1 = &buf[0]
  442. }
  443. r0, e1 := callreadlink(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), len(buf))
  444. n = int(r0)
  445. if e1 != 0 {
  446. err = errnoErr(e1)
  447. }
  448. return
  449. }
  450. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  451. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  452. var _p0 *byte
  453. _p0, err = BytePtrFromString(oldpath)
  454. if err != nil {
  455. return
  456. }
  457. var _p1 *byte
  458. _p1, err = BytePtrFromString(newpath)
  459. if err != nil {
  460. return
  461. }
  462. _, e1 := callrenameat(olddirfd, uintptr(unsafe.Pointer(_p0)), newdirfd, uintptr(unsafe.Pointer(_p1)))
  463. if e1 != 0 {
  464. err = errnoErr(e1)
  465. }
  466. return
  467. }
  468. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  469. func Setdomainname(p []byte) (err error) {
  470. var _p0 *byte
  471. if len(p) > 0 {
  472. _p0 = &p[0]
  473. }
  474. _, e1 := callsetdomainname(uintptr(unsafe.Pointer(_p0)), len(p))
  475. if e1 != 0 {
  476. err = errnoErr(e1)
  477. }
  478. return
  479. }
  480. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  481. func Sethostname(p []byte) (err error) {
  482. var _p0 *byte
  483. if len(p) > 0 {
  484. _p0 = &p[0]
  485. }
  486. _, e1 := callsethostname(uintptr(unsafe.Pointer(_p0)), len(p))
  487. if e1 != 0 {
  488. err = errnoErr(e1)
  489. }
  490. return
  491. }
  492. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  493. func Setpgid(pid int, pgid int) (err error) {
  494. _, e1 := callsetpgid(pid, pgid)
  495. if e1 != 0 {
  496. err = errnoErr(e1)
  497. }
  498. return
  499. }
  500. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  501. func Setsid() (pid int, err error) {
  502. r0, e1 := callsetsid()
  503. pid = int(r0)
  504. if e1 != 0 {
  505. err = errnoErr(e1)
  506. }
  507. return
  508. }
  509. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  510. func Settimeofday(tv *Timeval) (err error) {
  511. _, e1 := callsettimeofday(uintptr(unsafe.Pointer(tv)))
  512. if e1 != 0 {
  513. err = errnoErr(e1)
  514. }
  515. return
  516. }
  517. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  518. func Setuid(uid int) (err error) {
  519. _, e1 := callsetuid(uid)
  520. if e1 != 0 {
  521. err = errnoErr(e1)
  522. }
  523. return
  524. }
  525. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  526. func Setgid(uid int) (err error) {
  527. _, e1 := callsetgid(uid)
  528. if e1 != 0 {
  529. err = errnoErr(e1)
  530. }
  531. return
  532. }
  533. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  534. func Setpriority(which int, who int, prio int) (err error) {
  535. _, e1 := callsetpriority(which, who, prio)
  536. if e1 != 0 {
  537. err = errnoErr(e1)
  538. }
  539. return
  540. }
  541. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  542. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  543. var _p0 *byte
  544. _p0, err = BytePtrFromString(path)
  545. if err != nil {
  546. return
  547. }
  548. _, e1 := callstatx(dirfd, uintptr(unsafe.Pointer(_p0)), flags, mask, uintptr(unsafe.Pointer(stat)))
  549. if e1 != 0 {
  550. err = errnoErr(e1)
  551. }
  552. return
  553. }
  554. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  555. func Sync() {
  556. callsync()
  557. return
  558. }
  559. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  560. func Times(tms *Tms) (ticks uintptr, err error) {
  561. r0, e1 := calltimes(uintptr(unsafe.Pointer(tms)))
  562. ticks = uintptr(r0)
  563. if e1 != 0 {
  564. err = errnoErr(e1)
  565. }
  566. return
  567. }
  568. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  569. func Umask(mask int) (oldmask int) {
  570. r0, _ := callumask(mask)
  571. oldmask = int(r0)
  572. return
  573. }
  574. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  575. func Uname(buf *Utsname) (err error) {
  576. _, e1 := calluname(uintptr(unsafe.Pointer(buf)))
  577. if e1 != 0 {
  578. err = errnoErr(e1)
  579. }
  580. return
  581. }
  582. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  583. func Unlink(path string) (err error) {
  584. var _p0 *byte
  585. _p0, err = BytePtrFromString(path)
  586. if err != nil {
  587. return
  588. }
  589. _, e1 := callunlink(uintptr(unsafe.Pointer(_p0)))
  590. if e1 != 0 {
  591. err = errnoErr(e1)
  592. }
  593. return
  594. }
  595. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  596. func Unlinkat(dirfd int, path string, flags int) (err error) {
  597. var _p0 *byte
  598. _p0, err = BytePtrFromString(path)
  599. if err != nil {
  600. return
  601. }
  602. _, e1 := callunlinkat(dirfd, uintptr(unsafe.Pointer(_p0)), flags)
  603. if e1 != 0 {
  604. err = errnoErr(e1)
  605. }
  606. return
  607. }
  608. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  609. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  610. _, e1 := callustat(dev, uintptr(unsafe.Pointer(ubuf)))
  611. if e1 != 0 {
  612. err = errnoErr(e1)
  613. }
  614. return
  615. }
  616. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  617. func write(fd int, p []byte) (n int, err error) {
  618. var _p0 *byte
  619. if len(p) > 0 {
  620. _p0 = &p[0]
  621. }
  622. r0, e1 := callwrite(fd, uintptr(unsafe.Pointer(_p0)), len(p))
  623. n = int(r0)
  624. if e1 != 0 {
  625. err = errnoErr(e1)
  626. }
  627. return
  628. }
  629. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  630. func readlen(fd int, p *byte, np int) (n int, err error) {
  631. r0, e1 := callread(fd, uintptr(unsafe.Pointer(p)), np)
  632. n = int(r0)
  633. if e1 != 0 {
  634. err = errnoErr(e1)
  635. }
  636. return
  637. }
  638. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  639. func writelen(fd int, p *byte, np int) (n int, err error) {
  640. r0, e1 := callwrite(fd, uintptr(unsafe.Pointer(p)), np)
  641. n = int(r0)
  642. if e1 != 0 {
  643. err = errnoErr(e1)
  644. }
  645. return
  646. }
  647. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  648. func Dup2(oldfd int, newfd int) (err error) {
  649. _, e1 := calldup2(oldfd, newfd)
  650. if e1 != 0 {
  651. err = errnoErr(e1)
  652. }
  653. return
  654. }
  655. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  656. func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  657. _, e1 := callposix_fadvise64(fd, offset, length, advice)
  658. if e1 != 0 {
  659. err = errnoErr(e1)
  660. }
  661. return
  662. }
  663. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  664. func Fchown(fd int, uid int, gid int) (err error) {
  665. _, e1 := callfchown(fd, uid, gid)
  666. if e1 != 0 {
  667. err = errnoErr(e1)
  668. }
  669. return
  670. }
  671. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  672. func fstat(fd int, stat *Stat_t) (err error) {
  673. _, e1 := callfstat(fd, uintptr(unsafe.Pointer(stat)))
  674. if e1 != 0 {
  675. err = errnoErr(e1)
  676. }
  677. return
  678. }
  679. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  680. func fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  681. var _p0 *byte
  682. _p0, err = BytePtrFromString(path)
  683. if err != nil {
  684. return
  685. }
  686. _, e1 := callfstatat(dirfd, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), flags)
  687. if e1 != 0 {
  688. err = errnoErr(e1)
  689. }
  690. return
  691. }
  692. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  693. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  694. _, e1 := callfstatfs(fd, uintptr(unsafe.Pointer(buf)))
  695. if e1 != 0 {
  696. err = errnoErr(e1)
  697. }
  698. return
  699. }
  700. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  701. func Ftruncate(fd int, length int64) (err error) {
  702. _, e1 := callftruncate(fd, length)
  703. if e1 != 0 {
  704. err = errnoErr(e1)
  705. }
  706. return
  707. }
  708. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  709. func Getegid() (egid int) {
  710. r0, _ := callgetegid()
  711. egid = int(r0)
  712. return
  713. }
  714. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  715. func Geteuid() (euid int) {
  716. r0, _ := callgeteuid()
  717. euid = int(r0)
  718. return
  719. }
  720. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  721. func Getgid() (gid int) {
  722. r0, _ := callgetgid()
  723. gid = int(r0)
  724. return
  725. }
  726. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  727. func Getuid() (uid int) {
  728. r0, _ := callgetuid()
  729. uid = int(r0)
  730. return
  731. }
  732. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  733. func Lchown(path string, uid int, gid int) (err error) {
  734. var _p0 *byte
  735. _p0, err = BytePtrFromString(path)
  736. if err != nil {
  737. return
  738. }
  739. _, e1 := calllchown(uintptr(unsafe.Pointer(_p0)), uid, gid)
  740. if e1 != 0 {
  741. err = errnoErr(e1)
  742. }
  743. return
  744. }
  745. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  746. func Listen(s int, n int) (err error) {
  747. _, e1 := calllisten(s, n)
  748. if e1 != 0 {
  749. err = errnoErr(e1)
  750. }
  751. return
  752. }
  753. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  754. func lstat(path string, stat *Stat_t) (err error) {
  755. var _p0 *byte
  756. _p0, err = BytePtrFromString(path)
  757. if err != nil {
  758. return
  759. }
  760. _, e1 := calllstat(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)))
  761. if e1 != 0 {
  762. err = errnoErr(e1)
  763. }
  764. return
  765. }
  766. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  767. func Pause() (err error) {
  768. _, e1 := callpause()
  769. if e1 != 0 {
  770. err = errnoErr(e1)
  771. }
  772. return
  773. }
  774. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  775. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  776. var _p0 *byte
  777. if len(p) > 0 {
  778. _p0 = &p[0]
  779. }
  780. r0, e1 := callpread64(fd, uintptr(unsafe.Pointer(_p0)), len(p), offset)
  781. n = int(r0)
  782. if e1 != 0 {
  783. err = errnoErr(e1)
  784. }
  785. return
  786. }
  787. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  788. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  789. var _p0 *byte
  790. if len(p) > 0 {
  791. _p0 = &p[0]
  792. }
  793. r0, e1 := callpwrite64(fd, uintptr(unsafe.Pointer(_p0)), len(p), offset)
  794. n = int(r0)
  795. if e1 != 0 {
  796. err = errnoErr(e1)
  797. }
  798. return
  799. }
  800. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  801. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  802. r0, e1 := callselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)))
  803. n = int(r0)
  804. if e1 != 0 {
  805. err = errnoErr(e1)
  806. }
  807. return
  808. }
  809. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  810. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  811. r0, e1 := callpselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
  812. n = int(r0)
  813. if e1 != 0 {
  814. err = errnoErr(e1)
  815. }
  816. return
  817. }
  818. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  819. func Setregid(rgid int, egid int) (err error) {
  820. _, e1 := callsetregid(rgid, egid)
  821. if e1 != 0 {
  822. err = errnoErr(e1)
  823. }
  824. return
  825. }
  826. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  827. func Setreuid(ruid int, euid int) (err error) {
  828. _, e1 := callsetreuid(ruid, euid)
  829. if e1 != 0 {
  830. err = errnoErr(e1)
  831. }
  832. return
  833. }
  834. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  835. func Shutdown(fd int, how int) (err error) {
  836. _, e1 := callshutdown(fd, how)
  837. if e1 != 0 {
  838. err = errnoErr(e1)
  839. }
  840. return
  841. }
  842. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  843. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  844. r0, e1 := callsplice(rfd, uintptr(unsafe.Pointer(roff)), wfd, uintptr(unsafe.Pointer(woff)), len, flags)
  845. n = int64(r0)
  846. if e1 != 0 {
  847. err = errnoErr(e1)
  848. }
  849. return
  850. }
  851. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  852. func stat(path string, statptr *Stat_t) (err error) {
  853. var _p0 *byte
  854. _p0, err = BytePtrFromString(path)
  855. if err != nil {
  856. return
  857. }
  858. _, e1 := callstat(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statptr)))
  859. if e1 != 0 {
  860. err = errnoErr(e1)
  861. }
  862. return
  863. }
  864. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  865. func Statfs(path string, buf *Statfs_t) (err error) {
  866. var _p0 *byte
  867. _p0, err = BytePtrFromString(path)
  868. if err != nil {
  869. return
  870. }
  871. _, e1 := callstatfs(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)))
  872. if e1 != 0 {
  873. err = errnoErr(e1)
  874. }
  875. return
  876. }
  877. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  878. func Truncate(path string, length int64) (err error) {
  879. var _p0 *byte
  880. _p0, err = BytePtrFromString(path)
  881. if err != nil {
  882. return
  883. }
  884. _, e1 := calltruncate(uintptr(unsafe.Pointer(_p0)), length)
  885. if e1 != 0 {
  886. err = errnoErr(e1)
  887. }
  888. return
  889. }
  890. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  891. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  892. _, e1 := callbind(s, uintptr(addr), uintptr(addrlen))
  893. if e1 != 0 {
  894. err = errnoErr(e1)
  895. }
  896. return
  897. }
  898. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  899. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  900. _, e1 := callconnect(s, uintptr(addr), uintptr(addrlen))
  901. if e1 != 0 {
  902. err = errnoErr(e1)
  903. }
  904. return
  905. }
  906. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  907. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  908. r0, e1 := callgetgroups(n, uintptr(unsafe.Pointer(list)))
  909. nn = int(r0)
  910. if e1 != 0 {
  911. err = errnoErr(e1)
  912. }
  913. return
  914. }
  915. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  916. func setgroups(n int, list *_Gid_t) (err error) {
  917. _, e1 := callsetgroups(n, uintptr(unsafe.Pointer(list)))
  918. if e1 != 0 {
  919. err = errnoErr(e1)
  920. }
  921. return
  922. }
  923. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  924. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  925. _, e1 := callgetsockopt(s, level, name, uintptr(val), uintptr(unsafe.Pointer(vallen)))
  926. if e1 != 0 {
  927. err = errnoErr(e1)
  928. }
  929. return
  930. }
  931. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  932. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  933. _, e1 := callsetsockopt(s, level, name, uintptr(val), vallen)
  934. if e1 != 0 {
  935. err = errnoErr(e1)
  936. }
  937. return
  938. }
  939. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  940. func socket(domain int, typ int, proto int) (fd int, err error) {
  941. r0, e1 := callsocket(domain, typ, proto)
  942. fd = int(r0)
  943. if e1 != 0 {
  944. err = errnoErr(e1)
  945. }
  946. return
  947. }
  948. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  949. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  950. _, e1 := callsocketpair(domain, typ, proto, uintptr(unsafe.Pointer(fd)))
  951. if e1 != 0 {
  952. err = errnoErr(e1)
  953. }
  954. return
  955. }
  956. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  957. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  958. _, e1 := callgetpeername(fd, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  959. if e1 != 0 {
  960. err = errnoErr(e1)
  961. }
  962. return
  963. }
  964. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  965. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  966. _, e1 := callgetsockname(fd, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  967. if e1 != 0 {
  968. err = errnoErr(e1)
  969. }
  970. return
  971. }
  972. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  973. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  974. var _p0 *byte
  975. if len(p) > 0 {
  976. _p0 = &p[0]
  977. }
  978. r0, e1 := callrecvfrom(fd, uintptr(unsafe.Pointer(_p0)), len(p), flags, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  979. n = int(r0)
  980. if e1 != 0 {
  981. err = errnoErr(e1)
  982. }
  983. return
  984. }
  985. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  986. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  987. var _p0 *byte
  988. if len(buf) > 0 {
  989. _p0 = &buf[0]
  990. }
  991. _, e1 := callsendto(s, uintptr(unsafe.Pointer(_p0)), len(buf), flags, uintptr(to), uintptr(addrlen))
  992. if e1 != 0 {
  993. err = errnoErr(e1)
  994. }
  995. return
  996. }
  997. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  998. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  999. r0, e1 := callnrecvmsg(s, uintptr(unsafe.Pointer(msg)), flags)
  1000. n = int(r0)
  1001. if e1 != 0 {
  1002. err = errnoErr(e1)
  1003. }
  1004. return
  1005. }
  1006. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1007. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1008. r0, e1 := callnsendmsg(s, uintptr(unsafe.Pointer(msg)), flags)
  1009. n = int(r0)
  1010. if e1 != 0 {
  1011. err = errnoErr(e1)
  1012. }
  1013. return
  1014. }
  1015. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1016. func munmap(addr uintptr, length uintptr) (err error) {
  1017. _, e1 := callmunmap(addr, length)
  1018. if e1 != 0 {
  1019. err = errnoErr(e1)
  1020. }
  1021. return
  1022. }
  1023. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1024. func Madvise(b []byte, advice int) (err error) {
  1025. var _p0 *byte
  1026. if len(b) > 0 {
  1027. _p0 = &b[0]
  1028. }
  1029. _, e1 := callmadvise(uintptr(unsafe.Pointer(_p0)), len(b), advice)
  1030. if e1 != 0 {
  1031. err = errnoErr(e1)
  1032. }
  1033. return
  1034. }
  1035. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1036. func Mprotect(b []byte, prot int) (err error) {
  1037. var _p0 *byte
  1038. if len(b) > 0 {
  1039. _p0 = &b[0]
  1040. }
  1041. _, e1 := callmprotect(uintptr(unsafe.Pointer(_p0)), len(b), prot)
  1042. if e1 != 0 {
  1043. err = errnoErr(e1)
  1044. }
  1045. return
  1046. }
  1047. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1048. func Mlock(b []byte) (err error) {
  1049. var _p0 *byte
  1050. if len(b) > 0 {
  1051. _p0 = &b[0]
  1052. }
  1053. _, e1 := callmlock(uintptr(unsafe.Pointer(_p0)), len(b))
  1054. if e1 != 0 {
  1055. err = errnoErr(e1)
  1056. }
  1057. return
  1058. }
  1059. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1060. func Mlockall(flags int) (err error) {
  1061. _, e1 := callmlockall(flags)
  1062. if e1 != 0 {
  1063. err = errnoErr(e1)
  1064. }
  1065. return
  1066. }
  1067. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1068. func Msync(b []byte, flags int) (err error) {
  1069. var _p0 *byte
  1070. if len(b) > 0 {
  1071. _p0 = &b[0]
  1072. }
  1073. _, e1 := callmsync(uintptr(unsafe.Pointer(_p0)), len(b), flags)
  1074. if e1 != 0 {
  1075. err = errnoErr(e1)
  1076. }
  1077. return
  1078. }
  1079. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1080. func Munlock(b []byte) (err error) {
  1081. var _p0 *byte
  1082. if len(b) > 0 {
  1083. _p0 = &b[0]
  1084. }
  1085. _, e1 := callmunlock(uintptr(unsafe.Pointer(_p0)), len(b))
  1086. if e1 != 0 {
  1087. err = errnoErr(e1)
  1088. }
  1089. return
  1090. }
  1091. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1092. func Munlockall() (err error) {
  1093. _, e1 := callmunlockall()
  1094. if e1 != 0 {
  1095. err = errnoErr(e1)
  1096. }
  1097. return
  1098. }
  1099. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1100. func pipe(p *[2]_C_int) (err error) {
  1101. _, e1 := callpipe(uintptr(unsafe.Pointer(p)))
  1102. if e1 != 0 {
  1103. err = errnoErr(e1)
  1104. }
  1105. return
  1106. }
  1107. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1108. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  1109. r0, e1 := callpoll(uintptr(unsafe.Pointer(fds)), nfds, timeout)
  1110. n = int(r0)
  1111. if e1 != 0 {
  1112. err = errnoErr(e1)
  1113. }
  1114. return
  1115. }
  1116. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1117. func gettimeofday(tv *Timeval, tzp *Timezone) (err error) {
  1118. _, e1 := callgettimeofday(uintptr(unsafe.Pointer(tv)), uintptr(unsafe.Pointer(tzp)))
  1119. if e1 != 0 {
  1120. err = errnoErr(e1)
  1121. }
  1122. return
  1123. }
  1124. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1125. func Time(t *Time_t) (tt Time_t, err error) {
  1126. r0, e1 := calltime(uintptr(unsafe.Pointer(t)))
  1127. tt = Time_t(r0)
  1128. if e1 != 0 {
  1129. err = errnoErr(e1)
  1130. }
  1131. return
  1132. }
  1133. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1134. func Utime(path string, buf *Utimbuf) (err error) {
  1135. var _p0 *byte
  1136. _p0, err = BytePtrFromString(path)
  1137. if err != nil {
  1138. return
  1139. }
  1140. _, e1 := callutime(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)))
  1141. if e1 != 0 {
  1142. err = errnoErr(e1)
  1143. }
  1144. return
  1145. }
  1146. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1147. func Getsystemcfg(label int) (n uint64) {
  1148. r0, _ := callgetsystemcfg(label)
  1149. n = uint64(r0)
  1150. return
  1151. }
  1152. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1153. func umount(target string) (err error) {
  1154. var _p0 *byte
  1155. _p0, err = BytePtrFromString(target)
  1156. if err != nil {
  1157. return
  1158. }
  1159. _, e1 := callumount(uintptr(unsafe.Pointer(_p0)))
  1160. if e1 != 0 {
  1161. err = errnoErr(e1)
  1162. }
  1163. return
  1164. }
  1165. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1166. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1167. _, e1 := callgetrlimit(resource, uintptr(unsafe.Pointer(rlim)))
  1168. if e1 != 0 {
  1169. err = errnoErr(e1)
  1170. }
  1171. return
  1172. }
  1173. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1174. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1175. _, e1 := callsetrlimit(resource, uintptr(unsafe.Pointer(rlim)))
  1176. if e1 != 0 {
  1177. err = errnoErr(e1)
  1178. }
  1179. return
  1180. }
  1181. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1182. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1183. r0, e1 := calllseek(fd, offset, whence)
  1184. off = int64(r0)
  1185. if e1 != 0 {
  1186. err = errnoErr(e1)
  1187. }
  1188. return
  1189. }
  1190. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1191. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1192. r0, e1 := callmmap64(addr, length, prot, flags, fd, offset)
  1193. xaddr = uintptr(r0)
  1194. if e1 != 0 {
  1195. err = errnoErr(e1)
  1196. }
  1197. return
  1198. }