#include <signal.h>
#include "libcgo.h"
-static void* threadentry(void*);
-static pthread_key_t k1;
-
#define magic1 (0x23581321U)
static void
asm volatile("movl %%gs:0xf8, %0" : "=r"(x));
pthread_setspecific(k, 0);
if (x == magic1) {
- k1 = k;
break;
}
if(ntofree >= nelem(tofree)) {
}
}
-
-static void*
-threadentry(void *v)
-{
- ThreadStart ts;
-
- ts = *(ThreadStart*)v;
- free(v);
-
- if (pthread_setspecific(k1, (void*)ts.g) != 0) {
- fprintf(stderr, "runtime/cgo: pthread_setspecific failed\n");
- abort();
- }
-
- crosscall_386(ts.fn);
- return nil;
-}
-
void (*x_cgo_inittls)(void) = inittls;
-void* (*x_cgo_threadentry)(void*) = threadentry;
#include <signal.h>
#include "libcgo.h"
-static void* threadentry(void*);
-static pthread_key_t k1;
-
#define magic1 (0x23581321345589ULL)
static void
asm volatile("movq %%fs:0x1d0, %0" : "=r"(x));
pthread_setspecific(k, 0);
if(x == magic1) {
- k1 = k;
break;
}
if(ntofree >= nelem(tofree)) {
}
}
-
-static void*
-threadentry(void *v)
-{
- ThreadStart ts;
-
- ts = *(ThreadStart*)v;
- free(v);
-
- if (pthread_setspecific(k1, (void*)ts.g) != 0) {
- fprintf(stderr, "runtime/cgo: pthread_setspecific failed\n");
- abort();
- }
-
- crosscall_amd64(ts.fn);
- return nil;
-}
-
void (*x_cgo_inittls)(void) = inittls;
-void* (*x_cgo_threadentry)(void*) = threadentry;
static void *threadentry(void*);
static void (*setg_gcc)(void*);
-// These will be set in gcc_android_386.c for android-specific customization.
+// This will be set in gcc_android_386.c for android-specific customization.
void (*x_cgo_inittls)(void);
-void* (*x_cgo_threadentry)(void*);
void
x_cgo_init(G *g, void (*setg)(void*))
}
}
-
void
_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;
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*))
static void*
threadentry(void *v)
{
- if (x_cgo_threadentry) {
- return x_cgo_threadentry(v);
- }
-
ThreadStart ts;
ts = *(ThreadStart*)v;