From bb46aacdd1135e99690364875550ff9201519715 Mon Sep 17 00:00:00 2001 From: jjenista Date: Wed, 27 Oct 2010 21:34:17 +0000 Subject: [PATCH] make sure mistakes are obvious with identifiable values --- Robust/src/Runtime/deque.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Robust/src/Runtime/deque.c b/Robust/src/Runtime/deque.c index a347c01a..c9089c74 100644 --- a/Robust/src/Runtime/deque.c +++ b/Robust/src/Runtime/deque.c @@ -46,8 +46,8 @@ #include "deque.h" -void* DQ_POP_EMPTY = (void*)0x1; -void* DQ_POP_ABORT = (void*)0x3; +void* DQ_POP_EMPTY = (void*)0x17; +void* DQ_POP_ABORT = (void*)0x33; // define a 19-bit dummy tag for the bottom @@ -69,7 +69,7 @@ static inline dequeNode* dqGet4096aligned( void* fromAllocator ) { #ifdef DEBUG_DEQUE //printf( "from allocator: 0x%08x to 0x%08x\n", (INTPTR)fromAllocator, (INTPTR)fromAllocator + DQNODE_SIZETOREQUEST ); //printf( "aligned: 0x%08x to 0x%08x\n", aligned, aligned + sizeof( dequeNode ) ); - //memset( (void*) aligned, 0, sizeof( dequeNode ) ); + memset( (void*) aligned, 0x9, sizeof( dequeNode ) ); #endif return (dequeNode*) aligned; @@ -176,6 +176,7 @@ void* dqPopTop( deque* dq ) { dequeNode* currTopNode = dqDecodePtr( currTop ); int currTopIndx = dqDecodeIdx( currTop ); + // read of top followed by read of bottom, algorithm // says specifically must be in this order BARRIER(); -- 2.34.1