cut cps are different from everyone else?
This commit is contained in:
parent
5b47d00cbc
commit
4b8d655437
@ -22,14 +22,29 @@ typedef unsigned long bitmap;
|
|||||||
static inline choiceptr
|
static inline choiceptr
|
||||||
offset_to_cptr(Int node)
|
offset_to_cptr(Int node)
|
||||||
{
|
{
|
||||||
return (choiceptr)(LCL0-node);
|
return (choiceptr)(LCL0+node);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline Int
|
static inline Int
|
||||||
cptr_to_offset(choiceptr node)
|
cptr_to_offset(choiceptr node)
|
||||||
{
|
{
|
||||||
return (Int)(LCL0-(CELL *)node);
|
return (Int)((CELL *)node-LCL0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline choiceptr
|
||||||
|
offset_to_cptr_with_null(Int node)
|
||||||
|
{
|
||||||
|
if (node == 0L) return NULL;
|
||||||
|
return (choiceptr)(LCL0+node);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline Int
|
||||||
|
cptr_to_offset_with_null(choiceptr node)
|
||||||
|
{
|
||||||
|
if (node == NULL) return 0L;
|
||||||
|
return (Int)((CELL *)node-LCL0);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------------------------- **
|
/* ---------------------------- **
|
||||||
@ -327,7 +342,7 @@ struct local_data{
|
|||||||
#if THREADS
|
#if THREADS
|
||||||
Int prune_request_offset;
|
Int prune_request_offset;
|
||||||
#else
|
#else
|
||||||
choiceptr prune_request_offset;
|
choiceptr prune_request;
|
||||||
#endif
|
#endif
|
||||||
volatile int share_request;
|
volatile int share_request;
|
||||||
struct local_signals share_signals;
|
struct local_signals share_signals;
|
||||||
@ -370,8 +385,8 @@ extern struct local_data *LOCAL;
|
|||||||
#endif
|
#endif
|
||||||
#define LOCAL_top_or_fr (LOCAL->top_or_frame)
|
#define LOCAL_top_or_fr (LOCAL->top_or_frame)
|
||||||
#if THREADS
|
#if THREADS
|
||||||
#define Get_LOCAL_prune_request() offset_to_cptr(LOCAL->prune_request_offset)
|
#define Get_LOCAL_prune_request() offset_to_cptr_with_null(LOCAL->prune_request_offset)
|
||||||
#define Set_LOCAL_prune_request(cpt) (LOCAL->prune_request_offset = cptr_to_offset(cpt))
|
#define Set_LOCAL_prune_request(cpt) (LOCAL->prune_request_offset = cptr_to_offset_with_null(cpt))
|
||||||
#else
|
#else
|
||||||
#define LOCAL_prune_request (LOCAL->prune_request)
|
#define LOCAL_prune_request (LOCAL->prune_request)
|
||||||
#define Get_LOCAL_prune_request() (LOCAL->prune_request)
|
#define Get_LOCAL_prune_request() (LOCAL->prune_request)
|
||||||
@ -413,8 +428,8 @@ extern struct local_data *LOCAL;
|
|||||||
#endif
|
#endif
|
||||||
#define REMOTE_top_or_fr(worker) (REMOTE[worker].top_or_frame)
|
#define REMOTE_top_or_fr(worker) (REMOTE[worker].top_or_frame)
|
||||||
#if THREADS
|
#if THREADS
|
||||||
#define Get_REMOTE_prune_request(worker) offset_to_cptr(REMOTE[worker].prune_request_offset)
|
#define Get_REMOTE_prune_request(worker) offset_to_cptr_with_null(REMOTE[worker].prune_request_offset)
|
||||||
#define Set_REMOTE_prune_request(worker,cp) (REMOTE[worker].prune_request_offset = cptr_to_offset(cp))
|
#define Set_REMOTE_prune_request(worker,cp) (REMOTE[worker].prune_request_offset = cptr_to_offset_with_null(cp))
|
||||||
#else
|
#else
|
||||||
#define REMOTE_prune_request(worker) (REMOTE[worker].prune_request)
|
#define REMOTE_prune_request(worker) (REMOTE[worker].prune_request)
|
||||||
#define Get_REMOTE_prune_request(worker) (REMOTE[worker].prune_request)
|
#define Get_REMOTE_prune_request(worker) (REMOTE[worker].prune_request)
|
||||||
|
Reference in New Issue
Block a user