static void *thread_start_routine (void *arg) { MThread *newthr = (MThread *)arg; pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL); newthr->routine (newthr->arg); return NULL; }
static DWORD WINAPI thread_start_routine (void *arg) //static void thread_start_routine (void *arg) { MThread *newthr = (MThread *)arg; newthr->id = GetCurrentThreadId (); newthr->routine (newthr->arg); return 0; }