1 /* Function prototypes for the system library. The prototypes in this file
2 * are undefined to NULL 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 _PROTOTYPE( int do_exec
, (struct proc
* caller
, message
*m_ptr
) );
44 _PROTOTYPE( int do_fork
, (struct proc
* caller
, message
*m_ptr
) );
49 _PROTOTYPE( int do_newmap
, (struct proc
* caller
, message
*m_ptr
) );
51 #define do_newmap NULL
54 _PROTOTYPE( int do_clear
, (struct proc
* caller
, message
*m_ptr
) );
59 _PROTOTYPE( int do_trace
, (struct proc
* caller
, message
*m_ptr
) );
64 _PROTOTYPE( int do_runctl
, (struct proc
* caller
, message
*m_ptr
) );
66 #define do_runctl NULL
69 _PROTOTYPE( int do_update
, (struct proc
* caller
, message
*m_ptr
) );
71 #define do_update NULL
74 _PROTOTYPE( int do_exit
, (struct proc
* caller
, message
*m_ptr
) );
79 _PROTOTYPE( int do_copy
, (struct proc
* caller
, message
*m_ptr
) );
80 #define do_vircopy do_copy
81 #if ! (USE_VIRCOPY || USE_PHYSCOPY)
85 _PROTOTYPE( int do_umap
, (struct proc
* caller
, message
*m_ptr
) );
90 _PROTOTYPE( int do_memset
, (struct proc
* caller
, message
*m_ptr
) );
92 #define do_memset NULL
95 _PROTOTYPE( int do_abort
, (struct proc
* caller
, message
*m_ptr
) );
100 _PROTOTYPE( int do_getinfo
, (struct proc
* caller
, message
*m_ptr
) );
102 #define do_getinfo NULL
105 _PROTOTYPE( int do_privctl
, (struct proc
* caller
, message
*m_ptr
) );
107 #define do_privctl NULL
110 _PROTOTYPE( int do_segctl
, (struct proc
* caller
, message
*m_ptr
) );
112 #define do_segctl NULL
115 _PROTOTYPE( int do_irqctl
, (struct proc
* caller
, message
*m_ptr
) );
117 #define do_irqctl NULL
120 _PROTOTYPE( int do_devio
, (struct proc
* caller
, message
*m_ptr
) );
122 #define do_devio NULL
125 _PROTOTYPE( int do_vdevio
, (struct proc
* caller
, message
*m_ptr
) );
127 #define do_vdevio NULL
130 _PROTOTYPE( int do_int86
, (struct proc
* caller
, message
*m_ptr
) );
132 _PROTOTYPE( int do_sdevio
, (struct proc
* caller
, message
*m_ptr
) );
134 #define do_sdevio NULL
137 _PROTOTYPE( int do_kill
, (struct proc
* caller
, message
*m_ptr
) );
142 _PROTOTYPE( int do_getksig
, (struct proc
* caller
, message
*m_ptr
) );
144 #define do_getksig NULL
147 _PROTOTYPE( int do_endksig
, (struct proc
* caller
, message
*m_ptr
) );
149 #define do_endksig NULL
152 _PROTOTYPE( int do_sigsend
, (struct proc
* caller
, message
*m_ptr
) );
154 #define do_sigsend NULL
157 _PROTOTYPE( int do_sigreturn
, (struct proc
* caller
, message
*m_ptr
) );
159 #define do_sigreturn NULL
162 _PROTOTYPE( int do_times
, (struct proc
* caller
, message
*m_ptr
) );
164 #define do_times NULL
167 _PROTOTYPE( int do_setalarm
, (struct proc
* caller
, message
*m_ptr
) );
169 #define do_setalarm NULL
172 _PROTOTYPE( int do_stime
, (struct proc
* caller
, message
*m_ptr
) );
174 _PROTOTYPE( int do_vtimer
, (struct proc
* caller
, message
*m_ptr
) );
176 #define do_vtimer NULL
179 _PROTOTYPE( int do_safecopy_to
, (struct proc
* caller
, message
*m_ptr
) );
180 _PROTOTYPE( int do_safecopy_from
, (struct proc
* caller
, message
*m_ptr
) );
181 _PROTOTYPE( int do_vsafecopy
, (struct proc
* caller
, message
*m_ptr
) );
182 _PROTOTYPE( int do_iopenable
, (struct proc
* caller
, message
*m_ptr
) );
183 _PROTOTYPE( int do_vmctl
, (struct proc
* caller
, message
*m_ptr
) );
184 _PROTOTYPE( int do_setgrant
, (struct proc
* caller
, message
*m_ptr
) );
185 _PROTOTYPE( int do_readbios
, (struct proc
* caller
, message
*m_ptr
) );
187 _PROTOTYPE( int do_safemap
, (struct proc
* caller
, message
*m_ptr
) );
188 _PROTOTYPE( int do_saferevmap
, (struct proc
* caller
, message
*m_ptr
) );
189 _PROTOTYPE( int do_safeunmap
, (struct proc
* caller
, message
*m_ptr
) );
191 _PROTOTYPE( int do_sprofile
, (struct proc
* caller
, message
*m_ptr
) );
193 #define do_sprofile NULL
196 _PROTOTYPE( int do_cprofile
, (struct proc
* caller
, message
*m_ptr
) );
197 _PROTOTYPE( int do_profbuf
, (struct proc
* caller
, message
*m_ptr
) );
199 _PROTOTYPE( int do_getmcontext
, (struct proc
* caller
, message
*m_ptr
) );
200 _PROTOTYPE( int do_setmcontext
, (struct proc
* caller
, message
*m_ptr
) );
202 #define do_getmcontext NULL
203 #define do_setmcontext NULL
206 _PROTOTYPE( int do_schedule
, (struct proc
* caller
, message
*m_ptr
) );
207 _PROTOTYPE( int do_schedctl
, (struct proc
* caller
, message
*m_ptr
) );
209 _PROTOTYPE( int do_statectl
, (struct proc
* caller
, message
*m_ptr
) );
211 #define do_statectl NULL
214 #endif /* SYSTEM_H */