1 |
/* stubs-init.h - Initialize system stubs in an architecture dependent way. |
/* stubs-init.h - Initialize system stubs in an architecture dependent way. |
2 |
Copyright (C) 2003 Free Software Foundation, Inc. |
Copyright (C) 2003, 2005 Free Software Foundation, Inc. |
3 |
Written by Marcus Brinkmann <marcus@gnu.org>. |
Written by Marcus Brinkmann <marcus@gnu.org>. |
4 |
|
|
5 |
This file is part of the GNU L4 library. |
This file is part of the GNU L4 library. |
23 |
# error "Never use <l4/bits/stubs-init.h> directly; include <l4/stubs-init.h> instead." |
# error "Never use <l4/bits/stubs-init.h> directly; include <l4/stubs-init.h> instead." |
24 |
#endif |
#endif |
25 |
|
|
26 |
#define __L4_SETUP_SYSCALL(name) \ |
#define __L4_SETUP_SYSCALL_X(name,kipname) \ |
27 |
extern void (*__l4_ ## name) (void); \ |
extern void (*__l4_ ## name) (void); \ |
28 |
__l4_ ## name = (void (*) (void)) \ |
__l4_ ## name = (void (*) (void)) \ |
29 |
(((l4_word_t) l4_kip ()) + l4_kip ()->name) |
(((l4_word_t) l4_kip ()) + l4_kip ()->kipname) |
30 |
|
|
31 |
|
#define __L4_SETUP_SYSCALL(name) __L4_SETUP_SYSCALL_X(name,name) |
32 |
|
|
33 |
|
|
34 |
/* Initialize the syscall stubs. */ |
/* Initialize the syscall stubs. */ |
47 |
__L4_SETUP_SYSCALL (space_control); |
__L4_SETUP_SYSCALL (space_control); |
48 |
__L4_SETUP_SYSCALL (processor_control); |
__L4_SETUP_SYSCALL (processor_control); |
49 |
__L4_SETUP_SYSCALL (memory_control); |
__L4_SETUP_SYSCALL (memory_control); |
50 |
|
|
51 |
|
__L4_SETUP_SYSCALL_X (set_gs0, arch0); |
52 |
}; |
}; |