aboutsummaryrefslogtreecommitdiffstats
path: root/src/basecmd.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-08-07 12:33:08 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-08-08 00:27:28 -0400
commit2c272f99a3fac49d8acd4b49a1aa3302225f17b8 (patch)
tree07998c722ed20fa812de26e1941daf57a030271f /src/basecmd.h
parenta9982beacf184ccdc4bf1221852c900b0809537d (diff)
downloadkutter-2c272f99a3fac49d8acd4b49a1aa3302225f17b8.tar.gz
kutter-2c272f99a3fac49d8acd4b49a1aa3302225f17b8.tar.xz
kutter-2c272f99a3fac49d8acd4b49a1aa3302225f17b8.zip
sched: Implement generic sleep mechanism based on tasks pending
Track when tasks are pending and spin in irq_wait() when no tasks are pending. This improves the mechanism for sleeping the processor - it's simpler for the board specific code and it reduces the possibility of the processor sleeping when tasks are busy. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/basecmd.h')
-rw-r--r--src/basecmd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basecmd.h b/src/basecmd.h
index 713343e2..8787b194 100644
--- a/src/basecmd.h
+++ b/src/basecmd.h
@@ -9,7 +9,7 @@ void move_request_size(int size);
void *oid_lookup(uint8_t oid, void *type);
void *oid_alloc(uint8_t oid, void *type, uint16_t size);
void *oid_next(uint8_t *i, void *type);
-void stats_note_sleep(uint32_t sleep_time);
+void stats_update(uint32_t start, uint32_t cur);
#define foreach_oid(pos,data,oidtype) \
for (pos=-1; (data=oid_next(&pos, oidtype)); )