sched: add task and thread alloc functions
This commit is contained in:
@@ -2,26 +2,25 @@
|
||||
#include <socks/sched.h>
|
||||
#include <socks/printk.h>
|
||||
|
||||
static object_type_t task_type = {
|
||||
.ob_name = "task",
|
||||
.ob_size = sizeof(task_t),
|
||||
};
|
||||
|
||||
static object_type_t thread_type = {
|
||||
.ob_name = "thread",
|
||||
.ob_size = sizeof(task_thread_t),
|
||||
};
|
||||
extern kern_status_t setup_kernel_task(void);
|
||||
extern kern_status_t task_object_type_init(void);
|
||||
extern kern_status_t thread_object_type_init(void);
|
||||
|
||||
kern_status_t sched_init(void)
|
||||
{
|
||||
kern_status_t status = KERN_OK;
|
||||
|
||||
status = object_type_register(&task_type);
|
||||
status = task_object_type_init();
|
||||
if (status != KERN_OK) {
|
||||
return status;
|
||||
}
|
||||
|
||||
status = object_type_register(&thread_type);
|
||||
status = thread_object_type_init();
|
||||
if (status != KERN_OK) {
|
||||
return status;
|
||||
}
|
||||
|
||||
status = setup_kernel_task();
|
||||
if (status != KERN_OK) {
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user