#include "kobject_helper.h"
#include "types.h"
-class Scheduler : public Kobject_h<Scheduler>, public Kobject
+class Scheduler : public Kobject_h<Scheduler>
{
FIASCO_DECLARE_KOBJ();
// ----------------------------------------------------------------------------
IMPLEMENTATION:
-#include "thread.h"
+#include "thread_object.h"
#include "l4_buf_iter.h"
#include "entry_frame.h"
FIASCO_DEFINE_KOBJ(Scheduler);
+static Scheduler scheduler;
+
+PUBLIC void
+Scheduler::operator delete (void *)
+{
+ printf("WARNING: tried to delete kernel scheduler object.\n"
+ " The system is now useless\n");
+}
+
+PUBLIC inline
+Scheduler::Scheduler()
+{
+ initial_kobjects.register_obj(this, 7);
+}
+
PRIVATE static
Mword
Scheduler::first_online(Cpu_set const *cpus, Mword bm)
if (EXPECT_FALSE(!_thread.is_objpage()))
return commit_result(-L4_err::EInval);
- Thread *thread = Kobject::dcast<Thread*>(s->lookup_local(_thread.obj_index()));
+ Thread *thread = Kobject::dcast<Thread_object*>(s->lookup_local(_thread.obj_index()));
if (!thread)
return commit_result(-L4_err::EInval);