static void * Thread_Worker (void *data) /* IN */ { ThreadInfo *info = data; sigset_t set; void *ret; ASSERT (info); ASSERT (info->func); sigfillset (&set); pthread_sigmask (SIG_BLOCK, &set, NULL); #if defined(HAVE_PTHREAD_SETNAME_NP) if (info->name) { #if defined(PLATFORM_APPLE) pthread_setname_np (info->name); #elif defined(PLATFORM_LINUX) pthread_setname_np (pthread_self (), info->name); #endif } #endif ret = info->func (info->data); free (info->name); free (info); return ret; }
static DWORD CALLBACK StarterFunc(void *ptr) { ThreadInfo *inf = (ThreadInfo*)ptr; ALint ret; ret = inf->func(inf->ptr); ExitThread((DWORD)ret); return (DWORD)ret; }
static void *StarterFunc(void *ptr) { ThreadInfo *inf = (ThreadInfo*)ptr; void *ret = (void*)(inf->func(inf->ptr)); return ret; }
static void *StarterFunc(void *ptr) { ThreadInfo *inf = (ThreadInfo*)ptr; inf->ret = inf->func(inf->ptr); return NULL; }