Home | History | Annotate | Download | only in syscall
      1 // mksyscall.pl -nacl syscall_nacl.go syscall_nacl_amd64p32.go
      2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
      3 
      4 // +build amd64p32,nacl
      5 
      6 package syscall
      7 
      8 import "unsafe"
      9 
     10 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     11 
     12 func naclClose(fd int) (err error) {
     13 	_, _, e1 := Syscall(sys_close, uintptr(fd), 0, 0)
     14 	if e1 != 0 {
     15 		err = errnoErr(e1)
     16 	}
     17 	return
     18 }
     19 
     20 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     21 
     22 func Exit(code int) (err error) {
     23 	_, _, e1 := Syscall(sys_exit, uintptr(code), 0, 0)
     24 	if e1 != 0 {
     25 		err = errnoErr(e1)
     26 	}
     27 	return
     28 }
     29 
     30 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     31 
     32 func naclFstat(fd int, stat *Stat_t) (err error) {
     33 	_, _, e1 := Syscall(sys_fstat, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
     34 	if e1 != 0 {
     35 		err = errnoErr(e1)
     36 	}
     37 	return
     38 }
     39 
     40 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     41 
     42 func naclRead(fd int, b []byte) (n int, err error) {
     43 	var _p0 unsafe.Pointer
     44 	if len(b) > 0 {
     45 		_p0 = unsafe.Pointer(&b[0])
     46 	} else {
     47 		_p0 = unsafe.Pointer(&_zero)
     48 	}
     49 	r0, _, e1 := Syscall(sys_read, uintptr(fd), uintptr(_p0), uintptr(len(b)))
     50 	n = int(r0)
     51 	if e1 != 0 {
     52 		err = errnoErr(e1)
     53 	}
     54 	return
     55 }
     56 
     57 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     58 
     59 func naclSeek(fd int, off *int64, whence int) (err error) {
     60 	_, _, e1 := Syscall(sys_lseek, uintptr(fd), uintptr(unsafe.Pointer(off)), uintptr(whence))
     61 	if e1 != 0 {
     62 		err = errnoErr(e1)
     63 	}
     64 	return
     65 }
     66 
     67 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     68 
     69 func naclGetRandomBytes(b []byte) (err error) {
     70 	var _p0 unsafe.Pointer
     71 	if len(b) > 0 {
     72 		_p0 = unsafe.Pointer(&b[0])
     73 	} else {
     74 		_p0 = unsafe.Pointer(&_zero)
     75 	}
     76 	_, _, e1 := Syscall(sys_get_random_bytes, uintptr(_p0), uintptr(len(b)), 0)
     77 	if e1 != 0 {
     78 		err = errnoErr(e1)
     79 	}
     80 	return
     81 }
     82