> I'm working on fast multithreaded TLS server for node.js, and I've > encountered few problems with openssl threading support which I would > like to address with attached patches. > > Please ask me if you have any questions or comments.
As for 1st patch. Note that the section in question is guarded by 'if (add_lock_callback)'. add_lock_callback can be set by application and perform operation to its liking. In addition, on platforms with OPENSSL_CPUID_OBJ defined there is OPENSSL_atomic_add that can be used as callback, so that all you need to do then is CRYPTO_set_add_lock_callback(OPENSSL_atomic_add) in application code. Well, you'll surely get into trouble compiling this line, because OPENSSL_atomic_add is not declared. The reason is that so far it was reserved for occasion like this, i.e. when somebody requests it and puts effort into testing it in real-life application:-) Can we do that? Original idea behind OPENSSL_atomic_add was even to enable it automatically. On related note one can also add pointer manipulation subroutines so that one can maintain linked lists in lock-free manner... I'll have closer look at second patch and comment later on. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
