GThread Problem



Based on the Glib documentation, it is my understanding that g_thread_self() should return a pointer to the thread from which the function is called.  However, when I compare the pointer stored from g_thread_create() with that which is returned by g_thread_self() I get different addresses.  Can anyone explain why the behavior is different than I expect?  Psuedo code snippet below.  Using Glib packages glib2-2.2.3-0.ximian.6.2 and glib2-devel-2.2.3-0.ximian.6.2 from XD2.

Thanks in advance!
Bryan

int main (void)
{
    GThread *thread;
    thread=g_thread_create(thread,NULL,FALSE,NULL);
}

void* thread(void *anything)
{
    GThread *thread;
    thread=g_thread_self();
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]