32 lines
564 B
C
32 lines
564 B
C
#include <socks/object.h>
|
|
#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),
|
|
};
|
|
|
|
kern_status_t sched_init(void)
|
|
{
|
|
kern_status_t status = KERN_OK;
|
|
|
|
status = object_type_register(&task_type);
|
|
if (status != KERN_OK) {
|
|
return status;
|
|
}
|
|
|
|
status = object_type_register(&thread_type);
|
|
if (status != KERN_OK) {
|
|
return status;
|
|
}
|
|
|
|
printk("sched: initialised");
|
|
return status;
|
|
}
|