Пример #1
0
static void *thread_start_routine (void *arg)
{
    MThread *newthr = (MThread *)arg;
    pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
    newthr->routine (newthr->arg);
    return NULL;
}
Пример #2
0
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;
}