Skip to content

Instantly share code, notes, and snippets.

@mhansen
Created October 22, 2009 22:50
Show Gist options
  • Save mhansen/216419 to your computer and use it in GitHub Desktop.
Save mhansen/216419 to your computer and use it in GitHub Desktop.
--- oldsrc/include/minix/com.h 2009-10-22 18:24:30.366723300 +1300
+++ src/include/minix/com.h 2009-10-22 18:09:03.442706300 +1300
@@ -17,61 +17,62 @@
*===========================================================================*/
/* The values of several task numbers depend on whether they or other tasks
* are enabled. They are defined as (PREVIOUS_TASK - ENABLE_TASK) in general.
* ENABLE_TASK is either 0 or 1, so a task either gets a new number, or gets
* the same number as the previous task and is further unused. Note that the
* order should correspond to the order in the task table defined in table.c.
*/
/* Kernel tasks. These all run in the same address space. */
#define IDLE -4 /* runs when no one else can run */
#define CLOCK -3 /* alarms and other clock functions */
#define SYSTEM -2 /* request system functionality */
#define KERNEL -1 /* pseudo-process for IPC and scheduling */
#define HARDWARE KERNEL /* for hardware interrupt handlers */
/* Number of tasks. Note that NR_PROCS is defined in <minix/config.h>. */
#define NR_TASKS 4
/* User-space processes, that is, device drivers, servers, and INIT. */
#define PM_PROC_NR 0 /* process manager */
#define FS_PROC_NR 1 /* file system */
#define VFS_PROC_NR FS_PROC_NR /* FS has been renamed to VFS. */
#define RS_PROC_NR 2 /* memory driver (RAM disk, null, etc.) */
#define MEM_PROC_NR 3 /* memory driver (RAM disk, null, etc.) */
#define LOG_PROC_NR 4 /* log device driver */
#define TTY_PROC_NR 5 /* terminal (TTY) driver */
#define DS_PROC_NR 6 /* data store server */
#define MFS_PROC_NR 7 /* minix root filesystem */
#define VM_PROC_NR 8 /* memory server */
-#define INIT_PROC_NR 9 /* init -- goes multiuser */
+#define PROC_PROC_NR 9 /* MARKH */
+#define INIT_PROC_NR 10 /* init -- goes multiuser */ /* MARKH */
/* Number of processes contained in the system image. */
#define NR_BOOT_PROCS (NR_TASKS + INIT_PROC_NR + 1)
/*===========================================================================*
* Kernel notification types *
*===========================================================================*/
/* Kernel notification types. In principle, these can be sent to any process,
* so make sure that these types do not interfere with other message types.
* Notifications are prioritized because of the way they are unhold() and
* blocking notifications are delivered. The lowest numbers go first. The
* offset are used for the per-process notification bit maps.
*/
#define NOTIFY_MESSAGE 0x1000
#define NOTIFY_FROM(p_nr) (NOTIFY_MESSAGE | ((p_nr) + NR_TASKS))
# define PROC_EVENT NOTIFY_FROM(PM_PROC_NR) /* process status change */
# define SYN_ALARM NOTIFY_FROM(CLOCK) /* synchronous alarm */
# define SYS_SIG NOTIFY_FROM(SYSTEM) /* system signal */
# define HARD_INT NOTIFY_FROM(HARDWARE) /* hardware interrupt */
# define NEW_KSIG NOTIFY_FROM(HARDWARE) /* new kernel signal */
# define FKEY_PRESSED NOTIFY_FROM(TTY_PROC_NR)/* function key press */
# define DEV_PING NOTIFY_FROM(RS_PROC_NR) /* driver liveness ping */
# define DS_UPDATE NOTIFY_FROM(DS_PROC_NR) /* subscription update */
/* Shorthands for message parameters passed with notifications. */
#define NOTIFY_SOURCE m_source
#define NOTIFY_TYPE m_type
#define NOTIFY_ARG m2_l1
#define NOTIFY_TIMESTAMP m2_l2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment