index b04de81b8eb146807ce10e7c9c144cb2615d3a96..7408d5834b713ba28816e06e3bf4434a99720f79 100644 (file)
CK_RV OSCreateMutex(CK_VOID_PTR_PTR newMutex)
{
int rv;
+ static const pthread_mutex_t init = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
/* Allocate memory */
pthread_mutex_t* pthreadMutex = (pthread_mutex_t*) malloc(sizeof(pthread_mutex_t));
return CKR_HOST_MEMORY;
}
+ *pthreadMutex = init;
+
+#if 0
/* Initialise the mutex */
if ((rv = pthread_mutex_init(pthreadMutex, NULL)) != 0)
{
return CKR_GENERAL_ERROR;
}
+#endif
*newMutex = pthreadMutex;