summaryrefslogtreecommitdiff
path: root/core/cortex-m/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m/task.c')
-rw-r--r--core/cortex-m/task.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index aaaa776385..41b0b7e39a 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -129,6 +129,8 @@ static int need_resched_or_profiling = 0;
*/
static uint32_t tasks_ready = (1<<TASK_ID_COUNT) - 1;
+static int start_called; /* Has task swapping started */
+
static task_ *__get_current(void)
{
@@ -211,6 +213,12 @@ uint32_t *task_get_event_bitmap(task_id_t tskid)
}
+int task_start_called(void)
+{
+ return start_called;
+}
+
+
/* Scheduling system call */
void svc_handler(int desched, task_id_t resched)
{
@@ -597,6 +605,7 @@ int task_start(void)
#ifdef CONFIG_TASK_PROFILING
task_start_time = exc_end_time = get_time().val;
#endif
+ start_called = 1;
return __task_start(&need_resched_or_profiling);
}