]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove runtime wait/notify from ppc64x architectures.
authorSrdjan Petrovic <spetrovic@google.com>
Sat, 11 Apr 2015 00:23:00 +0000 (17:23 -0700)
committerDavid Crawshaw <crawshaw@golang.org>
Mon, 13 Apr 2015 17:21:04 +0000 (17:21 +0000)
Related to issue #10410

For some reason, any non-trivial code in _cgo_wait_runtime_init_done
(even fprintf()) will crash that call.

If anybody has any guess why this is happening, please let me know!

For now, I'm clearing the functions for ppc64, as it's currently not used.

Change-Id: I1b11383aaf4f9f9a16f1fd6606842cfeedc9f0b3
Reviewed-on: https://go-review.googlesource.com/8766
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: Srdjan Petrovic <spetrovic@google.com>

src/runtime/cgo/gcc_libinit.c
src/runtime/cgo/gcc_libinit_linux_ppc64x.c [new file with mode: 0644]

index 1126e1b5961c9df37a4d07174013644b281c8e77..95a18a8bb64a560fa7069fe9f4218ba0169b3bdd 100644 (file)
@@ -3,6 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build darwin dragonfly freebsd linux netbsd
+// +build !ppc64,!ppc64le
 
 #include <pthread.h>
 #include <stdio.h>
diff --git a/src/runtime/cgo/gcc_libinit_linux_ppc64x.c b/src/runtime/cgo/gcc_libinit_linux_ppc64x.c
new file mode 100644 (file)
index 0000000..82413a5
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2015 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.
+
+// TODO: see issue #10410
+// +build linux
+// +build ppc64 ppc64le
+
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+x_cgo_sys_thread_create(void* (*func)(void*), void* arg) {
+       fprintf(stderr, "x_cgo_sys_thread_create not implemented");
+       abort();
+}
+
+void
+_cgo_wait_runtime_init_done() {
+       // TODO(spetrovic): implement this method.
+}
+
+void
+x_cgo_notify_runtime_init_done(void* dummy) {
+       // TODO(spetrovic): implement this method.
+}
\ No newline at end of file