summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--board/bds/ec.tasklist9
-rw-r--r--board/daisy/ec.tasklist19
-rw-r--r--board/link/ec.tasklist39
-rw-r--r--board/snow/ec.tasklist19
-rw-r--r--chip/lm4/config.h6
-rw-r--r--chip/stm32/config.h6
-rw-r--r--core/cortex-m/task.c25
-rw-r--r--include/task_id.h2
-rw-r--r--test/charging.tasklist25
-rw-r--r--test/flash_overwrite.tasklist9
-rw-r--r--test/flash_rw_erase.tasklist11
-rw-r--r--test/hello.tasklist13
-rw-r--r--test/kb_debounce.tasklist20
-rw-r--r--test/kb_deghost.tasklist25
-rw-r--r--test/mutex.tasklist28
-rw-r--r--test/pingpong.tasklist26
-rw-r--r--test/power_button.tasklist25
-rw-r--r--test/powerdemo.tasklist19
-rw-r--r--test/scancode.tasklist21
-rw-r--r--test/thermal.tasklist19
-rw-r--r--test/timer_calib.tasklist20
-rw-r--r--test/timer_dos.tasklist26
-rw-r--r--test/timer_jump.tasklist11
-rw-r--r--test/typematic.tasklist23
25 files changed, 260 insertions, 188 deletions
diff --git a/Makefile b/Makefile
index bf96bbe9be..b35ecd3ee0 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ include board/$(BOARD)/build.mk
# Transform the configuration into make variables
includes=include core/$(CORE)/include $(dirs) $(out)
_tsk_lst:=$(shell echo "CONFIG_TASK_LIST" | $(CPP) -P -Iboard/$(BOARD) -Itest \
- -D"TASK(n, r, d)=n" -imacros $(PROJECT).tasklist)
+ -D"TASK(n, r, d, s)=n" -imacros $(PROJECT).tasklist)
_tsk_cfg:=$(foreach t,$(_tsk_lst),CONFIG_TASK_$(t))
_flag_cfg:=$(shell $(CPP) $(CPPFLAGS) -P -dN chip/$(CHIP)/config.h | \
grep -o "CONFIG_.*") \
diff --git a/board/bds/ec.tasklist b/board/bds/ec.tasklist
index beaaec5552..2e5408dd5b 100644
--- a/board/bds/ec.tasklist
+++ b/board/bds/ec.tasklist
@@ -8,12 +8,13 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(LIGHTBAR, lightbar_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(LIGHTBAR, lightbar_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/board/daisy/ec.tasklist b/board/daisy/ec.tasklist
index c9785dd4a9..dc07f50e26 100644
--- a/board/daisy/ec.tasklist
+++ b/board/daisy/ec.tasklist
@@ -8,17 +8,18 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(POWERLED, power_led_task, NULL) \
- TASK(PMU_TPS65090_CHARGER, pmu_charger_task, NULL) \
- TASK(KEYSCAN, keyboard_scan_task, NULL) \
- TASK(GAIAPOWER, gaia_power_task, NULL) \
- TASK(CONSOLE, console_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERLED, power_led_task, NULL, TASK_STACK_SIZE) \
+ TASK(PMU_TPS65090_CHARGER, pmu_charger_task, NULL, TASK_STACK_SIZE) \
+ TASK(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \
+ TASK(GAIAPOWER, gaia_power_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE)
diff --git a/board/link/ec.tasklist b/board/link/ec.tasklist
index b31a575bf9..3e50f0a745 100644
--- a/board/link/ec.tasklist
+++ b/board/link/ec.tasklist
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -8,23 +8,24 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
- * 'n' in the name of the task
- * 'r' in the main routine of the task
- * 'd' in an opaque parameter passed to the routine at startup
+ * For each task, use the macro TASK(n, r, d, s) where :
+ * 'n' is the name of the task
+ * 'r' is the main routine of the task
+ * 'd' is an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(LIGHTBAR, lightbar_task, NULL) \
- TASK(POWERSTATE, charge_state_machine_task, NULL) \
- TASK(TEMPSENSOR, temp_sensor_task, NULL) \
- TASK(THERMAL, thermal_task, NULL) \
- TASK(PWM, pwm_task, NULL) \
- TASK(TYPEMATIC, keyboard_typematic_task, NULL) \
- TASK(X86POWER, x86_power_task, NULL) \
- TASK(I8042CMD, i8042_command_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL) \
- TASK(POWERBTN, power_button_task, NULL) \
- TASK(KEYSCAN, keyboard_scan_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, 256) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, 512) \
+ TASK(LIGHTBAR, lightbar_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERSTATE, charge_state_machine_task, NULL, TASK_STACK_SIZE) \
+ TASK(TEMPSENSOR, temp_sensor_task, NULL, TASK_STACK_SIZE) \
+ TASK(THERMAL, thermal_task, NULL, TASK_STACK_SIZE) \
+ TASK(PWM, pwm_task, NULL, TASK_STACK_SIZE) \
+ TASK(TYPEMATIC, keyboard_typematic_task, NULL, TASK_STACK_SIZE) \
+ TASK(X86POWER, x86_power_task, NULL, TASK_STACK_SIZE) \
+ TASK(I8042CMD, i8042_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \
+ TASK(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE)
diff --git a/board/snow/ec.tasklist b/board/snow/ec.tasklist
index c9785dd4a9..7c99047a1f 100644
--- a/board/snow/ec.tasklist
+++ b/board/snow/ec.tasklist
@@ -8,17 +8,18 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(POWERLED, power_led_task, NULL) \
- TASK(PMU_TPS65090_CHARGER, pmu_charger_task, NULL) \
- TASK(KEYSCAN, keyboard_scan_task, NULL) \
- TASK(GAIAPOWER, gaia_power_task, NULL) \
- TASK(CONSOLE, console_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, 256) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERLED, power_led_task, NULL, 256) \
+ TASK(PMU_TPS65090_CHARGER, pmu_charger_task, NULL, TASK_STACK_SIZE) \
+ TASK(KEYSCAN, keyboard_scan_task, NULL, 256) \
+ TASK(GAIAPOWER, gaia_power_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE)
diff --git a/chip/lm4/config.h b/chip/lm4/config.h
index b2ce40a4e8..6d55fa4940 100644
--- a/chip/lm4/config.h
+++ b/chip/lm4/config.h
@@ -24,6 +24,12 @@
/* System stack size */
#define CONFIG_STACK_SIZE 4096
+/* Idle task stack size */
+#define IDLE_TASK_STACK_SIZE 320
+
+/* Default task stack size */
+#define TASK_STACK_SIZE 488
+
#define CONFIG_FLASH_BASE 0x00000000
#define CONFIG_FLASH_BANK_SIZE 0x00000800 /* protect bank size */
#define CONFIG_FLASH_ERASE_SIZE 0x00000400 /* erase bank size */
diff --git a/chip/stm32/config.h b/chip/stm32/config.h
index 19b872bc75..ddd79f39bc 100644
--- a/chip/stm32/config.h
+++ b/chip/stm32/config.h
@@ -18,6 +18,12 @@
/* System stack size */
#define CONFIG_STACK_SIZE 1024
+/* Idle task stack size */
+#define IDLE_TASK_STACK_SIZE 256
+
+/* Default task stack size */
+#define TASK_STACK_SIZE 488
+
/* support programming on-chip flash */
#define CONFIG_FLASH
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index 77573a3e14..ba6e374501 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -15,15 +15,6 @@
#include "uart.h"
#include "util.h"
-/**
- * Global memory size for a task : 512 bytes
- * including its contexts and its stack
- */
-#define TASK_SIZE 512
-
-/* Size of stack */
-#define STACK_SIZE 488
-
typedef union {
struct {
/*
@@ -41,14 +32,14 @@ typedef union {
#define STACK_UNUSED_VALUE 0xdeadd00d
/* declare task routine prototypes */
-#define TASK(n, r, d) int r(void *);
+#define TASK(n, r, d, s) int r(void *);
#include TASK_LIST
void __idle(void);
CONFIG_TASK_LIST
#undef TASK
/* Task names for easier debugging */
-#define TASK(n, r, d) #n,
+#define TASK(n, r, d, s) #n,
#include TASK_LIST
static const char * const task_names[] = {
"<< idle >>",
@@ -98,10 +89,10 @@ static void task_exit_trap(void)
/* Startup parameters for all tasks. */
-#define TASK(n, r, d) { \
+#define TASK(n, r, d, s) { \
.r0 = (uint32_t)d, \
.pc = (uint32_t)r, \
- .stack_size = STACK_SIZE, \
+ .stack_size = s, \
},
#include TASK_LIST
static const struct {
@@ -109,7 +100,7 @@ static const struct {
uint32_t pc;
uint16_t stack_size;
} const tasks_init[] = {
- TASK(IDLE, __idle, 0)
+ TASK(IDLE, __idle, 0, IDLE_TASK_STACK_SIZE)
CONFIG_TASK_LIST
};
#undef TASK
@@ -119,10 +110,10 @@ static task_ tasks[TASK_ID_COUNT];
/* Stacks for all tasks */
/* TODO: variable-size stacks */
-#define TASK(n, r, d) + STACK_SIZE
+#define TASK(n, r, d, s) + s
#include TASK_LIST
-uint8_t task_stacks[
- STACK_SIZE
+uint8_t task_stacks[0
+ TASK(IDLE, __idle, 0, IDLE_TASK_STACK_SIZE)
CONFIG_TASK_LIST
] __attribute__((aligned(8)));
diff --git a/include/task_id.h b/include/task_id.h
index 493082a0b5..cf359ec6d2 100644
--- a/include/task_id.h
+++ b/include/task_id.h
@@ -23,7 +23,7 @@ typedef uint8_t task_id_t;
* TASK_ID_<taskname> where <taskname> is the first parameter passed to the
* TASK macro in the TASK_LIST file.
*/
-#define TASK(n, r, d) TASK_ID_##n,
+#define TASK(n, r, d, s) TASK_ID_##n,
#include TASK_LIST
enum {
TASK_ID_IDLE,
diff --git a/test/charging.tasklist b/test/charging.tasklist
index ae93e63291..6ec7287373 100644
--- a/test/charging.tasklist
+++ b/test/charging.tasklist
@@ -8,20 +8,21 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(PWM, pwm_task, NULL) \
- TASK(TYPEMATIC, keyboard_typematic_task, NULL) \
- TASK(POWERSTATE, charge_state_machine_task, NULL) \
- TASK(X86POWER, x86_power_task, NULL) \
- TASK(I8042CMD, i8042_command_task, NULL) \
- TASK(KEYSCAN, keyboard_scan_task, NULL) \
- TASK(POWERBTN, power_button_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(PWM, pwm_task, NULL, TASK_STACK_SIZE) \
+ TASK(TYPEMATIC, keyboard_typematic_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERSTATE, charge_state_machine_task, NULL, TASK_STACK_SIZE) \
+ TASK(X86POWER, x86_power_task, NULL, TASK_STACK_SIZE) \
+ TASK(I8042CMD, i8042_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/test/flash_overwrite.tasklist b/test/flash_overwrite.tasklist
index 65a15ac498..df7abf767b 100644
--- a/test/flash_overwrite.tasklist
+++ b/test/flash_overwrite.tasklist
@@ -12,9 +12,10 @@
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/test/flash_rw_erase.tasklist b/test/flash_rw_erase.tasklist
index 65a15ac498..993b172aad 100644
--- a/test/flash_rw_erase.tasklist
+++ b/test/flash_rw_erase.tasklist
@@ -8,13 +8,14 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/test/hello.tasklist b/test/hello.tasklist
index 6c33988331..993b172aad 100644
--- a/test/hello.tasklist
+++ b/test/hello.tasklist
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -8,13 +8,14 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/test/kb_debounce.tasklist b/test/kb_debounce.tasklist
index 253871f365..84a627806a 100644
--- a/test/kb_debounce.tasklist
+++ b/test/kb_debounce.tasklist
@@ -14,13 +14,13 @@
* 'd' in an opaque parameter passed to the routine at startup
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(PWM, pwm_task, NULL) \
- TASK(TYPEMATIC, keyboard_typematic_task, NULL) \
- TASK(X86POWER, x86_power_task, NULL) \
- TASK(I8042CMD, i8042_command_task, NULL) \
- TASK(KEYSCAN, keyboard_scan_task, NULL) \
- TASK(POWERBTN, power_button_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(PWM, pwm_task, NULL, TASK_STACK_SIZE) \
+ TASK(TYPEMATIC, keyboard_typematic_task, NULL, TASK_STACK_SIZE) \
+ TASK(X86POWER, x86_power_task, NULL, TASK_STACK_SIZE) \
+ TASK(I8042CMD, i8042_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/test/kb_deghost.tasklist b/test/kb_deghost.tasklist
index 3bb24f5eb1..c17687e971 100644
--- a/test/kb_deghost.tasklist
+++ b/test/kb_deghost.tasklist
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -8,19 +8,20 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(PWM, pwm_task, NULL) \
- TASK(TYPEMATIC, keyboard_typematic_task, NULL) \
- TASK(X86POWER, x86_power_task, NULL) \
- TASK(I8042CMD, i8042_command_task, NULL) \
- TASK(KEYSCAN, keyboard_scan_task, NULL) \
- TASK(POWERBTN, power_button_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(PWM, pwm_task, NULL, TASK_STACK_SIZE) \
+ TASK(TYPEMATIC, keyboard_typematic_task, NULL, TASK_STACK_SIZE) \
+ TASK(X86POWER, x86_power_task, NULL, TASK_STACK_SIZE) \
+ TASK(I8042CMD, i8042_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/test/mutex.tasklist b/test/mutex.tasklist
index c617fc5387..44bfe8b664 100644
--- a/test/mutex.tasklist
+++ b/test/mutex.tasklist
@@ -1,16 +1,26 @@
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
/**
* List of enabled tasks in the priority order
*
* The first one has the lowest priority.
+ *
+ * For each task, use the macro TASK(n, r, d, s) where :
+ * 'n' in the name of the task
+ * 'r' in the main routine of the task
+ * 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL) \
- TASK(MTX3C, mutex_random_task, NULL) \
- TASK(MTX3B, mutex_random_task, NULL) \
- TASK(MTX3A, mutex_random_task, NULL) \
- TASK(MTX2, mutex_second_task, NULL) \
- TASK(MTX1, mutex_main_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \
+ TASK(MTX3C, mutex_random_task, NULL, TASK_STACK_SIZE) \
+ TASK(MTX3B, mutex_random_task, NULL, TASK_STACK_SIZE) \
+ TASK(MTX3A, mutex_random_task, NULL, TASK_STACK_SIZE) \
+ TASK(MTX2, mutex_second_task, NULL, TASK_STACK_SIZE) \
+ TASK(MTX1, mutex_main_task, NULL, TASK_STACK_SIZE)
diff --git a/test/pingpong.tasklist b/test/pingpong.tasklist
index ce8f7febd9..91719a0cd3 100644
--- a/test/pingpong.tasklist
+++ b/test/pingpong.tasklist
@@ -1,15 +1,25 @@
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
/**
* List of enabled tasks in the priority order
*
* The first one has the lowest priority.
+ *
+ * For each task, use the macro TASK(n, r, d, s) where :
+ * 'n' in the name of the task
+ * 'r' in the main routine of the task
+ * 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL) \
- TASK(TESTA, TaskAbc, (void *)'A') \
- TASK(TESTB, TaskAbc, (void *)'B') \
- TASK(TESTC, TaskAbc, (void *)'C') \
- TASK(TESTT, TaskTick, (void *)'T')
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \
+ TASK(TESTA, TaskAbc, (void *)'A', TASK_STACK_SIZE) \
+ TASK(TESTB, TaskAbc, (void *)'B', TASK_STACK_SIZE) \
+ TASK(TESTC, TaskAbc, (void *)'C', TASK_STACK_SIZE) \
+ TASK(TESTT, TaskTick, (void *)'T', TASK_STACK_SIZE)
diff --git a/test/power_button.tasklist b/test/power_button.tasklist
index b576e38f30..2651b581c2 100644
--- a/test/power_button.tasklist
+++ b/test/power_button.tasklist
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -8,19 +8,20 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(PWM, pwm_task, NULL) \
- TASK(TYPEMATIC, keyboard_typematic_task, NULL) \
- TASK(X86POWER, x86_power_task, NULL) \
- TASK(I8042CMD, i8042_command_task, NULL) \
- TASK(POWERBTN, power_button_task, NULL) \
- TASK(KEYSCAN, keyboard_scan_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(PWM, pwm_task, NULL, TASK_STACK_SIZE) \
+ TASK(TYPEMATIC, keyboard_typematic_task, NULL, TASK_STACK_SIZE) \
+ TASK(X86POWER, x86_power_task, NULL, TASK_STACK_SIZE) \
+ TASK(I8042CMD, i8042_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \
+ TASK(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/test/powerdemo.tasklist b/test/powerdemo.tasklist
index e0f7466954..27978e0b22 100644
--- a/test/powerdemo.tasklist
+++ b/test/powerdemo.tasklist
@@ -1,4 +1,19 @@
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+/**
+ * List of enabled tasks in the priority order
+ *
+ * The first one has the lowest priority.
+ *
+ * For each task, use the macro TASK(n, r, d, s) where :
+ * 'n' in the name of the task
+ * 'r' in the main routine of the task
+ * 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
+ */
#define CONFIG_TASK_LIST \
- TASK(CONSOLE, console_task, NULL) \
- TASK(POWERDEMO, power_demo_task, NULL)
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERDEMO, power_demo_task, NULL, TASK_STACK_SIZE)
diff --git a/test/scancode.tasklist b/test/scancode.tasklist
index 253871f365..eaf7fcf7f5 100644
--- a/test/scancode.tasklist
+++ b/test/scancode.tasklist
@@ -12,15 +12,16 @@
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(PWM, pwm_task, NULL) \
- TASK(TYPEMATIC, keyboard_typematic_task, NULL) \
- TASK(X86POWER, x86_power_task, NULL) \
- TASK(I8042CMD, i8042_command_task, NULL) \
- TASK(KEYSCAN, keyboard_scan_task, NULL) \
- TASK(POWERBTN, power_button_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(PWM, pwm_task, NULL, TASK_STACK_SIZE) \
+ TASK(TYPEMATIC, keyboard_typematic_task, NULL, TASK_STACK_SIZE) \
+ TASK(X86POWER, x86_power_task, NULL, TASK_STACK_SIZE) \
+ TASK(I8042CMD, i8042_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/test/thermal.tasklist b/test/thermal.tasklist
index fe620078e8..4037f3c773 100644
--- a/test/thermal.tasklist
+++ b/test/thermal.tasklist
@@ -8,17 +8,18 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(TEMPSENSOR, temp_sensor_task, NULL) \
- TASK(THERMAL, thermal_task, NULL) \
- TASK(PWM, pwm_task, NULL) \
- TASK(X86POWER, x86_power_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(TEMPSENSOR, temp_sensor_task, NULL, TASK_STACK_SIZE) \
+ TASK(THERMAL, thermal_task, NULL, TASK_STACK_SIZE) \
+ TASK(PWM, pwm_task, NULL, TASK_STACK_SIZE) \
+ TASK(X86POWER, x86_power_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/test/timer_calib.tasklist b/test/timer_calib.tasklist
index b17b961296..31302767c2 100644
--- a/test/timer_calib.tasklist
+++ b/test/timer_calib.tasklist
@@ -1,12 +1,22 @@
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
/**
* List of enabled tasks in the priority order
*
* The first one has the lowest priority.
+ *
+ * For each task, use the macro TASK(n, r, d, s) where :
+ * 'n' in the name of the task
+ * 'r' in the main routine of the task
+ * 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(TESTTMR, timer_calib_task, (void *)'T')\
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(TESTTMR, timer_calib_task, (void *)'T', TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/test/timer_dos.tasklist b/test/timer_dos.tasklist
index 1a19829cbb..0ee84ced4f 100644
--- a/test/timer_dos.tasklist
+++ b/test/timer_dos.tasklist
@@ -1,15 +1,25 @@
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
/**
* List of enabled tasks in the priority order
*
* The first one has the lowest priority.
+ *
+ * For each task, use the macro TASK(n, r, d, s) where :
+ * 'n' in the name of the task
+ * 'r' in the main routine of the task
+ * 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL) \
- TASK(TMRA, TaskTimer, (void *)1234) \
- TASK(TMRB, TaskTimer, (void *)5678) \
- TASK(TMRC, TaskTimer, (void *)8462) \
- TASK(TMRD, TaskTimer, (void *)3719)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \
+ TASK(TMRA, TaskTimer, (void *)1234, TASK_STACK_SIZE) \
+ TASK(TMRB, TaskTimer, (void *)5678, TASK_STACK_SIZE) \
+ TASK(TMRC, TaskTimer, (void *)8462, TASK_STACK_SIZE) \
+ TASK(TMRD, TaskTimer, (void *)3719, TASK_STACK_SIZE)
diff --git a/test/timer_jump.tasklist b/test/timer_jump.tasklist
index 323ae2fe2d..163bf93887 100644
--- a/test/timer_jump.tasklist
+++ b/test/timer_jump.tasklist
@@ -8,13 +8,14 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(CONSOLE, console_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE)
diff --git a/test/typematic.tasklist b/test/typematic.tasklist
index 253871f365..c17687e971 100644
--- a/test/typematic.tasklist
+++ b/test/typematic.tasklist
@@ -8,19 +8,20 @@
*
* The first one has the lowest priority.
*
- * For each task, use the macro TASK(n, r, d) where :
+ * For each task, use the macro TASK(n, r, d, s) where :
* 'n' in the name of the task
* 'r' in the main routine of the task
* 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
- TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(VBOOTHASH, vboot_hash_task, NULL) \
- TASK(PWM, pwm_task, NULL) \
- TASK(TYPEMATIC, keyboard_typematic_task, NULL) \
- TASK(X86POWER, x86_power_task, NULL) \
- TASK(I8042CMD, i8042_command_task, NULL) \
- TASK(KEYSCAN, keyboard_scan_task, NULL) \
- TASK(POWERBTN, power_button_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
- TASK(CONSOLE, console_task, NULL)
+ TASK(WATCHDOG, watchdog_task, NULL, TASK_STACK_SIZE) \
+ TASK(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
+ TASK(PWM, pwm_task, NULL, TASK_STACK_SIZE) \
+ TASK(TYPEMATIC, keyboard_typematic_task, NULL, TASK_STACK_SIZE) \
+ TASK(X86POWER, x86_power_task, NULL, TASK_STACK_SIZE) \
+ TASK(I8042CMD, i8042_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \
+ TASK(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \
+ TASK(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK(CONSOLE, console_task, NULL, TASK_STACK_SIZE)