diff options
author | Paul Selkirk <paul@psgd.org> | 2017-09-07 18:17:12 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2017-09-07 18:20:55 -0400 |
commit | 72227852729ed3125af58cff3f593340b3247fed (patch) | |
tree | 234d45ae587ce51bfbbce6d8c059a121a44bf1e6 /task.c | |
parent | 2e1f88062c7ec6cd12688ce7522e802bbf09bba1 (diff) | |
parent | 5ff8c9512db48d128cf07904f68eb5139bebf952 (diff) |
Rebase branch 'profiling' from master
Diffstat (limited to 'task.c')
-rw-r--r-- | task.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -81,7 +81,7 @@ static tcb_t *cur_task = NULL; #define STACK_GUARD_WORD 0x55AA5A5A -#ifdef TASK_METRICS +#ifdef DO_TASK_METRICS static uint32_t tick_start = 0; static uint32_t tick_idle = 0; static uint32_t tick_max = 0; @@ -192,7 +192,7 @@ void task_yield(void) if (tail == NULL) return; -#ifdef TASK_METRICS +#ifdef DO_TASK_METRICS uint32_t tick0 = HAL_GetTick(); #endif @@ -213,7 +213,7 @@ void task_yield(void) * } while (next == NULL); */ -#ifdef TASK_METRICS +#ifdef DO_TASK_METRICS uint32_t tick = HAL_GetTick(); tick_idle += (tick - tick0); if (tick_start == 0) @@ -395,7 +395,7 @@ void task_mutex_unlock(task_mutex_t *mutex) mutex->locked = 0; } -#ifdef TASK_METRICS +#ifdef DO_TASK_METRICS void task_get_metrics(struct task_metrics *tm) { if (tm != NULL) { |