Example of OpenSSL Multithreading

2001-08-27 Thread Ashada Karunaratna
Hi All, Is there anyone who has an example of SSL Multithreading in Linux platform. I saw the example shipped with OpenSSL. But it seem to be bit unclear for me. If anyone have an example on Multithreading please send me. Ashada __

Re: Example of OpenSSL Multithreading

2001-08-28 Thread Dima Volodin
On Mon, 27 Aug 2001 14:50:39 -0400, you wrote: >> > unsigned long SSL_pthreads_thread_id(void) { >> > unsigned long ret; >> > ret=(unsigned long)pthread_self(); >> > return(ret); >> > } > >> > The return type of pthread_self(), pthread_t, is not necessary a type >> > castable to unsigned lo

Re: Example of OpenSSL Multithreading

2001-08-28 Thread Rich Salz
> /*** if (tid == 0) this check was a bad idea, for further > discussion of weak memory models and > aggressive optimization techniques you are > welcome to comp.programming.threads ***/ Been there, done that, and you're

Re: Example of OpenSSL Multithreading

2001-08-28 Thread Dima Volodin
On Tue, 28 Aug 2001 12:13:40 -0400, you wrote: >> /*** anyway, pthread_once is not too good either - something >> like a C++ constructor on a global static variable would be >> much better ***/ >> pthread_once(&tid_once, init_openssl_tid); > >That's not portable -- go look