aboutsummaryrefslogtreecommitdiff
path: root/task.h
diff options
context:
space:
mode:
Diffstat (limited to 'task.h')
-rw-r--r--task.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/task.h b/task.h
index 6b45db8..47d62d6 100644
--- a/task.h
+++ b/task.h
@@ -55,6 +55,7 @@ extern tcb_t *task_add(char *name, funcp_t func, void *cookie, void *stack, size
extern void task_set_idle_hook(funcp_t func);
extern void task_yield(void);
+extern void task_yield_maybe(void);
extern void task_sleep(void);
extern void task_wake(tcb_t *t);
@@ -73,4 +74,15 @@ extern void task_delay(uint32_t delay);
extern void task_mutex_lock(task_mutex_t *mutex);
extern void task_mutex_unlock(task_mutex_t *mutex);
+#ifdef DO_TASK_METRICS
+#include <sys/time.h>
+
+struct task_metrics {
+ struct timeval avg, max;
+};
+
+void task_get_metrics(struct task_metrics *tm);
+void task_reset_metrics(void);
+#endif
+
#endif /* _TASK_H_ */