4 * syscalls_handler.h --
6 * Interface for system call wrappers
8 * (c) 2012 Björn Döbel <doebel@os.inf.tu-dresden.de>,
9 * economic rights: Technische Universität Dresden (Germany)
10 * This file is part of TUD:OS and distributed under the terms of the
11 * GNU General Public License 2.
12 * Please see the COPYING-GPL-2 file for details.
18 extern InstanceManager *_the_instance_manager;
21 * Generic system call wrapper class
27 * Store UTCB from orig to backup.
29 void store_utcb(char *orig, char *backup) { memcpy(backup, orig, L4_UTCB_OFFSET); }
32 SyscallHandler() = default;
35 Romain::Observer::ObserverReturnVal
36 handle(Romain::App_instance *i,
37 Romain::App_thread *t,
38 Romain::Thread_group *tg,
41 enter_kdebug("calling empty syscall handler!?");
42 return Romain::Observer::Replicatable;
46 proxy_syscall(Romain::App_instance *i,
47 Romain::App_thread *t,
48 Romain::Thread_group *tg,
49 Romain::App_model *a);
52 #define SpecificSyscallHandler(name) \
53 class name : public SyscallHandler \
60 Romain::Observer::ObserverReturnVal \
61 handle(Romain::App_instance *i, \
62 Romain::App_thread *t, \
63 Romain::Thread_group *tg, \
64 Romain::App_model *a); \
69 * System call wrapper for L4_PROTO_SCHEDULER
71 SpecificSyscallHandler(Scheduling);
72 SpecificSyscallHandler(ThreadHandler);
73 SpecificSyscallHandler(RegionManagingHandler);
74 SpecificSyscallHandler(IrqHandler);