source: trunk/minix/kernel/system.h@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 4.9 KB
Line 
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/.
4 *
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().
9 *
10 * Changes:
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)
28 */
29
30#ifndef SYSTEM_H
31#define SYSTEM_H
32
33/* Common includes for the system library. */
34#include "debug.h"
35#include "kernel.h"
36#include "proto.h"
37#include "proc.h"
38
39/* Default handler for unused kernel calls. */
40_PROTOTYPE( int do_unused, (message *m_ptr) );
41
42_PROTOTYPE( int do_exec, (message *m_ptr) );
43#if ! USE_EXEC
44#define do_exec do_unused
45#endif
46
47_PROTOTYPE( int do_fork, (message *m_ptr) );
48#if ! USE_FORK
49#define do_fork do_unused
50#endif
51
52_PROTOTYPE( int do_newmap, (message *m_ptr) );
53#if ! USE_NEWMAP
54#define do_newmap do_unused
55#endif
56
57_PROTOTYPE( int do_exit, (message *m_ptr) );
58#if ! USE_EXIT
59#define do_exit do_unused
60#endif
61
62_PROTOTYPE( int do_trace, (message *m_ptr) );
63#if ! USE_TRACE
64#define do_trace do_unused
65#endif
66
67_PROTOTYPE( int do_nice, (message *m_ptr) );
68#if ! USE_NICE
69#define do_nice do_unused
70#endif
71
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
77#endif
78
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
84#endif
85
86_PROTOTYPE( int do_umap, (message *m_ptr) );
87#if ! USE_UMAP
88#define do_umap do_unused
89#endif
90
91_PROTOTYPE( int do_memset, (message *m_ptr) );
92#if ! USE_MEMSET
93#define do_memset do_unused
94#endif
95
96_PROTOTYPE( int do_vm_setbuf, (message *m_ptr) );
97_PROTOTYPE( int do_vm_map, (message *m_ptr) );
98
99_PROTOTYPE( int do_abort, (message *m_ptr) );
100#if ! USE_ABORT
101#define do_abort do_unused
102#endif
103
104_PROTOTYPE( int do_getinfo, (message *m_ptr) );
105#if ! USE_GETINFO
106#define do_getinfo do_unused
107#endif
108
109_PROTOTYPE( int do_privctl, (message *m_ptr) );
110#if ! USE_PRIVCTL
111#define do_privctl do_unused
112#endif
113
114_PROTOTYPE( int do_segctl, (message *m_ptr) );
115#if ! USE_SEGCTL
116#define do_segctl do_unused
117#endif
118
119_PROTOTYPE( int do_irqctl, (message *m_ptr) );
120#if ! USE_IRQCTL
121#define do_irqctl do_unused
122#endif
123
124_PROTOTYPE( int do_devio, (message *m_ptr) );
125#if ! USE_DEVIO
126#define do_devio do_unused
127#endif
128
129_PROTOTYPE( int do_vdevio, (message *m_ptr) );
130#if ! USE_VDEVIO
131#define do_vdevio do_unused
132#endif
133
134_PROTOTYPE( int do_int86, (message *m_ptr) );
135
136_PROTOTYPE( int do_sdevio, (message *m_ptr) );
137#if ! USE_SDEVIO
138#define do_sdevio do_unused
139#endif
140
141_PROTOTYPE( int do_kill, (message *m_ptr) );
142#if ! USE_KILL
143#define do_kill do_unused
144#endif
145
146_PROTOTYPE( int do_getksig, (message *m_ptr) );
147#if ! USE_GETKSIG
148#define do_getksig do_unused
149#endif
150
151_PROTOTYPE( int do_endksig, (message *m_ptr) );
152#if ! USE_ENDKSIG
153#define do_endksig do_unused
154#endif
155
156_PROTOTYPE( int do_sigsend, (message *m_ptr) );
157#if ! USE_SIGSEND
158#define do_sigsend do_unused
159#endif
160
161_PROTOTYPE( int do_sigreturn, (message *m_ptr) );
162#if ! USE_SIGRETURN
163#define do_sigreturn do_unused
164#endif
165
166_PROTOTYPE( int do_times, (message *m_ptr) );
167#if ! USE_TIMES
168#define do_times do_unused
169#endif
170
171_PROTOTYPE( int do_setalarm, (message *m_ptr) );
172#if ! USE_SETALARM
173#define do_setalarm do_unused
174#endif
175
176_PROTOTYPE( int do_iopenable, (message *m_ptr) );
177
178#endif /* SYSTEM_H */
179
Note: See TracBrowser for help on using the repository browser.