3 * \brief Thread implementation
6 * (c) 2004-2009 Alexander Warg <warg@os.inf.tu-dresden.de>
7 * economic rights: Technische Universität Dresden (Germany)
8 * This file is part of TUD:OS and distributed under the terms of the
9 * GNU Lesser General Public License 2.1.
10 * Please see the COPYING-LGPL-2.1 file for details.
13 #ifndef CXX_THREAD_H__
14 #define CXX_THREAD_H__
16 #include <l4/sys/capability>
17 #include <l4/sys/types.h>
32 Thread(bool initiate);
34 Thread(void *stack, L4::Cap<L4::Thread> const &cap);
36 void execute() asm ("L4_Thread_execute");
37 virtual void run() = 0;
38 virtual void shutdown() asm ("L4_Thread_shutdown");
42 L4::Cap<L4::Thread> self() const throw()
48 static void start_cxx_thread(Thread *_this)
49 asm ("L4_Thread_start_cxx_thread");
51 static void kill_cxx_thread(Thread *_this)
52 asm ("L4_Thread_kill_cxx_thread");
54 static void set_pager(L4::Cap<void>const &p) throw()
60 L4::Cap<L4::Thread> _cap;
67 static L4::Cap<void> _pager;
68 static L4::Cap<void> _preempter;
69 static L4::Cap<void> _master;
74 #endif /* CXX_THREAD_H__ */