Browse Source

[fix] align of thread stack to 4

Oleg Gerasimov 4 years ago
parent
commit
295192d064
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/gos/gos.h
  2. 1 1
      src/gos/gos_x_threads.h

+ 1 - 1
src/gos/gos.h

@@ -67,7 +67,7 @@
67 67
 	 * @param[in] name 		The name of the stack
68 68
 	 * @param[in] sz 		The size of the stack
69 69
 	 */
70
-	#define DECLARE_THREAD_STACK(name, sz)			uint8_t name[sz];
70
+	#define DECLARE_THREAD_STACK(name, sz)			uint32_t name[sz/4];
71 71
 
72 72
 	/*
73 73
 	 * @brief	Return from a thread

+ 1 - 1
src/gos/gos_x_threads.h

@@ -31,7 +31,7 @@ typedef int				threadreturn_t;
31 31
 typedef int				threadpriority_t;
32 32
 
33 33
 #define DECLARE_THREAD_FUNCTION(fnName, param)	threadreturn_t fnName(void *param)
34
-#define DECLARE_THREAD_STACK(name, sz)			uint8_t name[sz];
34
+#define DECLARE_THREAD_STACK(name, sz)			uint32_t name[(sz)/sizeof(uint32_t)];
35 35
 #define THREAD_RETURN(retval)					return retval
36 36
 
37 37
 #define TIME_IMMEDIATE				0