1 /* Function prototypes. */
6 /* Structs used in prototypes must be declared as such first. */
13 _PROTOTYPE( int dev_open
, (Dev_t dev
, int proc
, int flags
) );
14 _PROTOTYPE( void dev_close
, (Dev_t dev
) );
15 _PROTOTYPE( int dev_bio
, (int op
, Dev_t dev
, int proc
, void *buf
,
16 off_t pos
, int bytes
) );
17 _PROTOTYPE( int dev_io
, (int op
, Dev_t dev
, int proc
, void *buf
,
18 off_t pos
, int bytes
, int flags
) );
19 _PROTOTYPE( int gen_opcl
, (int op
, Dev_t dev
, int proc
, int flags
) );
20 _PROTOTYPE( int gen_io
, (int task_nr
, message
*mess_ptr
) );
21 _PROTOTYPE( int no_dev
, (int op
, Dev_t dev
, int proc
, int flags
) );
22 _PROTOTYPE( int no_dev_io
, (int, message
*) );
23 _PROTOTYPE( int tty_opcl
, (int op
, Dev_t dev
, int proc
, int flags
) );
24 _PROTOTYPE( int ctty_opcl
, (int op
, Dev_t dev
, int proc
, int flags
) );
25 _PROTOTYPE( int clone_opcl
, (int op
, Dev_t dev
, int proc
, int flags
) );
26 _PROTOTYPE( int ctty_io
, (int task_nr
, message
*mess_ptr
) );
27 _PROTOTYPE( int do_ioctl
, (void) );
28 _PROTOTYPE( void pm_setsid
, (int proc_e
) );
29 _PROTOTYPE( void dev_status
, (message
*) );
30 _PROTOTYPE( void dev_up
, (int major
) );
33 _PROTOTYPE( int do_devctl
, (void) );
34 _PROTOTYPE( int fs_devctl
, (int req
, int dev
, int proc_nr_e
, int style
,
36 _PROTOTYPE( void build_dmap
, (void) );
37 _PROTOTYPE( int map_driver
, (int major
, int proc_nr
, int dev_style
,
39 _PROTOTYPE( int dmap_driver_match
, (int proc
, int major
) );
40 _PROTOTYPE( void dmap_unmap_by_endpt
, (int proc_nr
) );
41 _PROTOTYPE( void dmap_endpt_up
, (int proc_nr
) );
44 _PROTOTYPE( int pm_exec
, (int proc_e
, char *path
, vir_bytes path_len
,
45 char *frame
, vir_bytes frame_len
) );
48 _PROTOTYPE( struct filp
*find_filp
, (struct vnode
*vp
, mode_t bits
) );
49 _PROTOTYPE( int get_fd
, (int start
, mode_t bits
, int *k
,
51 _PROTOTYPE( struct filp
*get_filp
, (int fild
) );
52 _PROTOTYPE( struct filp
*get_filp2
, (struct fproc
*rfp
, int fild
) );
53 _PROTOTYPE( int inval_filp
, (struct filp
*) );
56 _PROTOTYPE( int do_link
, (void) );
57 _PROTOTYPE( int do_unlink
, (void) );
58 _PROTOTYPE( int do_rename
, (void) );
59 _PROTOTYPE( int do_truncate
, (void) );
60 _PROTOTYPE( int do_ftruncate
, (void) );
63 _PROTOTYPE( int lock_op
, (struct filp
*f
, int req
) );
64 _PROTOTYPE( void lock_revive
, (void) );
67 _PROTOTYPE( int main
, (void) );
68 _PROTOTYPE( void reply
, (int whom
, int result
) );
71 _PROTOTYPE( int do_dup
, (void) );
72 _PROTOTYPE( void pm_exit
, (int proc
) );
73 _PROTOTYPE( int do_fcntl
, (void) );
74 _PROTOTYPE( void pm_fork
, (int pproc
, int cproc
, int cpid
) );
75 _PROTOTYPE( void pm_setgid
, (int proc_e
, int egid
, int rgid
) );
76 _PROTOTYPE( void pm_setuid
, (int proc_e
, int euid
, int ruid
) );
77 _PROTOTYPE( int do_sync
, (void) );
78 _PROTOTYPE( int do_fsync
, (void) );
79 _PROTOTYPE( void pm_reboot
, (void) );
80 _PROTOTYPE( int do_svrctl
, (void) );
81 _PROTOTYPE( int do_getsysinfo
, (void) );
82 _PROTOTYPE( int pm_dumpcore
, (int proc_e
, struct mem_map
*seg_ptr
) );
85 _PROTOTYPE( int do_fslogin
, (void) );
86 _PROTOTYPE( int do_mount
, (void) );
87 _PROTOTYPE( int do_umount
, (void) );
88 _PROTOTYPE( int unmount
, (Dev_t dev
) );
91 _PROTOTYPE( int do_close
, (void) );
92 _PROTOTYPE( int close_fd
, (struct fproc
*rfp
, int fd_nr
) );
93 _PROTOTYPE( int do_creat
, (void) );
94 _PROTOTYPE( int do_lseek
, (void) );
95 _PROTOTYPE( int do_mknod
, (void) );
96 _PROTOTYPE( int do_mkdir
, (void) );
97 _PROTOTYPE( int do_open
, (void) );
98 _PROTOTYPE( int do_slink
, (void) );
101 _PROTOTYPE( int lookup
, (lookup_req_t
*request
, node_details_t
*node
) );
104 _PROTOTYPE( int do_pipe
, (void) );
105 _PROTOTYPE( int do_unpause
, (void) );
106 _PROTOTYPE( int unpause
, (int proc_nr_e
) );
107 _PROTOTYPE( int pipe_check
, (struct vnode
*vp
, int rw_flag
,
108 int oflags
, int bytes
, off_t position
, int *canwrite
, int notouch
));
109 _PROTOTYPE( void release
, (struct vnode
*vp
, int call_nr
, int count
) );
110 _PROTOTYPE( void revive
, (int proc_nr
, int bytes
) );
111 _PROTOTYPE( void suspend
, (int task
) );
112 _PROTOTYPE( int select_request_pipe
, (struct filp
*f
, int *ops
, int bl
) );
113 _PROTOTYPE( int select_cancel_pipe
, (struct filp
*f
) );
114 _PROTOTYPE( int select_match_pipe
, (struct filp
*f
) );
115 _PROTOTYPE( void unsuspend_by_endpt
, (int) );
118 _PROTOTYPE( int do_access
, (void) );
119 _PROTOTYPE( int do_chmod
, (void) );
120 _PROTOTYPE( int do_chown
, (void) );
121 _PROTOTYPE( int do_umask
, (void) );
124 _PROTOTYPE( int do_read
, (void) );
125 _PROTOTYPE( int read_write
, (int rw_flag
) );
128 _PROTOTYPE( int fs_sendrec
, (endpoint_t fs_e
, message
*reqm
) );
129 _PROTOTYPE( int req_getnode
, (node_req_t
*req
, node_details_t
*res
) );
130 _PROTOTYPE( int req_putnode
, (node_req_t
*req
) );
131 _PROTOTYPE( int req_open
, (open_req_t
*req
, node_details_t
*res
) );
132 _PROTOTYPE( int req_readwrite
, (readwrite_req_t
*req
,
133 readwrite_res_t
*res
) );
134 _PROTOTYPE( int req_pipe
, (pipe_req_t
*req
, node_details_t
*res
) );
135 _PROTOTYPE( int req_clone_opcl
, (clone_opcl_req_t
*req
,
136 node_details_t
*res
) );
137 _PROTOTYPE( int req_ftrunc
, (ftrunc_req_t
*req
) );
138 _PROTOTYPE( int req_chown
, (chown_req_t
*req
) );
139 _PROTOTYPE( int req_chmod
, (chmod_req_t
*req
) );
140 _PROTOTYPE( int req_access
, (access_req_t
*req
) );
141 _PROTOTYPE( int req_mknod
, (mknod_req_t
*req
) );
142 _PROTOTYPE( int req_mkdir
, (mkdir_req_t
*req
) );
143 _PROTOTYPE( int req_inhibread
, (node_req_t
*req
) );
144 _PROTOTYPE( int req_stat
, (stat_req_t
*req
) );
145 _PROTOTYPE( int req_fstat
, (stat_req_t
*req
) );
146 _PROTOTYPE( int req_fstatfs
, (stat_req_t
*req
) );
147 _PROTOTYPE( int req_unlink
, (unlink_req_t
*req
) );
148 _PROTOTYPE( int req_rmdir
, (unlink_req_t
*req
) );
149 _PROTOTYPE( int req_utime
, (utime_req_t
*req
) );
150 _PROTOTYPE( int req_stime
, (endpoint_t fs_e
, time_t boottime
) );
151 _PROTOTYPE( int req_sync
, (endpoint_t fs_e
) );
152 _PROTOTYPE( int req_getdir
, (getdir_req_t
*req
, node_details_t
*res
) );
153 _PROTOTYPE( int req_link
, (link_req_t
*req
) );
154 _PROTOTYPE( int req_slink
, (slink_req_t
*req
) );
155 _PROTOTYPE( int req_rdlink
, (rdlink_req_t
*req
) );
156 _PROTOTYPE( int req_rename
, (rename_req_t
*req
) );
157 _PROTOTYPE( int req_mountpoint
, (mountpoint_req_t
*req
,
158 node_details_t
*res
) );
159 _PROTOTYPE( int req_readsuper
, (readsuper_req_t
*req
,
160 readsuper_res_t
*res
) );
161 _PROTOTYPE( int req_unmount
, (endpoint_t fs_e
) );
162 _PROTOTYPE( int req_trunc
, (trunc_req_t
*req
) );
163 _PROTOTYPE( int req_lookup
, (lookup_req_t
*req
, lookup_res_t
*res
) );
164 _PROTOTYPE( int req_newdriver
, (endpoint_t fs_e
, Dev_t dev
,
165 endpoint_t driver_e
) );
166 _PROTOTYPE( int req_breadwrite
, (breadwrite_req_t
*req
,
167 readwrite_res_t
*res
) );
170 _PROTOTYPE( int do_chdir
, (void) );
171 _PROTOTYPE( int do_fchdir
, (void) );
172 _PROTOTYPE( int do_chroot
, (void) );
173 _PROTOTYPE( int do_fstat
, (void) );
174 _PROTOTYPE( int do_stat
, (void) );
175 _PROTOTYPE( int do_fstatfs
, (void) );
176 _PROTOTYPE( int do_rdlink
, (void) );
177 _PROTOTYPE( int do_lstat
, (void) );
180 _PROTOTYPE( int do_stime
, (void) );
181 _PROTOTYPE( int do_utime
, (void) );
184 _PROTOTYPE( time_t clock_time
, (void) );
185 _PROTOTYPE( unsigned conv2
, (int norm
, int w
) );
186 _PROTOTYPE( long conv4
, (int norm
, long x
) );
187 _PROTOTYPE( int fetch_name
, (char *path
, int len
, int flag
) );
188 _PROTOTYPE( int no_sys
, (void) );
189 _PROTOTYPE( int isokendpt_f
, (char *f
, int l
, int e
, int *p
, int ft
));
190 _PROTOTYPE( void panic
, (char *who
, char *mess
, int num
) );
192 #define okendpt(e, p) isokendpt_f(__FILE__, __LINE__, (e), (p), 1)
193 #define isokendpt(e, p) isokendpt_f(__FILE__, __LINE__, (e), (p), 0)
196 _PROTOTYPE( struct vmnt
*get_free_vmnt
, (short *index
) );
197 _PROTOTYPE( struct vmnt
*find_vmnt
, (int fs_e
) );
200 _PROTOTYPE( struct vnode
*get_free_vnode
, (void) );
201 _PROTOTYPE( struct vnode
*find_vnode
, (int fs_e
, int numb
) );
202 _PROTOTYPE( void dup_vnode
, (struct vnode
*vp
) );
203 _PROTOTYPE( void put_vnode
, (struct vnode
*vp
) );
204 _PROTOTYPE( struct vnode
*get_vnode
, (int fs_e
, int inode_nr
) );
207 _PROTOTYPE( int do_write
, (void) );
210 _PROTOTYPE( int do_select
, (void) );
211 _PROTOTYPE( int select_callback
, (struct filp
*, int ops
) );
212 _PROTOTYPE( void select_forget
, (int fproc
) );
213 _PROTOTYPE( void select_timeout_check
, (timer_t
*) );
214 _PROTOTYPE( void init_select
, (void) );
215 _PROTOTYPE( void select_unsuspend_by_endpt
, (int proc
) );
216 _PROTOTYPE( int select_notified
, (int major
, int minor
, int ops
) );
219 _PROTOTYPE( void fs_set_timer
, (timer_t
*tp
, int delta
,
220 tmr_func_t watchdog
, int arg
) );
221 _PROTOTYPE( void fs_expire_timers
, (clock_t now
) );
222 _PROTOTYPE( void fs_cancel_timer
, (timer_t
*tp
) );
223 _PROTOTYPE( void fs_init_timer
, (timer_t
*tp
) );