Skip to content

Commit

Permalink
std::mutex replaced with itc::sys::AtomicMutex
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kraynyukhov committed Jun 7, 2018
1 parent c202136 commit b9a11cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/TLSServerContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@

// ITCLib/ITCFramework
#include <Singleton.h>
#include <sys/atomic_mutex.h>

typedef void (*locking_function)(int mode, int n, const char *file, int line);

void openssl_crypt_locking_function_callback(int mode, int n, const char* file, const int line)
{
static std::vector<std::mutex> locks(CRYPTO_num_locks());
static std::vector<itc::sys::AtomicMutex> locks(CRYPTO_num_locks());
if(n>=static_cast<int>(locks.size()))
{
abort();
Expand Down

0 comments on commit b9a11cd

Please # to comment.