Define type size for monitor module.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 16 Jan 2008 15:53:05 +0000 (15:53 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 16 Jan 2008 15:53:05 +0000 (15:53 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1048 38d2e660-2303-0410-9eaa-f027e97ec537

cpu/types.h

index 985dbe6bf170580bc9b0f78ec79e0f30d1c11646..187d45f14be1f08798e5f61eeeacb2489b14e0ab 100644 (file)
@@ -49,6 +49,8 @@
 
        typedef uint16_t cpuflags_t; // FIXME
        typedef unsigned int cpustack_t;
+       #warning Verify following costant
+       #define SIZEOF_CPUSTACK_T 2
 
 #elif CPU_X86
 
 
        #if CPU_X86_64
                typedef uint64_t cpustack_t;
+               #define SIZEOF_CPUSTACK_T 8
        #else
                typedef uint32_t cpustack_t;
+               #define SIZEOF_CPUSTACK_T 4
        #endif
 
 #elif CPU_ARM
 
        typedef uint32_t cpuflags_t;
        typedef uint32_t cpustack_t;
+       #define SIZEOF_CPUSTACK_T 4
 
 #elif CPU_PPC
 
        typedef uint32_t cpuflags_t; // FIXME
        typedef uint32_t cpustack_t; // FIXME
+       #define SIZEOF_CPUSTACK_T 4
 
 #elif CPU_DSP56K
 
        typedef uint16_t cpuflags_t;
        typedef unsigned int cpustack_t;
-
+       #warning Verify following costant
+       #define SIZEOF_CPUSTACK_T 2
+       
 #elif CPU_AVR
 
        typedef uint8_t cpuflags_t;
        typedef uint8_t cpustack_t;
+       #define SIZEOF_CPUSTACK_T 1
 
 #else
        #error No CPU_... defined.
@@ -178,6 +187,7 @@ STATIC_ASSERT(sizeof(uint32_t) * CPU_BITS_PER_CHAR == 32);
 STATIC_ASSERT(sizeof(int64_t) * CPU_BITS_PER_CHAR == 64);
 STATIC_ASSERT(sizeof(uint64_t) * CPU_BITS_PER_CHAR == 64);
 #endif
+STATIC_ASSERT(sizeof(cpustack_t) == SIZEOF_CPUSTACK_T);
 
 
 #endif /* CPU_TYPES_H */