fix locks
This commit is contained in:
@@ -22,13 +22,13 @@
|
||||
#include <pthread.h>
|
||||
|
||||
//#define DEBUG_PE_LOCKS 1
|
||||
#define DEBUG_LOCKS 1
|
||||
//#define DEBUG_LOCKS 1
|
||||
#include <stdio.h>
|
||||
|
||||
int Yap_ThreadID( void );
|
||||
#define debugf stdout
|
||||
#define debugf ( stderr ? stderr : stdout )
|
||||
|
||||
#define INIT_LOCK(LOCK_VAR) (void)(fprintf(debugf, "[%d] %s:%d: LOCK(%p)\n", Yap_ThreadID(),__BASE_FILE__, __LINE__,&(LOCK_VAR)) && pthread_mutex_init(&(LOCK_VAR), NULL) )
|
||||
#define INIT_LOCK(LOCK_VAR) pthread_mutex_init(&(LOCK_VAR), NULL)
|
||||
#define DESTROY_LOCK(LOCK_VAR) pthread_mutex_destroy(&(LOCK_VAR))
|
||||
#define TRY_LOCK(LOCK_VAR) pthread_mutex_trylock(&(LOCK_VAR))
|
||||
#if DEBUG_LOCKS
|
||||
|
Reference in New Issue
Block a user