#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
#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 */
* 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 */
/*===========================================================================*
#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) );
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 */
};
* 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"
}
+/*=====================================================================*
+ * do_getprocnr *
+ *=====================================================================*/
+PUBLIC int do_getprocnr()
+{
+ return(OK);
+}
+
+
/*=====================================================================*
* do_reboot *
*=====================================================================*/