]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/loader/server/src/app_task.h
99872359f32a476806a8fda1e031e2f345c39a11
[l4.git] / l4 / pkg / loader / server / src / app_task.h
1 /*
2  * (c) 2008-2009 Alexander Warg <warg@os.inf.tu-dresden.de>
3  *     economic rights: Technische Universität Dresden (Germany)
4  *
5  * This file is part of TUD:OS and distributed under the terms of the
6  * GNU General Public License 2.
7  * Please see the COPYING-GPL-2 file for details.
8  */
9 #pragma once
10
11 #include <l4/re/log>
12 #include <l4/re/env>
13 #include "region.h"
14 #include "sched_proxy.h"
15
16 #include <l4/cxx/ipc_server>
17
18 class App_task : public L4::Server_object
19 {
20 private:
21   L4::Cap<L4::Task> _task;
22   L4::Cap<L4::Thread> _thread;
23   L4::Cap<L4::Log> _log;
24
25   Region_map _rm;
26
27 public:
28   Sched_proxy _sched;
29
30   App_task();
31   static L4::Cap<L4Re::Mem_alloc> allocator()
32   { return L4Re::Env::env()->mem_alloc(); }
33   int dispatch(l4_umword_t obj, L4::Ipc_iostream &ios);
34
35
36   Region_map *rm() { return &_rm; }
37
38   void task_cap(L4::Cap<L4::Task> const &c) { _task = c; }
39   void thread_cap(L4::Cap<L4::Thread> const &c) { _thread = c; }
40
41   L4::Cap<L4::Task> task_cap() const { return _task; }
42   L4::Cap<L4::Thread> thread_cap() const { return _thread; }
43
44   virtual ~App_task();
45 };