Lines Matching refs:mutexp
605 MUTEX_T mutexp; in tsrm_mutex_alloc() local
607 mutexp = malloc(sizeof(CRITICAL_SECTION)); in tsrm_mutex_alloc()
608 InitializeCriticalSection(mutexp); in tsrm_mutex_alloc()
610 mutexp = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t)); in tsrm_mutex_alloc()
611 pthread_mutex_init(mutexp,NULL); in tsrm_mutex_alloc()
616 return( mutexp ); in tsrm_mutex_alloc()
621 TSRM_API void tsrm_mutex_free(MUTEX_T mutexp) in tsrm_mutex_free() argument
623 if (mutexp) { in tsrm_mutex_free()
625 DeleteCriticalSection(mutexp); in tsrm_mutex_free()
626 free(mutexp); in tsrm_mutex_free()
628 pthread_mutex_destroy(mutexp); in tsrm_mutex_free()
629 free(mutexp); in tsrm_mutex_free()
642 TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp) in tsrm_mutex_lock() argument
646 EnterCriticalSection(mutexp); in tsrm_mutex_lock()
649 return pthread_mutex_lock(mutexp); in tsrm_mutex_lock()
658 TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp) in tsrm_mutex_unlock() argument
662 LeaveCriticalSection(mutexp); in tsrm_mutex_unlock()
665 return pthread_mutex_unlock(mutexp); in tsrm_mutex_unlock()