On Thu, Nov 02, 2000 at 03:34:07PM -0500, Gregory Nicholls wrote:

>     I'm using the State Threads package to implement an SSL
> server. State Threads are non-preemptive and only context switch at
> defined API boundaries (specifically when performing network
> IO). This means that multiple threads can safely access shared
> static as long as they finish their operations before calling a
> context-switching API. I'm using BIO-pairs to enable the State
> Threads API to handle the network side of my SSL traffic.  Now I've
> read about the locking callbacks but I'm wondering if they're needed
> in this sort of environment (he say's, hoping like hell that they're
> not).  Can anyone shed some light on this ??

As long as you don't use any callback functions that may do a context
switch, your program will look like a single-threaded program from
OpenSSL's point of view.  Thus you won't need any locking callbacks.
(But make sure to document this decision in case your program
is ever ported to a preemptive multi-threading environment.)


-- 
Bodo Möller <[EMAIL PROTECTED]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to