minix/servers/pm/proto.h

118 lines
3.6 KiB
C
Raw Normal View History

/* Function prototypes. */
struct mproc;
struct stat;
struct mem_map;
struct memory;
#include <timers.h>
2009-08-15 18:09:32 +02:00
/* alarm.c */
_PROTOTYPE( int do_alarm, (void) );
_PROTOTYPE( int do_itimer, (void) );
_PROTOTYPE( void set_alarm, (struct mproc *rmp, clock_t ticks) );
_PROTOTYPE( void check_vtimer, (int proc_nr, int sig) );
2009-08-15 18:09:32 +02:00
/* break.c */
_PROTOTYPE( int do_brk, (void) );
/* devio.c */
_PROTOTYPE( int do_dev_io, (void) );
_PROTOTYPE( int do_dev_io, (void) );
/* dma.c */
_PROTOTYPE( int do_adddma, (void) );
_PROTOTYPE( int do_deldma, (void) );
_PROTOTYPE( int do_getdma, (void) );
_PROTOTYPE( void release_dma, (endpoint_t proc_e, phys_clicks base,
phys_clicks size) );
/* dmp.c */
_PROTOTYPE( int do_fkey_pressed, (void) );
/* exec.c */
_PROTOTYPE( int do_exec, (void) );
2006-05-11 16:57:23 +02:00
_PROTOTYPE( int exec_newmem, (void) );
_PROTOTYPE( int do_execrestart, (void) );
_PROTOTYPE( void exec_restart, (struct mproc *rmp, int result) );
/* forkexit.c */
_PROTOTYPE( int do_fork, (void) );
2006-05-11 16:57:23 +02:00
_PROTOTYPE( int do_fork_nb, (void) );
_PROTOTYPE( int do_exit, (void) );
_PROTOTYPE( int do_waitpid, (void) );
_PROTOTYPE( void exit_proc, (struct mproc *rmp, int exit_status,
int dump_core) );
_PROTOTYPE( void exit_restart, (struct mproc *rmp, int dump_core) );
/* getset.c */
_PROTOTYPE( int do_getset, (void) );
/* kputc.c */
_PROTOTYPE( void diag_repl, (void) );
/* main.c */
_PROTOTYPE( int main, (void) );
/* misc.c */
_PROTOTYPE( int do_reboot, (void) );
2006-03-10 17:10:05 +01:00
_PROTOTYPE( int do_procstat, (void) );
_PROTOTYPE( int do_sysuname, (void) );
_PROTOTYPE( int do_getsysinfo, (void) );
_PROTOTYPE( int do_getsysinfo_up, (void) );
_PROTOTYPE( int do_getprocnr, (void) );
_PROTOTYPE( int do_getpuid, (void) );
_PROTOTYPE( int do_svrctl, (void) );
_PROTOTYPE( int do_allocmem, (void) );
_PROTOTYPE( int do_freemem, (void) );
2006-05-11 16:57:23 +02:00
_PROTOTYPE( int do_getsetpriority, (void) );
endpoint-aware conversion of servers. 'who', indicating caller number in pm and fs and some other servers, has been removed in favour of 'who_e' (endpoint) and 'who_p' (proc nr.). In both PM and FS, isokendpt() convert endpoints to process slot numbers, returning OK if it was a valid and consistent endpoint number. okendpt() does the same but panic()s if it doesn't succeed. (In PM, this is pm_isok..) pm and fs keep their own records of process endpoints in their proc tables, which are needed to make kernel calls about those processes. message field names have changed. fs drivers are endpoints. fs now doesn't try to get out of driver deadlock, as the protocol isn't supposed to let that happen any more. (A warning is printed if ELOCKED is detected though.) fproc[].fp_task (indicating which driver the process is suspended on) became an int. PM and FS now get endpoint numbers of initial boot processes from the kernel. These happen to be the same as the old proc numbers, to let user processes reach them with the old numbers, but FS and PM don't know that. All new processes after INIT, even after the generation number wraps around, get endpoint numbers with generation 1 and higher, so the first instances of the boot processes are the only processes ever to have endpoint numbers in the old proc number range. More return code checks of sys_* functions have been added. IS has become endpoint-aware. Ditched the 'text' and 'data' fields in the kernel dump (which show locations, not sizes, so aren't terribly useful) in favour of the endpoint number. Proc number is still visible. Some other dumps (e.g. dmap, rs) show endpoint numbers now too which got the formatting changed. PM reading segments using rw_seg() has changed - it uses other fields in the message now instead of encoding the segment and process number and fd in the fd field. For that it uses _read_pm() and _write_pm() which to _taskcall()s directly in pm/misc.c. PM now sys_exit()s itself on panic(), instead of sys_abort(). RS also talks in endpoints instead of process numbers.
2006-03-03 11:20:58 +01:00
#if (MACHINE == MACINTOSH)
_PROTOTYPE( phys_clicks start_click, (void) );
#endif
_PROTOTYPE( void setreply, (int proc_nr, int result) );
/* profile.c */
_PROTOTYPE( int do_sprofile, (void) );
_PROTOTYPE( int do_cprofile, (void) );
/* signal.c */
_PROTOTYPE( int do_kill, (void) );
_PROTOTYPE( int ksig_pending, (void) );
_PROTOTYPE( int do_pause, (void) );
_PROTOTYPE( int check_sig, (pid_t proc_id, int signo) );
_PROTOTYPE( void sig_proc, (struct mproc *rmp, int sig_nr) );
_PROTOTYPE( int do_sigaction, (void) );
_PROTOTYPE( int do_sigpending, (void) );
_PROTOTYPE( int do_sigprocmask, (void) );
_PROTOTYPE( int do_sigreturn, (void) );
_PROTOTYPE( int do_sigsuspend, (void) );
_PROTOTYPE( void check_pending, (struct mproc *rmp) );
/* time.c */
_PROTOTYPE( int do_stime, (void) );
_PROTOTYPE( int do_time, (void) );
_PROTOTYPE( int do_times, (void) );
_PROTOTYPE( int do_gettimeofday, (void) );
/* timers.c */
_PROTOTYPE( void pm_set_timer, (timer_t *tp, int delta,
tmr_func_t watchdog, int arg));
_PROTOTYPE( void pm_expire_timers, (clock_t now));
_PROTOTYPE( void pm_cancel_timer, (timer_t *tp));
/* trace.c */
_PROTOTYPE( int do_trace, (void) );
_PROTOTYPE( void stop_proc, (struct mproc *rmp, int sig_nr) );
/* utility.c */
_PROTOTYPE( pid_t get_free_pid, (void) );
_PROTOTYPE( int no_sys, (void) );
_PROTOTYPE( void panic, (char *who, char *mess, int num) );
_PROTOTYPE( char *find_param, (const char *key));
_PROTOTYPE( int proc_from_pid, (pid_t p));
endpoint-aware conversion of servers. 'who', indicating caller number in pm and fs and some other servers, has been removed in favour of 'who_e' (endpoint) and 'who_p' (proc nr.). In both PM and FS, isokendpt() convert endpoints to process slot numbers, returning OK if it was a valid and consistent endpoint number. okendpt() does the same but panic()s if it doesn't succeed. (In PM, this is pm_isok..) pm and fs keep their own records of process endpoints in their proc tables, which are needed to make kernel calls about those processes. message field names have changed. fs drivers are endpoints. fs now doesn't try to get out of driver deadlock, as the protocol isn't supposed to let that happen any more. (A warning is printed if ELOCKED is detected though.) fproc[].fp_task (indicating which driver the process is suspended on) became an int. PM and FS now get endpoint numbers of initial boot processes from the kernel. These happen to be the same as the old proc numbers, to let user processes reach them with the old numbers, but FS and PM don't know that. All new processes after INIT, even after the generation number wraps around, get endpoint numbers with generation 1 and higher, so the first instances of the boot processes are the only processes ever to have endpoint numbers in the old proc number range. More return code checks of sys_* functions have been added. IS has become endpoint-aware. Ditched the 'text' and 'data' fields in the kernel dump (which show locations, not sizes, so aren't terribly useful) in favour of the endpoint number. Proc number is still visible. Some other dumps (e.g. dmap, rs) show endpoint numbers now too which got the formatting changed. PM reading segments using rw_seg() has changed - it uses other fields in the message now instead of encoding the segment and process number and fd in the fd field. For that it uses _read_pm() and _write_pm() which to _taskcall()s directly in pm/misc.c. PM now sys_exit()s itself on panic(), instead of sys_abort(). RS also talks in endpoints instead of process numbers.
2006-03-03 11:20:58 +01:00
_PROTOTYPE( int pm_isokendpt, (int ep, int *proc));