El mié, 26-07-2006 a las 13:45 +0200, Friedrich Dominicus escribió:

Hi Friedrich,

> As pointed out glib2 does not have an idea of some unique thread
> id (AFAIU) but as someone else has posted this might be different in
> libapr. So my question was on the point.  

You can try using the pointer reference as unique identifier. Did you
try: 

    gint thread_id = GPOINTER_TO_INT (g_thread_self ());

For a glib user I think it is the better way:

1) It is portable across platforms (the function returns the same
reference as long as the program runs) 

2) Inside Linux, according to the thread implementation of your libc it
returns the same process Id for all threads.

Cheers!

-- 
Francis Brosnan Blazquez <[EMAIL PROTECTED]>
Advanced Software Production Line, S.L.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to