From 4614429f5751e14e37ceedb7130b7a829c89476a Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 27 Feb 2018 23:55:46 -0500 Subject: cleaner main, random nums, perfect script run --- include/heap.h | 1 - include/random.h | 9 +++++++++ include/script.h | 8 ++++++++ include/stdlib.h | 8 ++++++++ include/task.h | 6 ++++++ 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 include/random.h create mode 100644 include/script.h create mode 100644 include/stdlib.h (limited to 'include') 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 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 + +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 + +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 +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. -- cgit v1.2.3