From: Jorrit Herder Date: Thu, 19 May 2005 09:38:29 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: v3.1.0~832 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/soc.html?a=commitdiff_plain;h=2ebe53503059f6d724d87e07e4d8e156eff319d0;p=minix.git *** empty log message *** --- diff --git a/include/minix/callnr.h b/include/minix/callnr.h index 2f005e3a1..c1b9bf5d9 100755 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -64,9 +64,10 @@ #define REBOOT 76 -/* MINIX specific calls to support system services. */ +/* MINIX specific calls, e.g., to support system services. */ #define SVRCTL 77 #define CMOSTIME 78 #define GETSYSINFO 79 /* to MM or FS */ +#define GETPROCNR 80 /* to MM */ #define FSTATFS 82 diff --git a/include/minix/com.h b/include/minix/com.h index 18716d637..ca7ef32ce 100755 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -11,6 +11,7 @@ #define SEND 1 /* function code for sending messages */ #define RECEIVE 2 /* function code for receiving messages */ #define BOTH 3 /* function code for SEND + RECEIVE */ +#define NOTIFY 4 /* function code for notifications */ #define NB_SEND (SEND | NON_BLOCKING) /* non-blocking SEND */ #define NB_RECEIVE (RECEIVE | NON_BLOCKING) /* non-blocking RECEIVE */ @@ -71,13 +72,16 @@ * blocking notifications are delivered. The lowest numbers go first. The * offset are used for the per-process notification bit maps. */ -#define NR_NOTIFICATIONS 5 /* number of bits in notify_mask_t */ -# define NOTIFICATION 333 /* offset for notification types */ -# define HARD_INT NOTIFICATION + 0 /* hardware interrupt */ -# define SYN_ALARM NOTIFICATION + 1 /* synchronous alarm */ -# define KSIG_PENDING NOTIFICATION + 2 /* signal(s) pending */ -# define NEW_KMESS NOTIFICATION + 3 /* new kernel message */ -# define HARD_STOP NOTIFICATION + 4 /* system shutdown */ +#define NOTIFICATION 0x0800 /* flag for notifications */ +# define HARD_INT (NOTIFICATION | 0) /* hardware interrupt */ +# define SYN_ALARM (NOTIFICATION | 1) /* synchronous alarm */ +# define KSIG_PENDING (NOTIFICATION | 2) /* signal(s) pending */ +# define NEW_KMESS (NOTIFICATION | 3) /* new kernel message */ +# define HARD_STOP (NOTIFICATION | 4) /* system shutdown */ +#define NR_NOTIFY_TYPES 5 /* nr of bits in mask */ + +/* Shorthands for message parameters passed with notifications. */ +#define NOTIFY_ARG m2_l1 /* passed for some types */ /*===========================================================================* diff --git a/include/minix/ipc.h b/include/minix/ipc.h index d1646b90a..02349fce1 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -94,12 +94,14 @@ typedef struct { #define sendrec _sendrec #define receive _receive #define send _send +#define notify _notify #define nb_receive _nb_receive #define nb_send _nb_send _PROTOTYPE( int sendrec, (int src_dest, message *m_ptr) ); _PROTOTYPE( int receive, (int src, message *m_ptr) ); _PROTOTYPE( int send, (int dest, message *m_ptr) ); +_PROTOTYPE( int notify, (int dest, message *m_ptr) ); _PROTOTYPE( int nb_receive, (int src, message *m_ptr) ); _PROTOTYPE( int nb_send, (int dest, message *m_ptr) ); diff --git a/include/minix/type.h b/include/minix/type.h index 10fe1d064..6b53612af 100755 --- a/include/minix/type.h +++ b/include/minix/type.h @@ -102,6 +102,19 @@ struct kinfo { phys_bytes bootdev_size; phys_bytes params_base; /* parameters passed by boot monitor */ phys_bytes params_size; + long notify_held; + long notify_blocked; + long notify_switching; + long notify_reenter; + long notify_ok; + long notify_unhold; + long notify_int; + long notify_alarm; + long notify_sig; + long notify_kmess; + long notify_stop; + int nr_procs; /* number of user processes */ + int nr_tasks; /* number of kernel tasks */ char version[8]; /* kernel version number */ }; diff --git a/servers/pm/misc.c b/servers/pm/misc.c index fe3428d60..983435e38 100644 --- a/servers/pm/misc.c +++ b/servers/pm/misc.c @@ -4,6 +4,7 @@ * do_reboot: kill all processes, then reboot system * do_svrctl: process manager control * do_getsysinfo: request copy of PM data structure + * do_getprocnr: get process slot number (like getpid) */ #include "pm.h" @@ -30,6 +31,15 @@ PUBLIC int do_getsysinfo() } +/*=====================================================================* + * do_getprocnr * + *=====================================================================*/ +PUBLIC int do_getprocnr() +{ + return(OK); +} + + /*=====================================================================* * do_reboot * *=====================================================================*/