Lines Matching refs:mutexp
579 MUTEX_T mutexp; in tsrm_mutex_alloc() local
581 mutexp = malloc(sizeof(CRITICAL_SECTION)); in tsrm_mutex_alloc()
582 InitializeCriticalSection(mutexp); in tsrm_mutex_alloc()
584 mutexp = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t)); in tsrm_mutex_alloc()
585 pthread_mutex_init(mutexp,NULL); in tsrm_mutex_alloc()
590 return( mutexp ); in tsrm_mutex_alloc()
595 TSRM_API void tsrm_mutex_free(MUTEX_T mutexp) in tsrm_mutex_free() argument
597 if (mutexp) { in tsrm_mutex_free()
599 DeleteCriticalSection(mutexp); in tsrm_mutex_free()
600 free(mutexp); in tsrm_mutex_free()
602 pthread_mutex_destroy(mutexp); in tsrm_mutex_free()
603 free(mutexp); in tsrm_mutex_free()
616 TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp) in tsrm_mutex_lock() argument
620 EnterCriticalSection(mutexp); in tsrm_mutex_lock()
623 return pthread_mutex_lock(mutexp); in tsrm_mutex_lock()
632 TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp) in tsrm_mutex_unlock() argument
636 LeaveCriticalSection(mutexp); in tsrm_mutex_unlock()
639 return pthread_mutex_unlock(mutexp); in tsrm_mutex_unlock()