sched: add support for scheduling functions to be executed later

This commit is contained in:
2023-06-14 17:35:10 +01:00
parent cdb9fef36c
commit 4a1c6cae69
7 changed files with 217 additions and 1 deletions

View File

@@ -9,6 +9,10 @@
extern "C" {
#endif
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#define CLAMP(x, lo, hi) (MIN(MAX(x, lo), hi))
extern uint64_t hash_string(const char *s);
extern void data_size_to_string(size_t value, char *out, size_t outsz);
static inline bool power_of_2(size_t x) { return (x > 0 && (x & (x - 1)) == 0); }