...
Run Format

Source file src/syscall/zsyscall_nacl_amd64p32.go

Documentation: syscall

     1  // mksyscall.pl -nacl -tags nacl,amd64p32 syscall_nacl.go syscall_nacl_amd64p32.go
     2  // Code generated by the command above; DO NOT EDIT.
     3  
     4  // +build nacl,amd64p32
     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 naclFstat(fd int, stat *Stat_t) (err error) {
    23  	_, _, e1 := Syscall(sys_fstat, uintptr(fd), uintptr(unsafe.Pointer(stat)), 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 naclRead(fd int, b []byte) (n int, err error) {
    33  	var _p0 unsafe.Pointer
    34  	if len(b) > 0 {
    35  		_p0 = unsafe.Pointer(&b[0])
    36  	} else {
    37  		_p0 = unsafe.Pointer(&_zero)
    38  	}
    39  	r0, _, e1 := Syscall(sys_read, uintptr(fd), uintptr(_p0), uintptr(len(b)))
    40  	n = int(r0)
    41  	if e1 != 0 {
    42  		err = errnoErr(e1)
    43  	}
    44  	return
    45  }
    46  
    47  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    48  
    49  func naclSeek(fd int, off *int64, whence int) (err error) {
    50  	_, _, e1 := Syscall(sys_lseek, uintptr(fd), uintptr(unsafe.Pointer(off)), uintptr(whence))
    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 naclGetRandomBytes(b []byte) (err error) {
    60  	var _p0 unsafe.Pointer
    61  	if len(b) > 0 {
    62  		_p0 = unsafe.Pointer(&b[0])
    63  	} else {
    64  		_p0 = unsafe.Pointer(&_zero)
    65  	}
    66  	_, _, e1 := Syscall(sys_get_random_bytes, uintptr(_p0), uintptr(len(b)), 0)
    67  	if e1 != 0 {
    68  		err = errnoErr(e1)
    69  	}
    70  	return
    71  }
    72  

View as plain text