kernel: allow stack size to be set by platform
authorAlan Cox <alan@linux.intel.com>
Mon, 12 Sep 2016 23:18:18 +0000 (00:18 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 12 Sep 2016 23:18:18 +0000 (00:18 +0100)
Kernel/include/kernel.h

index 5892875..c75814e 100644 (file)
@@ -472,9 +472,14 @@ typedef struct u_data {
 /* This is the user data structure, padded out to 512 bytes with the
  * System Stack.
  */
+
+#ifndef CONFIG_STACKSIZE
+#define CONFIG_STACKSIZE 512
+#endif
+
 typedef struct u_block {
         u_data u_d;
-        char   u_s [512 - sizeof(struct u_data)];
+        char   u_s [CONFIG_STACKSIZE - sizeof(struct u_data)];
 } u_block;