Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
changeset 263:094ad1bdeaec Common_Ancestor
more changes to work with -std=gnu99
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 29 Oct 2012 17:02:43 +0100 |
| parents | aa79134dbc88 |
| children | 104d0b27de12 |
| files | CoreController.c Defines/VMS_defs.h Defines/VMS_defs__HW_constants.h HW_Dependent_Primitives/VMS__HW_measurement.h HW_Dependent_Primitives/VMS__primitives.h Services_Offered_by_VMS/Debugging/DEBUG__macros.h Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h Services_Offered_by_VMS/Measurement_and_Stats/probes.h Services_Offered_by_VMS/Memory_Handling/vmalloc.c Services_Offered_by_VMS/Memory_Handling/vmalloc.h VMS.h |
| diffstat | 11 files changed, 34 insertions(+), 14 deletions(-) [+] |
line diff
1.1 --- a/CoreController.c Wed Oct 24 00:00:22 2012 -0700 1.2 +++ b/CoreController.c Mon Oct 29 17:02:43 2012 +0100 1.3 @@ -292,7 +292,7 @@ 1.4 SlaveVP *currVP; 1.5 AnimSlot *currSlot, **animSlots; 1.6 int32 currSlotIdx; 1.7 - int32 *addrOfMasterLock; 1.8 + volatile int32 *addrOfMasterLock; 1.9 SlaveVP *thisCoresMasterVP; 1.10 1.11 //=============== Initializations ===================
2.1 --- a/Defines/VMS_defs.h Wed Oct 24 00:00:22 2012 -0700 2.2 +++ b/Defines/VMS_defs.h Mon Oct 29 17:02:43 2012 +0100 2.3 @@ -8,7 +8,9 @@ 2.4 2.5 #ifndef _VMS_DEFS_MAIN_H 2.6 #define _VMS_DEFS_MAIN_H 2.7 +#ifndef _GNU_SOURCE 2.8 #define _GNU_SOURCE 2.9 +#endif 2.10 2.11 //=========================== VMS-wide defs =============================== 2.12
3.1 --- a/Defines/VMS_defs__HW_constants.h Wed Oct 24 00:00:22 2012 -0700 3.2 +++ b/Defines/VMS_defs__HW_constants.h Mon Oct 29 17:02:43 2012 +0100 3.3 @@ -8,7 +8,9 @@ 3.4 3.5 #ifndef _VMS_HW_SPEC_DEFS_H 3.6 #define _VMS_HW_SPEC_DEFS_H 3.7 +#ifndef _GNU_SOURCE 3.8 #define _GNU_SOURCE 3.9 +#endif 3.10 3.11 3.12 //========================= Hardware related Constants =====================
4.1 --- a/HW_Dependent_Primitives/VMS__HW_measurement.h Wed Oct 24 00:00:22 2012 -0700 4.2 +++ b/HW_Dependent_Primitives/VMS__HW_measurement.h Mon Oct 29 17:02:43 2012 +0100 4.3 @@ -8,7 +8,9 @@ 4.4 4.5 #ifndef _VMS__HW_MEASUREMENT_H 4.6 #define _VMS__HW_MEASUREMENT_H 4.7 +#ifndef _GNU_SOURCE 4.8 #define _GNU_SOURCE 4.9 +#endif 4.10 4.11 4.12 //=================== Macros to Capture Measurements ======================
5.1 --- a/HW_Dependent_Primitives/VMS__primitives.h Wed Oct 24 00:00:22 2012 -0700 5.2 +++ b/HW_Dependent_Primitives/VMS__primitives.h Mon Oct 29 17:02:43 2012 +0100 5.3 @@ -8,7 +8,9 @@ 5.4 5.5 #ifndef _VMS__PRIMITIVES_H 5.6 #define _VMS__PRIMITIVES_H 5.7 +#ifndef _GNU_SOURCE 5.8 #define _GNU_SOURCE 5.9 +#endif 5.10 5.11 void 5.12 recordCoreCtlrReturnLabelAddr(void **returnAddress); 5.13 @@ -34,6 +36,9 @@ 5.14 void * 5.15 asmTerminateCoreCtlr(SlaveVP *currSlv); 5.16 5.17 +void * 5.18 +asmTerminateCoreCtlrSeq(SlaveVP *currSlv); 5.19 + 5.20 #define flushRegisters() \ 5.21 asm volatile ("":::"%rbx", "%r12", "%r13","%r14","%r15") 5.22
6.1 --- a/Services_Offered_by_VMS/Debugging/DEBUG__macros.h Wed Oct 24 00:00:22 2012 -0700 6.2 +++ b/Services_Offered_by_VMS/Debugging/DEBUG__macros.h Mon Oct 29 17:02:43 2012 +0100 6.3 @@ -8,7 +8,9 @@ 6.4 6.5 #ifndef _VMS_DEFS_DEBUG_H 6.6 #define _VMS_DEFS_DEBUG_H 6.7 +#ifndef _GNU_SOURCE 6.8 #define _GNU_SOURCE 6.9 +#endif 6.10 6.11 /* 6.12 */
7.1 --- a/Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h Wed Oct 24 00:00:22 2012 -0700 7.2 +++ b/Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h Mon Oct 29 17:02:43 2012 +0100 7.3 @@ -8,7 +8,9 @@ 7.4 7.5 #ifndef _VMS_MEAS_MACROS_H 7.6 #define _VMS_MEAS_MACROS_H 7.7 +#ifndef _GNU_SOURCE 7.8 #define _GNU_SOURCE 7.9 +#endif 7.10 7.11 //================== Macros define types of meas want ===================== 7.12 //
8.1 --- a/Services_Offered_by_VMS/Measurement_and_Stats/probes.h Wed Oct 24 00:00:22 2012 -0700 8.2 +++ b/Services_Offered_by_VMS/Measurement_and_Stats/probes.h Mon Oct 29 17:02:43 2012 +0100 8.3 @@ -8,7 +8,9 @@ 8.4 8.5 #ifndef _PROBES_H 8.6 #define _PROBES_H 8.7 +#ifndef _GNU_SOURCE 8.8 #define _GNU_SOURCE 8.9 +#endif 8.10 8.11 #include "VMS_impl/VMS_primitive_data_types.h" 8.12 8.13 @@ -48,8 +50,6 @@ 8.14 float64 endSecs; \ 8.15 float64 interval; \ 8.16 DblHist *hist; /*if NULL, then is single interval probe*/ 8.17 -#else 8.18 - #define PROBES__Insert_timestamps_and_intervals_into_probe_struct 8.19 #endif 8.20 #ifdef PROBES__USE_PERF_CTR_PROBES 8.21 #define PROBES__Insert_timestamps_and_intervals_into_probe_struct \
9.1 --- a/Services_Offered_by_VMS/Memory_Handling/vmalloc.c Wed Oct 24 00:00:22 2012 -0700 9.2 +++ b/Services_Offered_by_VMS/Memory_Handling/vmalloc.c Mon Oct 29 17:02:43 2012 +0100 9.3 @@ -28,7 +28,7 @@ 9.4 /* 9.5 * This calculates the container which fits the given size. 9.6 */ 9.7 -inline 9.8 + 9.9 uint32 getContainer(size_t size) 9.10 { 9.11 return (log2(size)-LOG128)/LOG54; 9.12 @@ -39,7 +39,7 @@ 9.13 * The chunk is removed but not set as free. There is no check if 9.14 * the free list is empty, so make sure this is not the case. 9.15 */ 9.16 -inline 9.17 + 9.18 MallocProlog *removeChunk(MallocArrays* freeLists, uint32 containerIdx) 9.19 { 9.20 MallocProlog** container = &freeLists->bigChunks[containerIdx]; 9.21 @@ -66,7 +66,7 @@ 9.22 * The chunk is removed but not set as free. There is no check if 9.23 * the free list is empty, so make sure this is not the case. 9.24 */ 9.25 -inline 9.26 + 9.27 MallocProlog *removeSmallChunk(MallocArrays* freeLists, uint32 containerIdx) 9.28 { 9.29 MallocProlog** container = &freeLists->smallChunks[containerIdx]; 9.30 @@ -80,7 +80,7 @@ 9.31 return removedChunk; 9.32 } 9.33 9.34 -inline 9.35 + 9.36 size_t getChunkSize(MallocProlog* chunk) 9.37 { 9.38 return (uintptr_t)chunk->nextHigherInMem - 9.39 @@ -90,7 +90,7 @@ 9.40 /* 9.41 * Removes a chunk from a free list. 9.42 */ 9.43 -inline 9.44 + 9.45 void extractChunk(MallocProlog* chunk, MallocArrays *freeLists) 9.46 { 9.47 chunk->prevChunkInFreeList->nextChunkInFreeList = chunk->nextChunkInFreeList; 9.48 @@ -116,7 +116,7 @@ 9.49 * Chunk A has to be before chunk B in memory. Both have to be removed from 9.50 * a free list 9.51 */ 9.52 -inline 9.53 + 9.54 MallocProlog *mergeChunks(MallocProlog* chunkA, MallocProlog* chunkB) 9.55 { 9.56 chunkA->nextHigherInMem = chunkB->nextHigherInMem; 9.57 @@ -126,7 +126,7 @@ 9.58 /* 9.59 * Inserts a chunk into a free list. 9.60 */ 9.61 -inline 9.62 + 9.63 void insertChunk(MallocProlog* chunk, MallocProlog** container) 9.64 { 9.65 chunk->nextChunkInFreeList = *container; 9.66 @@ -140,7 +140,7 @@ 9.67 * Divides the chunk that a new chunk of newSize is created. 9.68 * There is no size check, so make sure the size value is valid. 9.69 */ 9.70 -inline 9.71 + 9.72 MallocProlog *divideChunk(MallocProlog* chunk, size_t newSize) 9.73 { 9.74 MallocProlog* newChunk = (MallocProlog*)((uintptr_t)chunk->nextHigherInMem - 9.75 @@ -158,7 +158,7 @@ 9.76 /* 9.77 * Search for chunk in the list of big chunks. Split the block if it's too big 9.78 */ 9.79 -inline 9.80 + 9.81 MallocProlog *searchChunk(MallocArrays *freeLists, size_t sizeRequested, uint32 containerIdx) 9.82 { 9.83 MallocProlog* foundChunk; 9.84 @@ -346,7 +346,7 @@ 9.85 size_t chunkSize = getChunkSize(chunkToFree); 9.86 9.87 #ifdef SERVICE__TURN_ON_VALGRIND 9.88 - VALGRIND_MAKE_MEM_UNDEFINED(chunkToFree,chunkSize); 9.89 + VALGRIND_MAKE_MEM_NOACCESS(chunkToFree,chunkSize); 9.90 #endif 9.91 9.92 if(chunkSize < BIG_LOWER_BOUND)
10.1 --- a/Services_Offered_by_VMS/Memory_Handling/vmalloc.h Wed Oct 24 00:00:22 2012 -0700 10.2 +++ b/Services_Offered_by_VMS/Memory_Handling/vmalloc.h Mon Oct 29 17:02:43 2012 +0100 10.3 @@ -14,8 +14,10 @@ 10.4 10.5 #include "VMS_impl/VMS_primitive_data_types.h" 10.6 10.7 +#define SERVICE__TURN_ON_VALGRIND 10.8 + 10.9 #ifdef SERVICE__TURN_ON_VALGRIND 10.10 -#include Valgrind/memcheck.h 10.11 +#include "../valgrind/memcheck.h" 10.12 #endif 10.13 10.14 #define SMALL_CHUNK_SIZE 32
11.1 --- a/VMS.h Wed Oct 24 00:00:22 2012 -0700 11.2 +++ b/VMS.h Mon Oct 29 17:02:43 2012 +0100 11.3 @@ -8,7 +8,10 @@ 11.4 11.5 #ifndef _VMS_H 11.6 #define _VMS_H 11.7 + 11.8 +#ifndef _GNU_SOURCE 11.9 #define _GNU_SOURCE 11.10 +#endif 11.11 11.12 #include "DynArray/DynArray.h" 11.13 #include "Hash_impl/PrivateHash.h"
