]> Cypherpunks repositories - gostls13.git/commitdiff
arm: more fixes
authorRuss Cox <rsc@golang.org>
Wed, 8 Dec 2010 21:49:49 +0000 (16:49 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 8 Dec 2010 21:49:49 +0000 (16:49 -0500)
R=ken2
CC=golang-dev
https://golang.org/cl/3523041

src/pkg/runtime/cgo/Makefile
src/pkg/runtime/cgo/arm.S [new file with mode: 0644]
src/pkg/runtime/cgo/linux_arm.c [new file with mode: 0644]
src/pkg/syscall/syscall_linux_arm.go
src/pkg/syscall/zsyscall_linux_arm.go

index 09e51f2e6a9300d7e207009d39b7d1209c69277a..749927638719d264f8898fb315ee4c12359c6436 100644 (file)
@@ -4,11 +4,19 @@
 
 include ../../../Make.inc
 
+ENABLED:=1
+
+ifeq ($(GOARCH),arm)
+ENABLED:=0
+endif
+
 TARG=runtime/cgo
 
 GOFILES=\
        cgo.go\
 
+ifeq ($(ENABLED),1)
+
 # Unwarranted chumminess with Make.pkg's cgo rules.
 # Do not try this at home.
 GCC_OFILES=\
@@ -23,6 +31,8 @@ OFILES=\
 
 CGO_LDFLAGS=-lpthread
 
+endif
+
 include ../../../Make.pkg
 
 $(GOARCH).o: $(GOARCH).S
diff --git a/src/pkg/runtime/cgo/arm.S b/src/pkg/runtime/cgo/arm.S
new file mode 100644 (file)
index 0000000..32d8629
--- /dev/null
@@ -0,0 +1 @@
+/* unimplemented */
diff --git a/src/pkg/runtime/cgo/linux_arm.c b/src/pkg/runtime/cgo/linux_arm.c
new file mode 100644 (file)
index 0000000..e556c43
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2010 The Go Authors.  All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "libcgo.h"
+
+static void
+xinitcgo(void)
+{
+}
+
+void (*initcgo)(void) = xinitcgo;
+
+void
+libcgo_sys_thread_start(ThreadStart *ts)
+{
+       // unimplemented
+       *(int*)0 = 0;
+}
index 00ab24f68e0d9e02d095a13811336fdceced6de5..c567bcec1c4d38b0635dfd8e7f74908ba65fa4e5 100644 (file)
@@ -64,6 +64,8 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, errno int)
 //sys  recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, errno int)
 //sys  sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (errno int)
 //sys  socketpair(domain int, typ int, flags int, fd *[2]int) (errno int)
+//sys  recvmsg(s int, msg *Msghdr, flags int) (n int, errno int)
+//sys  sendmsg(s int, msg *Msghdr, flags int) (errno int)
 
 //sys  Chown(path string, uid int, gid int) (errno int)
 //sys  Fchown(fd int, uid int, gid int) (errno int)
index ee78bf062ab803c800423b2adf5a4db4b643f47f..67d5e4b6a59804c4824be5e4d5fd328bfcef5d74 100644 (file)
@@ -840,6 +840,23 @@ func socketpair(domain int, typ int, flags int, fd *[2]int) (errno int) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func recvmsg(s int, msg *Msghdr, flags int) (n int, errno int) {
+       r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+       n = int(r0)
+       errno = int(e1)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (errno int) {
+       _, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+       errno = int(e1)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Chown(path string, uid int, gid int) (errno int) {
        _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid))
        errno = int(e1)