Is openssl library safe threaded? I'm encrypting in C++ with openssl library.

Basically I'm using these functions:


RAND_bytes(key, 32);
AES_set_encrypt_key(...)
AES_ctr128_encrypt(...)


My purpose is to encrypt parallelly with different threads. Obviously, every encryption/decryption will be on completely different objects.
Does these functions thread safe? If not, is there anything except mutex that can help? (mutex will awfully damage my systems' performance). Thanks!
OpenSSL is not threadsafe by default:


  OpenSSL currently is thread-NOT-safe by default. In order to make it
  thread-safe the caller has to provide various callbacks for locking,
  atomic integer addition, and thread ID determination (this last has
  reasonable defaults). This makes it difficult to use OpenSSL from
  multiple distinct objects in one multi-threaded process: one of them
  had better provide these callbacks, but only one of them should.
  
  Currently the only moderately safe way for libraries using OpenSSL to
  handle thread safety is to do the following as early as possible,
  possible in .init or DllMain:
  
  
  Check if the locking callback has been set, then set it if not;
  CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK), set the remaining callbacks (threadid, dynlock, and add_lock) if not already set, then CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
  
  
  In the future we hope that OpenSSL will self-initialize thread-safely
  to use native threading where availab