library/src/threads/BP-LinuxThreads.cc
// Creates a new mutex (fast mutex, not recursive)
Creates a new mutex (fast mutex, not recursive)
Creates a new mutex ( fast mutex not recursive )
pthread_mutex_t * CreateNewMutex()
{
	pthread_mutex_t * newMutex = (pthread_mutex_t *) bpmalloc(sizeof(pthread_mutex_t));
	if(pthread_mutex_init(newMutex, NULL) != 0){
		bpfree(newMutex);
		return NULL;
	}
	return newMutex;	
}
pthread_mutex_t * CreateNewMutex ( ) { pthread_mutex_t * newMutex = ( pthread_mutex_t * ) bpmalloc ( sizeof ( pthread_mutex_t ) ) ; if ( pthread_mutex_init ( newMutex , NULL ) != 0 ) { bpfree ( newMutex ) ; return NULL ; } return newMutex ; }
Creates a new mutex (fast mutex, not recursive)
Creates a new mutex ( fast mutex not recursive )
// allocate space for new mutex // initialize mutex // return the new mutex