ORP support
This commit is contained in:
parent
cfafc26b68
commit
addb8cbce3
@ -1493,12 +1493,16 @@ spy_goal( USES_REGS1 )
|
|||||||
HR += 2;
|
HR += 2;
|
||||||
{
|
{
|
||||||
PredEntry *pt0;
|
PredEntry *pt0;
|
||||||
|
#if THREADS
|
||||||
LOCK(GLOBAL_ThreadHandlesLock);
|
LOCK(GLOBAL_ThreadHandlesLock);
|
||||||
|
#endif
|
||||||
pt0 = SpyCode;
|
pt0 = SpyCode;
|
||||||
P_before_spy = P;
|
P_before_spy = P;
|
||||||
P = pt0->CodeOfPred;
|
P = pt0->CodeOfPred;
|
||||||
/* for profiler */
|
/* for profiler */
|
||||||
|
#if THREADS
|
||||||
UNLOCK(GLOBAL_ThreadHandlesLock);
|
UNLOCK(GLOBAL_ThreadHandlesLock);
|
||||||
|
#endif
|
||||||
#ifdef LOW_LEVEL_TRACER
|
#ifdef LOW_LEVEL_TRACER
|
||||||
if (Yap_do_low_level_trace)
|
if (Yap_do_low_level_trace)
|
||||||
low_level_trace(enter_pred,pt0,XREGS+1);
|
low_level_trace(enter_pred,pt0,XREGS+1);
|
||||||
|
@ -3096,7 +3096,7 @@ YAP_Init(YAP_init_args *yap_init)
|
|||||||
/* slaves, waiting for work */
|
/* slaves, waiting for work */
|
||||||
CurrentModule = USER_MODULE;
|
CurrentModule = USER_MODULE;
|
||||||
P = GETWORK_FIRST_TIME;
|
P = GETWORK_FIRST_TIME;
|
||||||
Yap_exec_absmi(FALSE);
|
Yap_exec_absmi(FALSE, YAP_EXEC_ABSMI);
|
||||||
Yap_Error(INTERNAL_ERROR, TermNil, "abstract machine unexpected exit (YAP_Init)");
|
Yap_Error(INTERNAL_ERROR, TermNil, "abstract machine unexpected exit (YAP_Init)");
|
||||||
}
|
}
|
||||||
#endif /* YAPOR */
|
#endif /* YAPOR */
|
||||||
|
@ -179,8 +179,10 @@ extern "C" {
|
|||||||
#if DEBUG_DLMALLOC
|
#if DEBUG_DLMALLOC
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#else
|
#else
|
||||||
|
#ifndef assert
|
||||||
#define assert(x) ((void)0)
|
#define assert(x) ((void)0)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The unsigned integer type used for comparing any two chunk sizes.
|
The unsigned integer type used for comparing any two chunk sizes.
|
||||||
|
@ -71,10 +71,10 @@ extern int debug_locks;
|
|||||||
__BASE_FILE__, __LINE__,&(LOCK_VAR)); \
|
__BASE_FILE__, __LINE__,&(LOCK_VAR)); \
|
||||||
spin_unlock((spinlock_t *)&(LOCK_VAR))
|
spin_unlock((spinlock_t *)&(LOCK_VAR))
|
||||||
#else
|
#else
|
||||||
#define LOCK(LOCK_VAR) do { \
|
#define LOCK(LOCK_VAR) { do { \
|
||||||
if (TRY_LOCK(&(LOCK_VAR))) break; \
|
if (TRY_LOCK(&(LOCK_VAR))) break; \
|
||||||
while (IS_LOCKED(LOCK_VAR)) continue; \
|
while (IS_LOCKED(LOCK_VAR)) continue; \
|
||||||
} while (1)
|
} while (1); }
|
||||||
#define IS_LOCKED(LOCK_VAR) ((LOCK_VAR) != 0)
|
#define IS_LOCKED(LOCK_VAR) ((LOCK_VAR) != 0)
|
||||||
#define IS_UNLOCKED(LOCK_VAR) ((LOCK_VAR) == 0)
|
#define IS_UNLOCKED(LOCK_VAR) ((LOCK_VAR) == 0)
|
||||||
#define UNLOCK(LOCK_VAR) spin_unlock((spinlock_t *)&(LOCK_VAR))
|
#define UNLOCK(LOCK_VAR) spin_unlock((spinlock_t *)&(LOCK_VAR))
|
||||||
|
Reference in New Issue
Block a user