# HG changeset patch # User Merten Sach # Date 1324390109 -3600 # Node ID 6ba4c9d862324f9da01cc0ffccfb16b5b9fc7819 # Parent 5161414caa3e18c6e543a47c144e19ec7b2604df VMS_defs.h: defines for aligning diff -r 5161414caa3e -r 6ba4c9d86232 VMS_defs.h --- a/VMS_defs.h Tue Dec 20 15:04:06 2011 +0100 +++ b/VMS_defs.h Tue Dec 20 15:08:29 2011 +0100 @@ -10,6 +10,15 @@ #define _VMS_DEFS_H #define _GNU_SOURCE +//=============================== Hardware =================================== +// This aligns the variable to a 256 byte boundary, therefore padding the gaps. +// This is apparently not true for data on the stack. Which is I guess not an +// issue because they are only used in the cores own coreloop +#define CACHELINE_SIZE 256 +#define __align_to_cacheline__ __attribute__ ((aligned(CACHELINE_SIZE))) +//aligns a pointer to cacheline. The memory area has to contain at least +//CACHELINE_SIZE bytes more then needed +//#define __align_adress(ptr) (void*)(((uintptr_t)(ptr))&((uintptr_t)(!0x0FF)))+256 //=============================== Debug =================================== //