From: jjenista Date: Wed, 27 Oct 2010 21:34:17 +0000 (+0000) Subject: make sure mistakes are obvious with identifiable values X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bb46aacdd1135e99690364875550ff9201519715;p=IRC.git make sure mistakes are obvious with identifiable values --- 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();