OpenSSL.Core.Native.CRYPTO_num_locks C# (CSharp) Method

CRYPTO_num_locks() private method

private CRYPTO_num_locks ( ) : int
return int
        public static extern int CRYPTO_num_locks();

Usage Example

Example #1
0
        /// <summary>
        /// Initialize this instance.
        /// </summary>
        public static void Initialize()
        {
            // Initialize the threading locks
            var nLocks = Native.CRYPTO_num_locks();

            lock_objects = new List <object>(nLocks);

            for (var i = 0; i < nLocks; i++)
            {
                var obj = new object();
                lock_objects.Add(obj);
            }

            // Initialize the internal thread id stack
            _threadIDs = new List <uint>();

            // Initialize the delegate for the locking callback
            Native.CRYPTO_set_locking_callback(_ptrOnLocking);

            // Initialize the thread id callback
            Native.CRYPTO_THREADID_set_callback(_ptrOnThreadId);
        }
Native