Hi Bryan,

> 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.  

That should indeed be the case.

> However, when I compare the pointer stored from g_thread_create() with
> that which is returned by g_thread_self() I get different addresses.

That shouldn't happen.

The following code does, what you would expect.

#include <glib.h>

void* 
thread_func(void *anything)
{    
  GThread *thread;    
  thread = g_thread_self ();
  g_print ("%x\n", thread);
}

int 
main (void)
{    
  GThread *thread;
  g_thread_init (NULL);
  thread = g_thread_create (thread_func,NULL,FALSE,NULL);
  g_print ("%x\n", thread);
}

Bye,
Sebastian
-- 
Sebastian Wilhelmi                 |            h�r ovanf�r alla molnen
mailto:[EMAIL PROTECTED]              |     �r himmlen s� f�runderligt bl�
http://seppi.de                    |

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to