summaryrefslogtreecommitdiff
path: root/include/task.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-04-25 13:04:23 -0700
committerRandall Spangler <rspangler@chromium.org>2012-04-25 14:49:49 -0700
commit1aa57e140e3c8ef02c0140730dde3962d3eb821f (patch)
tree18b39676fa0b9cbae24e3cb50a712336ed3a7528 /include/task.h
parent212784b5fab0a1ba30c45e66a9329423a6d998e5 (diff)
downloadchrome-ec-1aa57e140e3c8ef02c0140730dde3962d3eb821f.tar.gz
Watchdog fixes
1) When frequency changes, reload the watchdog timer right away, or it may expire before the next reload. (Only matters when re-enabling the PLL.) 2) Split out the timer/task debug output used by the watchdog into their own routines, instead of assuming it's safe to call the command handlers. Also make the flushes in those print routines safe to call from interrupt level. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=waitms 1500; should print task dump again Change-Id: I07e0ed24a526ae499566dab0bbeb0f5755cd5be6
Diffstat (limited to 'include/task.h')
-rw-r--r--include/task.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/task.h b/include/task.h
index 79289b1c08..660195460e 100644
--- a/include/task.h
+++ b/include/task.h
@@ -55,6 +55,11 @@ static inline void task_wake(task_id_t tskid)
* When called in interrupt context, returns TASK_ID_INVALID. */
task_id_t task_get_current(void);
+/* Convert an address to the corresponding task ID. The address may be a stack
+ * pointer or the task data for a task. Returns TASK_ID_INVALID if the address
+ * does not correspond to a task. */
+task_id_t task_from_addr(uint32_t addr);
+
/* Return a pointer to the bitmap of events of the task. */
uint32_t *task_get_event_bitmap(task_id_t tsk);
@@ -70,6 +75,10 @@ uint32_t *task_get_event_bitmap(task_id_t tsk);
* Returns the bitmap of received events (and clears it atomically). */
uint32_t task_wait_event(int timeout_us);
+/* Prints the list of tasks using the command output channel. This may be
+ * called from interrupt level. */
+void task_print_list(void);
+
#ifdef CONFIG_TASK_PROFILING
/* Start tracking an interrupt.
*