aboutsummaryrefslogtreecommitdiffstats
path: root/include/task.h
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-02-20 17:50:47 -0500
committerClyne Sullivan <tullivan99@gmail.com>2018-02-20 17:50:47 -0500
commitf27b19a531a61aa088d380174cc960b9f2e68237 (patch)
tree57830178579ee20dbc0c14b280fdbc7bd59a53a9 /include/task.h
parentb0cd81cf66c0e5b5d0d662384752337f6c69cde5 (diff)
major work, own malloc, making things work
Diffstat (limited to 'include/task.h')
-rw-r--r--include/task.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/task.h b/include/task.h
index c57b2c0..eda2dcd 100644
--- a/include/task.h
+++ b/include/task.h
@@ -1,10 +1,25 @@
+/**
+ * @file task.h
+ * Provides multitasking functionality
+ */
+
#ifndef TASK_H_
#define TASK_H_
#include <stdint.h>
+/**
+ * Enters multitasking mode. The given function acts as the initial thread.
+ * This task is given a 4kb stack.
+ * @param init the initial thread to run
+ */
void task_init(void (*init)(void));
+/**
+ * Starts a new task.
+ * @param task the code to run
+ * @param stackSize how many bytes of stack to give the thread
+ */
void task_start(void (*task)(void), uint16_t stackSize);
#endif // TASK_H_