1 /* Function prototypes for the system library. The prototypes in this file
2 * are undefined to do_unused if the kernel call is not enabled in config.h.
3 * The implementation is contained in src/kernel/system/.
5 * The system library allows to access system services by doing a kernel call.
6 * System calls are transformed into request messages to the SYS task that is
7 * responsible for handling the call. By convention, sys_call() is transformed
8 * into a message with type SYS_CALL that is handled in a function do_call().
11 * Jul 30, 2005 created SYS_INT86 to support BIOS driver (Philip Homburg)
12 * Jul 13, 2005 created SYS_PRIVCTL to manage services (Jorrit N. Herder)
13 * Jul 09, 2005 updated SYS_KILL to signal services (Jorrit N. Herder)
14 * Jun 21, 2005 created SYS_NICE for nice(2) kernel call (Ben J. Gras)
15 * Jun 21, 2005 created SYS_MEMSET to speed up exec(2) (Ben J. Gras)
16 * Apr 12, 2005 updated SYS_VCOPY for virtual_copy() (Jorrit N. Herder)
17 * Jan 20, 2005 updated SYS_COPY for virtual_copy() (Jorrit N. Herder)
18 * Oct 24, 2004 created SYS_GETKSIG to support PM (Jorrit N. Herder)
19 * Oct 10, 2004 created handler for unused calls (Jorrit N. Herder)
20 * Sep 09, 2004 updated SYS_EXIT to let services exit (Jorrit N. Herder)
21 * Aug 25, 2004 rewrote SYS_SETALARM to clean up code (Jorrit N. Herder)
22 * Jul 13, 2004 created SYS_SEGCTL to support drivers (Jorrit N. Herder)
23 * May 24, 2004 created SYS_SDEVIO to support drivers (Jorrit N. Herder)
24 * May 24, 2004 created SYS_GETINFO to retrieve info (Jorrit N. Herder)
25 * Apr 18, 2004 created SYS_VDEVIO to support drivers (Jorrit N. Herder)
26 * Feb 24, 2004 created SYS_IRQCTL to support drivers (Jorrit N. Herder)
27 * Feb 02, 2004 created SYS_DEVIO to support drivers (Jorrit N. Herder)
33 /* Common includes for the system library. */
39 /* Default handler for unused kernel calls. */
40 _PROTOTYPE( int do_unused
, (message
*m_ptr
) );
42 _PROTOTYPE( int do_exec
, (message
*m_ptr
) );
44 #define do_exec do_unused
47 _PROTOTYPE( int do_fork
, (message
*m_ptr
) );
49 #define do_fork do_unused
52 _PROTOTYPE( int do_newmap
, (message
*m_ptr
) );
54 #define do_newmap do_unused
57 _PROTOTYPE( int do_exit
, (message
*m_ptr
) );
59 #define do_exit do_unused
62 _PROTOTYPE( int do_trace
, (message
*m_ptr
) );
64 #define do_trace do_unused
67 _PROTOTYPE( int do_nice
, (message
*m_ptr
) );
69 #define do_nice do_unused
72 _PROTOTYPE( int do_runctl
, (message
*m_ptr
) );
74 #define do_runctl do_unused
77 _PROTOTYPE( int do_copy
, (message
*m_ptr
) );
78 #define do_vircopy do_copy
79 #if ! (USE_VIRCOPY || USE_PHYSCOPY)
80 #define do_copy do_unused
83 _PROTOTYPE( int do_vcopy
, (message
*m_ptr
) );
84 #define do_virvcopy do_vcopy
85 #if ! (USE_VIRVCOPY || USE_PHYSVCOPY)
86 #define do_vcopy do_unused
89 _PROTOTYPE( int do_umap
, (message
*m_ptr
) );
91 #define do_umap do_unused
94 _PROTOTYPE( int do_memset
, (message
*m_ptr
) );
96 #define do_memset do_unused
99 _PROTOTYPE( int do_abort
, (message
*m_ptr
) );
101 #define do_abort do_unused
104 _PROTOTYPE( int do_getinfo
, (message
*m_ptr
) );
106 #define do_getinfo do_unused
109 _PROTOTYPE( int do_privctl
, (message
*m_ptr
) );
111 #define do_privctl do_unused
114 _PROTOTYPE( int do_segctl
, (message
*m_ptr
) );
116 #define do_segctl do_unused
119 _PROTOTYPE( int do_irqctl
, (message
*m_ptr
) );
121 #define do_irqctl do_unused
124 _PROTOTYPE( int do_devio
, (message
*m_ptr
) );
126 #define do_devio do_unused
129 _PROTOTYPE( int do_vdevio
, (message
*m_ptr
) );
131 #define do_vdevio do_unused
134 _PROTOTYPE( int do_int86
, (message
*m_ptr
) );
136 _PROTOTYPE( int do_sdevio
, (message
*m_ptr
) );
138 #define do_sdevio do_unused
141 _PROTOTYPE( int do_kill
, (message
*m_ptr
) );
143 #define do_kill do_unused
146 _PROTOTYPE( int do_getksig
, (message
*m_ptr
) );
148 #define do_getksig do_unused
151 _PROTOTYPE( int do_endksig
, (message
*m_ptr
) );
153 #define do_endksig do_unused
156 _PROTOTYPE( int do_sigsend
, (message
*m_ptr
) );
158 #define do_sigsend do_unused
161 _PROTOTYPE( int do_sigreturn
, (message
*m_ptr
) );
163 #define do_sigreturn do_unused
166 _PROTOTYPE( int do_times
, (message
*m_ptr
) );
168 #define do_times do_unused
171 _PROTOTYPE( int do_setalarm
, (message
*m_ptr
) );
173 #define do_setalarm do_unused
176 _PROTOTYPE( int do_stime
, (message
*m_ptr
) );
178 _PROTOTYPE( int do_vtimer
, (message
*m_ptr
) );
180 #define do_vtimer do_unused
183 _PROTOTYPE( int do_safecopy
, (message
*m_ptr
) );
184 _PROTOTYPE( int do_vsafecopy
, (message
*m_ptr
) );
185 _PROTOTYPE( int do_iopenable
, (message
*m_ptr
) );
186 _PROTOTYPE( int do_vmctl
, (message
*m_ptr
) );
187 _PROTOTYPE( int do_setgrant
, (message
*m_ptr
) );
188 _PROTOTYPE( int do_readbios
, (message
*m_ptr
) );
189 _PROTOTYPE( int do_mapdma
, (message
*m_ptr
) );
191 _PROTOTYPE( int do_sprofile
, (message
*m_ptr
) );
193 #define do_sprofile do_unused
196 _PROTOTYPE( int do_cprofile
, (message
*m_ptr
) );
197 _PROTOTYPE( int do_profbuf
, (message
*m_ptr
) );
199 _PROTOTYPE( int do_mapdma
, (message
*m_ptr
) );
201 #endif /* SYSTEM_H */