diff BlockingQueue.c @ 24:677afc259a58

fix branch to compile with new folder structure
author Merten Sach <msach@mailbox.tu-berlin.de>
date Mon, 13 Feb 2012 19:32:12 +0100
parents 1e93e5dbeda1
children
line diff
     1.1 --- a/BlockingQueue.c	Wed Jun 22 18:49:17 2011 +0200
     1.2 +++ b/BlockingQueue.c	Mon Feb 13 19:32:12 2012 +0100
     1.3 @@ -13,7 +13,7 @@
     1.4  #include <sched.h>
     1.5  
     1.6  #include "BlockingQueue.h"
     1.7 -#include "../vmalloc.h"
     1.8 +#include "VMS_Implementations/VMS_impl/vmalloc.h"
     1.9  
    1.10  #define INC(x) (++x == 1024) ? (x) = 0 : (x)
    1.11  
    1.12 @@ -26,7 +26,7 @@
    1.13   {
    1.14     PThdQueueStruc* retQ;
    1.15     int retCode;
    1.16 -   retQ = (PThdQueueStruc *) VMS__malloc( sizeof( PThdQueueStruc ) );
    1.17 +   retQ = (PThdQueueStruc *) VMS_int__malloc( sizeof( PThdQueueStruc ) );
    1.18  
    1.19  
    1.20     retCode =
    1.21 @@ -118,7 +118,7 @@
    1.22  CASQueueStruc* makeCASQ()
    1.23   {
    1.24     CASQueueStruc* retQ;
    1.25 -   retQ = (CASQueueStruc *) VMS__malloc( sizeof( CASQueueStruc ) );
    1.26 +   retQ = (CASQueueStruc *) VMS_int__malloc( sizeof( CASQueueStruc ) );
    1.27  
    1.28     retQ->insertLock = UNLOCKED;
    1.29     retQ->extractLock= UNLOCKED;
    1.30 @@ -243,7 +243,7 @@
    1.31  SRSWQueueStruc* makeSRSWQ()
    1.32   {
    1.33     SRSWQueueStruc* retQ;
    1.34 -   retQ = (SRSWQueueStruc *) VMS__malloc( sizeof( SRSWQueueStruc ) );
    1.35 +   retQ = (SRSWQueueStruc *) VMS_int__malloc( sizeof( SRSWQueueStruc ) );
    1.36     
    1.37     retQ->extractPos = &(retQ->startOfData[0]); //side by side == empty
    1.38     retQ->insertPos  = &(retQ->startOfData[1]); // so start pos's have to be
    1.39 @@ -255,7 +255,7 @@
    1.40  void
    1.41  freeSRSWQ( SRSWQueueStruc* Q )
    1.42   {
    1.43 -   VMS__free( Q );
    1.44 +   VMS_int__free( Q );
    1.45   }
    1.46  
    1.47  void* readSRSWQ( SRSWQueueStruc* Q )
    1.48 @@ -380,11 +380,11 @@
    1.49  SRMWQueueStruc* makeSRMWQ()
    1.50   { SRMWQueueStruc* retQ;
    1.51     
    1.52 -   retQ = (SRMWQueueStruc *) VMS__malloc( sizeof( SRMWQueueStruc ) );
    1.53 +   retQ = (SRMWQueueStruc *) VMS_int__malloc( sizeof( SRMWQueueStruc ) );
    1.54     
    1.55     retQ->numInternalQs = 0;
    1.56     retQ->internalQsSz  = 10;
    1.57 -   retQ->internalQs = VMS__malloc( retQ->internalQsSz *
    1.58 +   retQ->internalQs = VMS_int__malloc( retQ->internalQsSz *
    1.59                                     sizeof(SRSWQueueStruc *) );
    1.60     
    1.61     retQ->lastQReadFrom = 0;
    1.62 @@ -411,11 +411,11 @@
    1.63        oldSz            = Q->internalQsSz;
    1.64        oldArray         = Q->internalQs;
    1.65        Q->internalQsSz *= 2;
    1.66 -      Q->internalQs    = VMS__malloc( Q->internalQsSz * sizeof(SRSWQueueStruc *));
    1.67 +      Q->internalQs    = VMS_int__malloc( Q->internalQsSz * sizeof(SRSWQueueStruc *));
    1.68        for( i = 0; i < oldSz; i++ )
    1.69         { Q->internalQs[i] = oldArray[i];
    1.70         }
    1.71 -      VMS__free( oldArray );
    1.72 +      VMS_int__free( oldArray );
    1.73      }
    1.74     Q->internalQs[ Q->numInternalQs - 1 ] = makeSRSWQ();
    1.75     return Q->numInternalQs - 1;