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_copy
, (message
*m_ptr
) );
73 #define do_vircopy do_copy
74 #define do_physcopy do_copy
75 #if ! (USE_VIRCOPY || USE_PHYSCOPY)
76 #define do_copy do_unused
79 _PROTOTYPE( int do_vcopy
, (message
*m_ptr
) );
80 #define do_virvcopy do_vcopy
81 #define do_physvcopy do_vcopy
82 #if ! (USE_VIRVCOPY || USE_PHYSVCOPY)
83 #define do_vcopy do_unused
86 _PROTOTYPE( int do_umap
, (message
*m_ptr
) );
88 #define do_umap do_unused
91 _PROTOTYPE( int do_memset
, (message
*m_ptr
) );
93 #define do_memset do_unused
96 _PROTOTYPE( int do_vm_setbuf
, (message
*m_ptr
) );
97 _PROTOTYPE( int do_vm_map
, (message
*m_ptr
) );
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_safecopy
, (message
*m_ptr
) );
177 _PROTOTYPE( int do_vsafecopy
, (message
*m_ptr
) );
178 _PROTOTYPE( int do_iopenable
, (message
*m_ptr
) );
179 _PROTOTYPE( int do_setgrant
, (message
*m_ptr
) );
180 _PROTOTYPE( int do_readbios
, (message
*m_ptr
) );
182 _PROTOTYPE( int do_sprofile
, (message
*m_ptr
) );
184 #define do_sprofile do_unused
187 _PROTOTYPE( int do_cprofile
, (message
*m_ptr
) );
189 #define do_cprofile do_unused
192 _PROTOTYPE( int do_profbuf
, (message
*m_ptr
) );
194 #define do_profbuf do_unused
197 #endif /* SYSTEM_H */