diff options
author | Paul Selkirk <paul@psgd.org> | 2018-04-06 16:14:43 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2018-04-06 22:34:05 -0400 |
commit | 6c7bd80b4e7bc5af1659b14b7fb0038f3dc53989 (patch) | |
tree | a10451c611dcf9f7d31a019c6bbc2e81fc8cd9ac /task.h | |
parent | b35b87ea14016760786319a23b87792f1e1041de (diff) | |
parent | f508e24f5b872a8f7d642eb4fb2217dd1497de96 (diff) |
Merge branch 'profiling'
Diffstat (limited to 'task.h')
-rw-r--r-- | task.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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_ */ |