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 * Mar 01, 2010 SYS_CLEAR and SYS_EXIT split (Cristiano Giuffrida)
12 * Jul 30, 2005 created SYS_INT86 to support BIOS driver (Philip Homburg)
13 * Jul 13, 2005 created SYS_PRIVCTL to manage services (Jorrit N. Herder)
14 * Jul 09, 2005 updated SYS_KILL to signal services (Jorrit N. Herder)
15 * Jun 21, 2005 created SYS_NICE for nice(2) kernel call (Ben J. Gras)
16 * Jun 21, 2005 created SYS_MEMSET to speed up exec(2) (Ben J. Gras)
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
, (struct proc
* caller
, message
*m_ptr
) );
42 _PROTOTYPE( int do_exec
, (struct proc
* caller
, message
*m_ptr
) );
44 #define do_exec do_unused
47 _PROTOTYPE( int do_fork
, (struct proc
* caller
, message
*m_ptr
) );
49 #define do_fork do_unused
52 _PROTOTYPE( int do_newmap
, (struct proc
* caller
, message
*m_ptr
) );
54 #define do_newmap do_unused
57 _PROTOTYPE( int do_clear
, (struct proc
* caller
, message
*m_ptr
) );
59 #define do_clear do_unused
62 _PROTOTYPE( int do_trace
, (struct proc
* caller
, message
*m_ptr
) );
64 #define do_trace do_unused
67 _PROTOTYPE( int do_runctl
, (struct proc
* caller
, message
*m_ptr
) );
69 #define do_runctl do_unused
72 _PROTOTYPE( int do_update
, (struct proc
* caller
, message
*m_ptr
) );
74 #define do_update do_unused
77 _PROTOTYPE( int do_exit
, (struct proc
* caller
, message
*m_ptr
) );
79 #define do_exit do_unused
82 _PROTOTYPE( int do_copy
, (struct proc
* caller
, message
*m_ptr
) );
83 #define do_vircopy do_copy
84 #if ! (USE_VIRCOPY || USE_PHYSCOPY)
85 #define do_copy do_unused
88 _PROTOTYPE( int do_umap
, (struct proc
* caller
, message
*m_ptr
) );
90 #define do_umap do_unused
93 _PROTOTYPE( int do_memset
, (struct proc
* caller
, message
*m_ptr
) );
95 #define do_memset do_unused
98 _PROTOTYPE( int do_abort
, (struct proc
* caller
, message
*m_ptr
) );
100 #define do_abort do_unused
103 _PROTOTYPE( int do_getinfo
, (struct proc
* caller
, message
*m_ptr
) );
105 #define do_getinfo do_unused
108 _PROTOTYPE( int do_privctl
, (struct proc
* caller
, message
*m_ptr
) );
110 #define do_privctl do_unused
113 _PROTOTYPE( int do_segctl
, (struct proc
* caller
, message
*m_ptr
) );
115 #define do_segctl do_unused
118 _PROTOTYPE( int do_irqctl
, (struct proc
* caller
, message
*m_ptr
) );
120 #define do_irqctl do_unused
123 _PROTOTYPE( int do_devio
, (struct proc
* caller
, message
*m_ptr
) );
125 #define do_devio do_unused
128 _PROTOTYPE( int do_vdevio
, (struct proc
* caller
, message
*m_ptr
) );
130 #define do_vdevio do_unused
133 _PROTOTYPE( int do_int86
, (struct proc
* caller
, message
*m_ptr
) );
135 _PROTOTYPE( int do_sdevio
, (struct proc
* caller
, message
*m_ptr
) );
137 #define do_sdevio do_unused
140 _PROTOTYPE( int do_kill
, (struct proc
* caller
, message
*m_ptr
) );
142 #define do_kill do_unused
145 _PROTOTYPE( int do_getksig
, (struct proc
* caller
, message
*m_ptr
) );
147 #define do_getksig do_unused
150 _PROTOTYPE( int do_endksig
, (struct proc
* caller
, message
*m_ptr
) );
152 #define do_endksig do_unused
155 _PROTOTYPE( int do_sigsend
, (struct proc
* caller
, message
*m_ptr
) );
157 #define do_sigsend do_unused
160 _PROTOTYPE( int do_sigreturn
, (struct proc
* caller
, message
*m_ptr
) );
162 #define do_sigreturn do_unused
165 _PROTOTYPE( int do_times
, (struct proc
* caller
, message
*m_ptr
) );
167 #define do_times do_unused
170 _PROTOTYPE( int do_setalarm
, (struct proc
* caller
, message
*m_ptr
) );
172 #define do_setalarm do_unused
175 _PROTOTYPE( int do_stime
, (struct proc
* caller
, message
*m_ptr
) );
177 _PROTOTYPE( int do_vtimer
, (struct proc
* caller
, message
*m_ptr
) );
179 #define do_vtimer do_unused
182 _PROTOTYPE( int do_safecopy
, (struct proc
* caller
, message
*m_ptr
) );
183 _PROTOTYPE( int do_vsafecopy
, (struct proc
* caller
, message
*m_ptr
) );
184 _PROTOTYPE( int do_iopenable
, (struct proc
* caller
, message
*m_ptr
) );
185 _PROTOTYPE( int do_vmctl
, (struct proc
* caller
, message
*m_ptr
) );
186 _PROTOTYPE( int do_setgrant
, (struct proc
* caller
, message
*m_ptr
) );
187 _PROTOTYPE( int do_readbios
, (struct proc
* caller
, message
*m_ptr
) );
189 _PROTOTYPE( int do_safemap
, (struct proc
* caller
, message
*m_ptr
) );
190 _PROTOTYPE( int do_saferevmap
, (struct proc
* caller
, message
*m_ptr
) );
191 _PROTOTYPE( int do_safeunmap
, (struct proc
* caller
, message
*m_ptr
) );
193 _PROTOTYPE( int do_sprofile
, (struct proc
* caller
, message
*m_ptr
) );
195 #define do_sprofile do_unused
198 _PROTOTYPE( int do_cprofile
, (struct proc
* caller
, message
*m_ptr
) );
199 _PROTOTYPE( int do_profbuf
, (struct proc
* caller
, message
*m_ptr
) );
201 _PROTOTYPE( int do_getmcontext
, (struct proc
* caller
, message
*m_ptr
) );
202 _PROTOTYPE( int do_setmcontext
, (struct proc
* caller
, message
*m_ptr
) );
204 #define do_getmcontext do_unused
205 #define do_setmcontext do_unused
208 _PROTOTYPE( int do_schedule
, (struct proc
* caller
, message
*m_ptr
) );
209 _PROTOTYPE( int do_schedctl
, (struct proc
* caller
, message
*m_ptr
) );
211 _PROTOTYPE( int do_statectl
, (struct proc
* caller
, message
*m_ptr
) );
213 #define do_statectl do_unused
216 #endif /* SYSTEM_H */