]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/moe/server/src/globals.cc
Inital import
[l4.git] / l4 / pkg / moe / server / src / globals.cc
1 /*
2  * (c) 2008-2009 Technische Universität Dresden
3  * This file is part of TUD:OS and distributed under the terms of the
4  * GNU General Public License 2.
5  * Please see the COPYING-GPL-2 file for details.
6  */
7 #include "globals.h"
8 #include <cstdio>
9
10 l4_kernel_info_t *_current_kip;
11 L4::Cap<void> root_name_space_obj;
12
13 static Cap_alloc _cap_allocator __attribute__((init_priority(1400)));
14 Object_pool __attribute__((init_priority(1401))) object_pool(&_cap_allocator);
15
16 char log_buffer[1024];
17 Moe::Dataspace *kip_ds;
18
19 Moe::Server_object::~Server_object()
20 {
21   if (obj_cap().is_valid())
22     {
23       l4_task_unmap(L4_BASE_TASK_CAP,
24           obj_cap().fpage(L4_FPAGE_RWX), L4_FP_ALL_SPACES);
25       //printf("free SO cap: %lx\n", obj_cap().cap());
26       object_pool.cap_alloc()->free(this);
27       //printf("  hint=%lx\n", object_pool.cap_alloc()->hint());
28     }
29 }
30
31 extern char const *const PROG = "moe";