changeset 38:b66352de717e MC_shared

Updated default branch to working versions of all the sub repos
author Sean Halle <seanhalle@yahoo.com>
date Mon, 10 Sep 2012 01:11:54 -0700
parents b9cb01d8ce56
children a7a6e170708c
files BlockingQueue.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/BlockingQueue.c	Wed Jun 06 18:00:59 2012 -0700
     1.2 +++ b/BlockingQueue.c	Mon Sep 10 01:11:54 2012 -0700
     1.3 @@ -73,8 +73,8 @@
     1.4               !(extractPos == endOfData && insertPos == startOfData))
     1.5            {    //move before read
     1.6              if( extractPos == endOfData ) //write new pos exactly once, correctly
     1.7 -             { Q->extractPos = startOfData; //can't overrun then fix it 'cause
     1.8 -             }                              // other thread might read bad pos
     1.9 +             { Q->extractPos = (volatile void **)startOfData; 
    1.10 +             }                             
    1.11              else
    1.12               { Q->extractPos++;
    1.13               }
    1.14 @@ -119,7 +119,7 @@
    1.15               !(insertPos == endOfData && extractPos == startOfData))
    1.16            { *(Q->insertPos) = in;   //insert before move
    1.17              if( insertPos == endOfData )
    1.18 -             { Q->insertPos = startOfData;
    1.19 +             { Q->insertPos = (volatile void **)startOfData;
    1.20               }
    1.21              else
    1.22               { Q->insertPos++;