5 * Copyright (C) 2008-2009 Pawel Dziepak
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #include "libs/string.h"
25 #include "arch/low/taskswitch.h"
29 using namespace modules
;
31 void module::place(module_type mt
) {
35 void module::enter() {
36 if (mtype
== module_kernel_space
)
37 enter_module(/*manes::manec::get().cast<manes::component>()*/);
38 else if (mtype
== module_user_space
)
39 arch::jump_user(enter_module
);
41 critical("unknown or unsupported module type");
44 delegate
<void> module::get_delegate() {
45 return delegate
<void>::method(this, &module::enter
);
48 void module::register_type() {
49 manes::manec::get()->register_type
<modules::elf
>("module", "none");