blob: 92a0ca1ef024e964059f8f12d2b11d21eec09897 [file] [log] [blame]
Russ Coxe11f8332009-06-01 22:15:08 -07001// mksyscall syscall_linux.go syscall_linux_amd64.go
2// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
3
4package syscall
5
6import (
7 "syscall";
8 "unsafe";
9)
10
11func pipe(p *[2]_C_int) (errno int) {
12 r0, r1, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0);
13 errno = int(e1);
14 return;
15}
16
17func utimes(path string, times *[2]Timeval) (errno int) {
18 r0, r1, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)), 0);
19 errno = int(e1);
20 return;
21}
22
23func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) {
24 r0, r1, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)));
25 errno = int(e1);
26 return;
27}
28
29func Getcwd(buf []byte) (n int, errno int) {
30 var _p0 *byte;
31 if len(buf) > 0 { _p0 = &buf[0]; }
32 r0, r1, e1 := Syscall(SYS_GETCWD, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0);
33 n = int(r0);
34 errno = int(e1);
35 return;
36}
37
38func getgroups(n int, list *_Gid_t) (nn int, errno int) {
39 r0, r1, e1 := Syscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0);
40 nn = int(r0);
41 errno = int(e1);
42 return;
43}
44
45func setgroups(n int, list *_Gid_t) (errno int) {
46 r0, r1, e1 := Syscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0);
47 errno = int(e1);
48 return;
49}
50
51func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, errno int) {
52 r0, r1, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0);
53 wpid = int(r0);
54 errno = int(e1);
55 return;
56}
57
58func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int) {
59 r0, r1, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
60 fd = int(r0);
61 errno = int(e1);
62 return;
63}
64
65func bind(s int, addr uintptr, addrlen _Socklen) (errno int) {
66 r0, r1, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen));
67 errno = int(e1);
68 return;
69}
70
71func connect(s int, addr uintptr, addrlen _Socklen) (errno int) {
72 r0, r1, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen));
73 errno = int(e1);
74 return;
75}
76
77func socket(domain int, typ int, proto int) (fd int, errno int) {
78 r0, r1, e1 := Syscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto));
79 fd = int(r0);
80 errno = int(e1);
81 return;
82}
83
84func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) {
85 r0, r1, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0);
86 errno = int(e1);
87 return;
88}
89
90func Listen(s int, n int) (errno int) {
91 r0, r1, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0);
92 errno = int(e1);
93 return;
94}
95
96func Access(path string, mode int) (errno int) {
97 r0, r1, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
98 errno = int(e1);
99 return;
100}
101
102func Acct(path string) (errno int) {
103 r0, r1, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
104 errno = int(e1);
105 return;
106}
107
108func Adjtimex(buf *Timex) (state int, errno int) {
109 r0, r1, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0);
110 state = int(r0);
111 errno = int(e1);
112 return;
113}
114
115func Chdir(path string) (errno int) {
116 r0, r1, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
117 errno = int(e1);
118 return;
119}
120
121func Chmod(path string, mode int) (errno int) {
122 r0, r1, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
123 errno = int(e1);
124 return;
125}
126
127func Chown(path string, uid int, gid int) (errno int) {
128 r0, r1, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
129 errno = int(e1);
130 return;
131}
132
133func Chroot(path string) (errno int) {
134 r0, r1, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
135 errno = int(e1);
136 return;
137}
138
139func Close(fd int) (errno int) {
140 r0, r1, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0);
141 errno = int(e1);
142 return;
143}
144
145func Creat(path string, mode int) (fd int, errno int) {
146 r0, r1, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
147 fd = int(r0);
148 errno = int(e1);
149 return;
150}
151
152func Dup(oldfd int) (fd int, errno int) {
153 r0, r1, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0);
154 fd = int(r0);
155 errno = int(e1);
156 return;
157}
158
159func Dup2(oldfd int, newfd int) (fd int, errno int) {
160 r0, r1, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0);
161 fd = int(r0);
162 errno = int(e1);
163 return;
164}
165
166func EpollCreate(size int) (fd int, errno int) {
167 r0, r1, e1 := Syscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0);
168 fd = int(r0);
169 errno = int(e1);
170 return;
171}
172
173func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) {
174 r0, r1, e1 := Syscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0);
175 errno = int(e1);
176 return;
177}
178
179func EpollWait(epfd int, events []EpollEvent, msec int) (n int, errno int) {
180 var _p0 *EpollEvent;
181 if len(events) > 0 { _p0 = &events[0]; }
182 r0, r1, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(unsafe.Pointer(_p0)), uintptr(len(events)), uintptr(msec), 0, 0);
183 n = int(r0);
184 errno = int(e1);
185 return;
186}
187
188func Exit(code int) () {
189 r0, r1, e1 := Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0);
190 return;
191}
192
193func Faccessat(dirfd int, path string, mode int, flags int) (errno int) {
194 r0, r1, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0);
195 errno = int(e1);
196 return;
197}
198
199func Fallocate(fd int, mode int, off int64, len int64) (errno int) {
200 r0, r1, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off >> 32), uintptr(len), uintptr(len >> 32));
201 errno = int(e1);
202 return;
203}
204
205func Fchdir(fd int) (errno int) {
206 r0, r1, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0);
207 errno = int(e1);
208 return;
209}
210
211func Fchmod(fd int, mode int) (errno int) {
212 r0, r1, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0);
213 errno = int(e1);
214 return;
215}
216
217func Fchmodat(dirfd int, path string, mode int, flags int) (errno int) {
218 r0, r1, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0);
219 errno = int(e1);
220 return;
221}
222
223func Fchown(fd int, uid int, gid int) (errno int) {
224 r0, r1, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid));
225 errno = int(e1);
226 return;
227}
228
229func Fchownat(dirfd int, path string, uid int, gid int, flags int) (errno int) {
230 r0, r1, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid), uintptr(flags), 0);
231 errno = int(e1);
232 return;
233}
234
235func fcntl(fd int, cmd int, arg int) (val int, errno int) {
236 r0, r1, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg));
237 val = int(r0);
238 errno = int(e1);
239 return;
240}
241
242func Fdatasync(fd int) (errno int) {
243 r0, r1, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0);
244 errno = int(e1);
245 return;
246}
247
248func Fstat(fd int, stat *Stat_t) (errno int) {
249 r0, r1, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0);
250 errno = int(e1);
251 return;
252}
253
254func Fstatfs(fd int, buf *Statfs_t) (errno int) {
255 r0, r1, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0);
256 errno = int(e1);
257 return;
258}
259
260func Fsync(fd int) (errno int) {
261 r0, r1, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0);
262 errno = int(e1);
263 return;
264}
265
266func Ftruncate(fd int, length int64) (errno int) {
267 r0, r1, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length >> 32));
268 errno = int(e1);
269 return;
270}
271
272func Getdents(fd int, buf []byte) (n int, errno int) {
273 var _p0 *byte;
274 if len(buf) > 0 { _p0 = &buf[0]; }
275 r0, r1, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
276 n = int(r0);
277 errno = int(e1);
278 return;
279}
280
281func Getegid() (egid int) {
282 r0, r1, e1 := Syscall(SYS_GETEGID, 0, 0, 0);
283 egid = int(r0);
284 return;
285}
286
287func Geteuid() (euid int) {
288 r0, r1, e1 := Syscall(SYS_GETEUID, 0, 0, 0);
289 euid = int(r0);
290 return;
291}
292
293func Getgid() (gid int) {
294 r0, r1, e1 := Syscall(SYS_GETGID, 0, 0, 0);
295 gid = int(r0);
296 return;
297}
298
299func Getpgid(pid int) (pgid int, errno int) {
300 r0, r1, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0);
301 pgid = int(r0);
302 errno = int(e1);
303 return;
304}
305
306func Getpgrp() (pid int) {
307 r0, r1, e1 := Syscall(SYS_GETPGRP, 0, 0, 0);
308 pid = int(r0);
309 return;
310}
311
312func Getpid() (pid int) {
313 r0, r1, e1 := Syscall(SYS_GETPID, 0, 0, 0);
314 pid = int(r0);
315 return;
316}
317
318func Getppid() (ppid int) {
319 r0, r1, e1 := Syscall(SYS_GETPPID, 0, 0, 0);
320 ppid = int(r0);
321 return;
322}
323
324func Getrlimit(resource int, rlim *Rlimit) (errno int) {
325 r0, r1, e1 := Syscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0);
326 errno = int(e1);
327 return;
328}
329
330func Getrusage(who int, rusage *Rusage) (errno int) {
331 r0, r1, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0);
332 errno = int(e1);
333 return;
334}
335
336func Gettid() (tid int) {
337 r0, r1, e1 := Syscall(SYS_GETTID, 0, 0, 0);
338 tid = int(r0);
339 return;
340}
341
342func Gettimeofday(tv *Timeval) (errno int) {
343 r0, r1, e1 := Syscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0);
344 errno = int(e1);
345 return;
346}
347
348func Getuid() (uid int) {
349 r0, r1, e1 := Syscall(SYS_GETUID, 0, 0, 0);
350 uid = int(r0);
351 return;
352}
353
354func Ioperm(from int, num int, on int) (errno int) {
355 r0, r1, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on));
356 errno = int(e1);
357 return;
358}
359
360func Iopl(level int) (errno int) {
361 r0, r1, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0);
362 errno = int(e1);
363 return;
364}
365
366func Kill(pid int, sig int) (errno int) {
367 r0, r1, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(sig), 0);
368 errno = int(e1);
369 return;
370}
371
372func Klogctl(typ int, buf []byte) (n int, errno int) {
373 var _p0 *byte;
374 if len(buf) > 0 { _p0 = &buf[0]; }
375 r0, r1, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
376 n = int(r0);
377 errno = int(e1);
378 return;
379}
380
381func Lchown(path string, uid int, gid int) (errno int) {
382 r0, r1, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
383 errno = int(e1);
384 return;
385}
386
387func Link(oldpath string, newpath string) (errno int) {
388 r0, r1, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
389 errno = int(e1);
390 return;
391}
392
393func Lstat(path string, stat *Stat_t) (errno int) {
394 r0, r1, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
395 errno = int(e1);
396 return;
397}
398
399func Mkdir(path string, mode int) (errno int) {
400 r0, r1, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
401 errno = int(e1);
402 return;
403}
404
405func Mkdirat(dirfd int, path string, mode int) (errno int) {
406 r0, r1, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode));
407 errno = int(e1);
408 return;
409}
410
411func Mknod(path string, mode int, dev int) (errno int) {
412 r0, r1, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev));
413 errno = int(e1);
414 return;
415}
416
417func Mknodat(dirfd int, path string, mode int, dev int) (errno int) {
418 r0, r1, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev), 0, 0);
419 errno = int(e1);
420 return;
421}
422
423func Nanosleep(time *Timespec, leftover *Timespec) (errno int) {
424 r0, r1, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0);
425 errno = int(e1);
426 return;
427}
428
429func Open(path string, mode int, perm int) (fd int, errno int) {
430 r0, r1, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm));
431 fd = int(r0);
432 errno = int(e1);
433 return;
434}
435
436func Openat(dirfd int, path string, flags int, mode int) (fd int, errno int) {
437 r0, r1, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), uintptr(mode), 0, 0);
438 fd = int(r0);
439 errno = int(e1);
440 return;
441}
442
443func Pause() (errno int) {
444 r0, r1, e1 := Syscall(SYS_PAUSE, 0, 0, 0);
445 errno = int(e1);
446 return;
447}
448
449func PivotRoot(newroot string, putold string) (errno int) {
450 r0, r1, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(StringBytePtr(newroot))), uintptr(unsafe.Pointer(StringBytePtr(putold))), 0);
451 errno = int(e1);
452 return;
453}
454
455func Pread(fd int, p []byte, offset int64) (n int, errno int) {
456 var _p0 *byte;
457 if len(p) > 0 { _p0 = &p[0]; }
458 r0, r1, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0);
459 n = int(r0);
460 errno = int(e1);
461 return;
462}
463
464func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
465 var _p0 *byte;
466 if len(p) > 0 { _p0 = &p[0]; }
467 r0, r1, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0);
468 n = int(r0);
469 errno = int(e1);
470 return;
471}
472
473func Read(fd int, p []byte) (n int, errno int) {
474 var _p0 *byte;
475 if len(p) > 0 { _p0 = &p[0]; }
476 r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
477 n = int(r0);
478 errno = int(e1);
479 return;
480}
481
482func Readlink(path string, buf []byte) (n int, errno int) {
483 var _p0 *byte;
484 if len(buf) > 0 { _p0 = &buf[0]; }
485 r0, r1, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
486 n = int(r0);
487 errno = int(e1);
488 return;
489}
490
491func Rename(oldpath string, newpath string) (errno int) {
492 r0, r1, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
493 errno = int(e1);
494 return;
495}
496
497func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (errno int) {
498 r0, r1, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(newdirfd), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0, 0);
499 errno = int(e1);
500 return;
501}
502
503func Rmdir(path string) (errno int) {
504 r0, r1, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
505 errno = int(e1);
506 return;
507}
508
509func Seek(fd int, offset int64, whence int) (off int64, errno int) {
510 r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset >> 32), uintptr(whence), 0, 0);
511 off = int64(r0);
512 errno = int(e1);
513 return;
514}
515
516func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, errno int) {
517 r0, r1, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0);
518 n = int(r0);
519 errno = int(e1);
520 return;
521}
522
523func Setdomainname(p []byte) (errno int) {
524 var _p0 *byte;
525 if len(p) > 0 { _p0 = &p[0]; }
526 r0, r1, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
527 errno = int(e1);
528 return;
529}
530
531func Setfsgid(gid int) (errno int) {
532 r0, r1, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0);
533 errno = int(e1);
534 return;
535}
536
537func Setfsuid(uid int) (errno int) {
538 r0, r1, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0);
539 errno = int(e1);
540 return;
541}
542
543func Setgid(gid int) (errno int) {
544 r0, r1, e1 := Syscall(SYS_SETGID, uintptr(gid), 0, 0);
545 errno = int(e1);
546 return;
547}
548
549func Sethostname(p []byte) (errno int) {
550 var _p0 *byte;
551 if len(p) > 0 { _p0 = &p[0]; }
552 r0, r1, e1 := Syscall(SYS_SETHOSTNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
553 errno = int(e1);
554 return;
555}
556
557func Setpgid(pid int, pgid int) (errno int) {
558 r0, r1, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0);
559 errno = int(e1);
560 return;
561}
562
563func Setregid(rgid int, egid int) (errno int) {
564 r0, r1, e1 := Syscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0);
565 errno = int(e1);
566 return;
567}
568
569func Setresgid(rgid int, egid int, sgid int) (errno int) {
570 r0, r1, e1 := Syscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid));
571 errno = int(e1);
572 return;
573}
574
575func Setresuid(ruid int, euid int, suid int) (errno int) {
576 r0, r1, e1 := Syscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid));
577 errno = int(e1);
578 return;
579}
580
581func Setreuid(ruid int, euid int) (errno int) {
582 r0, r1, e1 := Syscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0);
583 errno = int(e1);
584 return;
585}
586
587func Setrlimit(resource int, rlim *Rlimit) (errno int) {
588 r0, r1, e1 := Syscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0);
589 errno = int(e1);
590 return;
591}
592
593func Setsid() (pid int) {
594 r0, r1, e1 := Syscall(SYS_SETSID, 0, 0, 0);
595 pid = int(r0);
596 return;
597}
598
599func Settimeofday(tv *Timeval) (errno int) {
600 r0, r1, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0);
601 errno = int(e1);
602 return;
603}
604
605func Setuid(uid int) (errno int) {
606 r0, r1, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0);
607 errno = int(e1);
608 return;
609}
610
611func Shutdown(fd int, how int) (errno int) {
612 r0, r1, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0);
613 errno = int(e1);
614 return;
615}
616
617func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, errno int) {
618 r0, r1, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags));
619 n = int64(r0);
620 errno = int(e1);
621 return;
622}
623
624func Stat(path string, stat *Stat_t) (errno int) {
625 r0, r1, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
626 errno = int(e1);
627 return;
628}
629
630func Statfs(path string, buf *Statfs_t) (errno int) {
631 r0, r1, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0);
632 errno = int(e1);
633 return;
634}
635
636func Symlink(oldpath string, newpath string) (errno int) {
637 r0, r1, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
638 errno = int(e1);
639 return;
640}
641
642func Sync() () {
643 r0, r1, e1 := Syscall(SYS_SYNC, 0, 0, 0);
644 return;
645}
646
647func SyncFileRange(fd int, off int64, n int64, flags int) (errno int) {
648 r0, r1, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off >> 32), uintptr(n), uintptr(n >> 32), uintptr(flags));
649 errno = int(e1);
650 return;
651}
652
653func Sysinfo(info *Sysinfo_t) (errno int) {
654 r0, r1, e1 := Syscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0);
655 errno = int(e1);
656 return;
657}
658
659func Tee(rfd int, wfd int, len int, flags int) (n int64, errno int) {
660 r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0);
661 n = int64(r0);
662 errno = int(e1);
663 return;
664}
665
666func Tgkill(tgid int, tid int, sig int) (errno int) {
667 r0, r1, e1 := Syscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig));
668 errno = int(e1);
669 return;
670}
671
672func Time(t *Time_t) (tt Time_t, errno int) {
673 r0, r1, e1 := Syscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0);
674 tt = Time_t(r0);
675 errno = int(e1);
676 return;
677}
678
679func Times(tms *Tms) (ticks uintptr, errno int) {
680 r0, r1, e1 := Syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0);
681 ticks = uintptr(r0);
682 errno = int(e1);
683 return;
684}
685
686func Truncate(path string, length int64) (errno int) {
687 r0, r1, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), uintptr(length >> 32));
688 errno = int(e1);
689 return;
690}
691
692func Umask(mask int) (oldmask int) {
693 r0, r1, e1 := Syscall(SYS_UMASK, uintptr(mask), 0, 0);
694 oldmask = int(r0);
695 return;
696}
697
698func Uname(buf *Utsname) (errno int) {
699 r0, r1, e1 := Syscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0);
700 errno = int(e1);
701 return;
702}
703
704func Unlink(path string) (errno int) {
705 r0, r1, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
706 errno = int(e1);
707 return;
708}
709
710func Unlinkat(dirfd int, path string) (errno int) {
711 r0, r1, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), 0);
712 errno = int(e1);
713 return;
714}
715
716func Unshare(flags int) (errno int) {
717 r0, r1, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0);
718 errno = int(e1);
719 return;
720}
721
722func Ustat(dev int, ubuf *Ustat_t) (errno int) {
723 r0, r1, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0);
724 errno = int(e1);
725 return;
726}
727
728func Utime(path string, buf *Utimbuf) (errno int) {
729 r0, r1, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0);
730 errno = int(e1);
731 return;
732}
733
734func Write(fd int, p []byte) (n int, errno int) {
735 var _p0 *byte;
736 if len(p) > 0 { _p0 = &p[0]; }
737 r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
738 n = int(r0);
739 errno = int(e1);
740 return;
741}
742
743func exitThread(code int) (errno int) {
744 r0, r1, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0);
745 errno = int(e1);
746 return;
747}
748
749func read(fd int, p *byte, np int) (n int, errno int) {
750 r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np));
751 n = int(r0);
752 errno = int(e1);
753 return;
754}
755
756func write(fd int, p *byte, np int) (n int, errno int) {
757 r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np));
758 n = int(r0);
759 errno = int(e1);
760 return;
761}
762
763
764