runtime/cgo: remove threadentry functions specialized for android

The specialized functions set up the g register using the pthread
API instead of setg_gcc, but the inittls functions have already
made sure setg_gcc works.

Updates #29674

Change-Id: Ie67c068d638af8b5823978ee839f6b61b2228996
Reviewed-on: https://go-review.googlesource.com/c/go/+/169797
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Elias Naur 2019-03-28 13:25:21 +01:00
parent 9f6b21caea
commit b2f19dad8b
4 changed files with 2 additions and 59 deletions

View file

@ -13,9 +13,8 @@
static void* threadentry(void*);
static void (*setg_gcc)(void*);
// These will be set in gcc_android_amd64.c for android-specific customization.
// This will be set in gcc_android_amd64.c for android-specific customization.
void (*x_cgo_inittls)(void);
void* (*x_cgo_threadentry)(void*);
void
x_cgo_init(G* g, void (*setg)(void*))
@ -83,10 +82,6 @@ _cgo_sys_thread_start(ThreadStart *ts)
static void*
threadentry(void *v)
{
if (x_cgo_threadentry) {
return x_cgo_threadentry(v);
}
ThreadStart ts;
ts = *(ThreadStart*)v;