1
0
mirror of https://github.com/golang/go synced 2024-10-05 14:01:21 -06:00
go/src/runtime/stubs_android.go
Hyang-Ah Hana Kim 30ee5919bd runtime: add syscalls needed for android/amd64 logging.
access, connect, socket.

In Android-L, logging is done by writing the log messages to the logd
process through a unix domain socket.

Also, changed the arg types of those syscall stubs to match linux
programming APIs.

For golang/go#10743

Change-Id: I66368a03316e253561e9e76aadd180c2cd2e48f3
Reviewed-on: https://go-review.googlesource.com/15993
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-10-20 16:56:58 +00:00

17 lines
436 B
Go

package runtime
import "unsafe"
// Return values of access/connect/socket are the return values of the syscall
// (may encode error numbers).
// int access(const char *, int)
//go:noescape
func access(name *byte, mode int32) int32
// int connect(int, const struct sockaddr*, socklen_t)
func connect(fd int32, addr unsafe.Pointer, len int32) int32
// int socket(int, int, int)
func socket(domain int32, typ int32, prot int32) int32