# HG changeset patch # User Nina Engelhardt # Date 1351526563 -3600 # Node ID 094ad1bdeaec70efbe90750df3979cc3d7abb2e0 # Parent aa79134dbc886ff8487a97f6139fc281631ebfb8 more changes to work with -std=gnu99 diff -r aa79134dbc88 -r 094ad1bdeaec CoreController.c --- a/CoreController.c Wed Oct 24 00:00:22 2012 -0700 +++ b/CoreController.c Mon Oct 29 17:02:43 2012 +0100 @@ -292,7 +292,7 @@ SlaveVP *currVP; AnimSlot *currSlot, **animSlots; int32 currSlotIdx; - int32 *addrOfMasterLock; + volatile int32 *addrOfMasterLock; SlaveVP *thisCoresMasterVP; //=============== Initializations =================== diff -r aa79134dbc88 -r 094ad1bdeaec Defines/VMS_defs.h --- a/Defines/VMS_defs.h Wed Oct 24 00:00:22 2012 -0700 +++ b/Defines/VMS_defs.h Mon Oct 29 17:02:43 2012 +0100 @@ -8,7 +8,9 @@ #ifndef _VMS_DEFS_MAIN_H #define _VMS_DEFS_MAIN_H +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif //=========================== VMS-wide defs =============================== diff -r aa79134dbc88 -r 094ad1bdeaec Defines/VMS_defs__HW_constants.h --- a/Defines/VMS_defs__HW_constants.h Wed Oct 24 00:00:22 2012 -0700 +++ b/Defines/VMS_defs__HW_constants.h Mon Oct 29 17:02:43 2012 +0100 @@ -8,7 +8,9 @@ #ifndef _VMS_HW_SPEC_DEFS_H #define _VMS_HW_SPEC_DEFS_H +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif //========================= Hardware related Constants ===================== diff -r aa79134dbc88 -r 094ad1bdeaec HW_Dependent_Primitives/VMS__HW_measurement.h --- a/HW_Dependent_Primitives/VMS__HW_measurement.h Wed Oct 24 00:00:22 2012 -0700 +++ b/HW_Dependent_Primitives/VMS__HW_measurement.h Mon Oct 29 17:02:43 2012 +0100 @@ -8,7 +8,9 @@ #ifndef _VMS__HW_MEASUREMENT_H #define _VMS__HW_MEASUREMENT_H +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif //=================== Macros to Capture Measurements ====================== diff -r aa79134dbc88 -r 094ad1bdeaec HW_Dependent_Primitives/VMS__primitives.h --- a/HW_Dependent_Primitives/VMS__primitives.h Wed Oct 24 00:00:22 2012 -0700 +++ b/HW_Dependent_Primitives/VMS__primitives.h Mon Oct 29 17:02:43 2012 +0100 @@ -8,7 +8,9 @@ #ifndef _VMS__PRIMITIVES_H #define _VMS__PRIMITIVES_H +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif void recordCoreCtlrReturnLabelAddr(void **returnAddress); @@ -34,6 +36,9 @@ void * asmTerminateCoreCtlr(SlaveVP *currSlv); +void * +asmTerminateCoreCtlrSeq(SlaveVP *currSlv); + #define flushRegisters() \ asm volatile ("":::"%rbx", "%r12", "%r13","%r14","%r15") diff -r aa79134dbc88 -r 094ad1bdeaec Services_Offered_by_VMS/Debugging/DEBUG__macros.h --- a/Services_Offered_by_VMS/Debugging/DEBUG__macros.h Wed Oct 24 00:00:22 2012 -0700 +++ b/Services_Offered_by_VMS/Debugging/DEBUG__macros.h Mon Oct 29 17:02:43 2012 +0100 @@ -8,7 +8,9 @@ #ifndef _VMS_DEFS_DEBUG_H #define _VMS_DEFS_DEBUG_H +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif /* */ diff -r aa79134dbc88 -r 094ad1bdeaec Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h --- a/Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h Wed Oct 24 00:00:22 2012 -0700 +++ b/Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h Mon Oct 29 17:02:43 2012 +0100 @@ -8,7 +8,9 @@ #ifndef _VMS_MEAS_MACROS_H #define _VMS_MEAS_MACROS_H +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif //================== Macros define types of meas want ===================== // diff -r aa79134dbc88 -r 094ad1bdeaec Services_Offered_by_VMS/Measurement_and_Stats/probes.h --- a/Services_Offered_by_VMS/Measurement_and_Stats/probes.h Wed Oct 24 00:00:22 2012 -0700 +++ b/Services_Offered_by_VMS/Measurement_and_Stats/probes.h Mon Oct 29 17:02:43 2012 +0100 @@ -8,7 +8,9 @@ #ifndef _PROBES_H #define _PROBES_H +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include "VMS_impl/VMS_primitive_data_types.h" @@ -48,8 +50,6 @@ float64 endSecs; \ float64 interval; \ DblHist *hist; /*if NULL, then is single interval probe*/ -#else - #define PROBES__Insert_timestamps_and_intervals_into_probe_struct #endif #ifdef PROBES__USE_PERF_CTR_PROBES #define PROBES__Insert_timestamps_and_intervals_into_probe_struct \ diff -r aa79134dbc88 -r 094ad1bdeaec Services_Offered_by_VMS/Memory_Handling/vmalloc.c --- a/Services_Offered_by_VMS/Memory_Handling/vmalloc.c Wed Oct 24 00:00:22 2012 -0700 +++ b/Services_Offered_by_VMS/Memory_Handling/vmalloc.c Mon Oct 29 17:02:43 2012 +0100 @@ -28,7 +28,7 @@ /* * This calculates the container which fits the given size. */ -inline + uint32 getContainer(size_t size) { return (log2(size)-LOG128)/LOG54; @@ -39,7 +39,7 @@ * The chunk is removed but not set as free. There is no check if * the free list is empty, so make sure this is not the case. */ -inline + MallocProlog *removeChunk(MallocArrays* freeLists, uint32 containerIdx) { MallocProlog** container = &freeLists->bigChunks[containerIdx]; @@ -66,7 +66,7 @@ * The chunk is removed but not set as free. There is no check if * the free list is empty, so make sure this is not the case. */ -inline + MallocProlog *removeSmallChunk(MallocArrays* freeLists, uint32 containerIdx) { MallocProlog** container = &freeLists->smallChunks[containerIdx]; @@ -80,7 +80,7 @@ return removedChunk; } -inline + size_t getChunkSize(MallocProlog* chunk) { return (uintptr_t)chunk->nextHigherInMem - @@ -90,7 +90,7 @@ /* * Removes a chunk from a free list. */ -inline + void extractChunk(MallocProlog* chunk, MallocArrays *freeLists) { chunk->prevChunkInFreeList->nextChunkInFreeList = chunk->nextChunkInFreeList; @@ -116,7 +116,7 @@ * Chunk A has to be before chunk B in memory. Both have to be removed from * a free list */ -inline + MallocProlog *mergeChunks(MallocProlog* chunkA, MallocProlog* chunkB) { chunkA->nextHigherInMem = chunkB->nextHigherInMem; @@ -126,7 +126,7 @@ /* * Inserts a chunk into a free list. */ -inline + void insertChunk(MallocProlog* chunk, MallocProlog** container) { chunk->nextChunkInFreeList = *container; @@ -140,7 +140,7 @@ * Divides the chunk that a new chunk of newSize is created. * There is no size check, so make sure the size value is valid. */ -inline + MallocProlog *divideChunk(MallocProlog* chunk, size_t newSize) { MallocProlog* newChunk = (MallocProlog*)((uintptr_t)chunk->nextHigherInMem - @@ -158,7 +158,7 @@ /* * Search for chunk in the list of big chunks. Split the block if it's too big */ -inline + MallocProlog *searchChunk(MallocArrays *freeLists, size_t sizeRequested, uint32 containerIdx) { MallocProlog* foundChunk; @@ -346,7 +346,7 @@ size_t chunkSize = getChunkSize(chunkToFree); #ifdef SERVICE__TURN_ON_VALGRIND - VALGRIND_MAKE_MEM_UNDEFINED(chunkToFree,chunkSize); + VALGRIND_MAKE_MEM_NOACCESS(chunkToFree,chunkSize); #endif if(chunkSize < BIG_LOWER_BOUND) diff -r aa79134dbc88 -r 094ad1bdeaec Services_Offered_by_VMS/Memory_Handling/vmalloc.h --- a/Services_Offered_by_VMS/Memory_Handling/vmalloc.h Wed Oct 24 00:00:22 2012 -0700 +++ b/Services_Offered_by_VMS/Memory_Handling/vmalloc.h Mon Oct 29 17:02:43 2012 +0100 @@ -14,8 +14,10 @@ #include "VMS_impl/VMS_primitive_data_types.h" +#define SERVICE__TURN_ON_VALGRIND + #ifdef SERVICE__TURN_ON_VALGRIND -#include Valgrind/memcheck.h +#include "../valgrind/memcheck.h" #endif #define SMALL_CHUNK_SIZE 32 diff -r aa79134dbc88 -r 094ad1bdeaec VMS.h --- a/VMS.h Wed Oct 24 00:00:22 2012 -0700 +++ b/VMS.h Mon Oct 29 17:02:43 2012 +0100 @@ -8,7 +8,10 @@ #ifndef _VMS_H #define _VMS_H + +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include "DynArray/DynArray.h" #include "Hash_impl/PrivateHash.h"