diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/heap.h | 1 | ||||
-rw-r--r-- | include/random.h | 9 | ||||
-rw-r--r-- | include/script.h | 8 | ||||
-rw-r--r-- | include/stdlib.h | 8 | ||||
-rw-r--r-- | include/task.h | 6 |
5 files changed, 31 insertions, 1 deletions
diff --git a/include/heap.h b/include/heap.h index 8118384..c93eb8e 100644 --- a/include/heap.h +++ b/include/heap.h @@ -4,7 +4,6 @@ #include <stdint.h> void heap_init(void *buf); -uint32_t heap_used(void); void *malloc(uint32_t size); void *calloc(uint32_t count, uint32_t size); diff --git a/include/random.h b/include/random.h new file mode 100644 index 0000000..6485f26 --- /dev/null +++ b/include/random.h @@ -0,0 +1,9 @@ +#ifndef RANDOM_H_ +#define RANDOM_H_ + +#include <stdint.h> + +void random_init(void); +uint32_t random_get(void); + +#endif // RANDOM_H_ diff --git a/include/script.h b/include/script.h new file mode 100644 index 0000000..dc8c590 --- /dev/null +++ b/include/script.h @@ -0,0 +1,8 @@ +#ifndef SCRIPT_H_ +#define SCRIPT_H_ + +#include <parser.h> + +void script_loadlib(interpreter *it); + +#endif // SCRIPT_H_ diff --git a/include/stdlib.h b/include/stdlib.h new file mode 100644 index 0000000..c2658d6 --- /dev/null +++ b/include/stdlib.h @@ -0,0 +1,8 @@ +#ifndef STDLIB_H_ +#define STDLIB_H_ + +char *snprintf(char *buf, unsigned int max, const char *format, ...); +float strtof(const char *s, char **endptr); +int atoi(const char *s); + +#endif // STDLIB_H_ diff --git a/include/task.h b/include/task.h index 7077b00..1ef8639 100644 --- a/include/task.h +++ b/include/task.h @@ -8,6 +8,12 @@ #include <stdint.h> +typedef struct { + void *next; + uint32_t *stack; + uint32_t *sp; +} task_t; + /** * Enters multitasking mode. The given function acts as the initial thread. * This task is given a 4kb stack. |