updated to minix 1.5

This commit is contained in:
ceriel
1991-09-03 11:47:14 +00:00
parent bae41e2d34
commit 096b4683d4
11 changed files with 493 additions and 352 deletions

View File

@@ -1,39 +1,31 @@
/* Copyright (C) 1987 by Prentice-Hall, Inc. Permission is hereby granted to
* private individuals and educational institutions to modify and
* redistribute the binary and source programs of this system to other
* private individuals and educational institutions for educational and
* research purposes. For corporate or commercial use, permission from
* Prentice-Hall is required. In general, such permission will be granted,
* subject to a few conditions.
/* Copyright (C) 1990 by Prentice-Hall, Inc. Permission is hereby granted
* to redistribute the binary and source programs of this system for
* educational or research purposes. For other use, written permission from
* Prentice-Hall is required.
*/
#ifndef i8088
#ifndef ATARI_ST
#error Either i8088 or ATARI ST must be defined
#endif
#endif
#define EXTERN extern /* used in *.h files */
#define PRIVATE static /* PRIVATE x limits the scope of x */
#define PUBLIC /* PUBLIC is the opposite of PRIVATE */
#define FORWARD /* some compilers require this to be 'static' */
#define FORWARD static /* some compilers require this to be 'static'*/
#define TRUE 1 /* used for turning integers into Booleans */
#define FALSE 0 /* used for turning integers into Booleans */
#define HZ 60 /* clock freq (software settable on IBM-PC) */
#define BLOCK_SIZE 1024 /* # bytes in a disk block */
#define SUPER_USER (uid) 0 /* uid of superuser */
#define SUPER_USER (uid_t) 0 /* uid_t of superuser */
#define MAJOR 8 /* major device = (dev>>MAJOR) & 0377 */
#define MINOR 0 /* minor device = (dev>>MINOR) & 0377 */
#ifdef AM_KERNEL
#define NR_TASKS 13 /* must be 5 more than without amoeba */
#define NR_TASKS 14 /* must be 5 more than without amoeba */
#else
#define NR_TASKS 8 /* number of tasks in the transfer vector */
#define NR_TASKS 9 /* number of tasks in the transfer vector */
#endif
#define NR_PROCS 16 /* number of slots in proc table */
#define NR_PROCS 32 /* number of slots in proc table */
#define NR_SEGS 3 /* # segments per process */
#define T 0 /* proc[i].mem_map[T] is for text */
#define D 1 /* proc[i].mem_map[D] is for data */
@@ -42,15 +34,19 @@
#define MAX_P_LONG 2147483647 /* maximum positive long, i.e. 2**31 - 1 */
/* Memory is allocated in clicks. */
#ifdef i8088
#define CLICK_SIZE 0020 /* unit in which memory is allocated */
#define CLICK_SHIFT 4 /* log2 of CLICK_SIZE */
#endif
#ifdef ATARI_ST
#if (CHIP == INTEL) || (CHIP == M68000)
#define CLICK_SIZE 256 /* unit in which memory is allocated */
#define CLICK_SHIFT 8 /* log2 of CLICK_SIZE */
#endif
#define click_to_round_k(n) \
((unsigned) ((((unsigned long) (n) << CLICK_SHIFT) + 512) / 1024))
#if CLICK_SIZE < 1024
#define k_to_click(n) ((n) * (1024 / CLICK_SIZE))
#else
#define k_to_click(n) ((n) / (CLICK_SIZE / 1024))
#endif
/* Process numbers of some important processes */
#define MM_PROC_NR 0 /* process number of memory manager */
#define FS_PROC_NR 1 /* process number of file system */
@@ -63,7 +59,8 @@
#define FROM_USER 1 /* flag telling to copy from user to fs */
#define READING 0 /* copy data to user */
#define WRITING 1 /* copy data from user */
#ifndef ATARI_ST
#if (MACHINE != ATARI)
#define ABS -999 /* this process means absolute memory */
#endif
@@ -71,14 +68,8 @@
#define NIL_PTR (char *) 0 /* generally useful expression */
#define NO_NUM 0x8000 /* used as numerical argument to panic() */
#define MAX_PATH 128 /* max length of path names */
#define SIG_PUSH_BYTES 8 /* how many bytes pushed by signal */
#define MAX_ISTACK_BYTES 2048 /* maximum initial stack size for EXEC */
/* Device numbers of root (RAM) and boot (fd0) devices. */
#define ROOT_DEV (dev_nr) 256 /* major-minor device number of root dev */
#define BOOT_DEV (dev_nr) 512 /* major-minor device number of boot diskette */
#define NO_NUM 0x8000 /* used as numerical argument to panic() */
#define SIG_PUSH_BYTES (4*sizeof(int)) /* how many bytes pushed by signal */
/* Flag bits for i_mode in the inode. */
#define I_TYPE 0170000 /* this field gives inode type */
@@ -86,8 +77,9 @@
#define I_BLOCK_SPECIAL 0060000 /* block special file */
#define I_DIRECTORY 0040000 /* file is a directory */
#define I_CHAR_SPECIAL 0020000 /* character special file */
#define I_SET_UID_BIT 0004000 /* set effective uid on exec */
#define I_SET_GID_BIT 0002000 /* set effective gid on exec */
#define I_NAMED_PIPE 0010000 /* named pipe (FIFO) */
#define I_SET_UID_BIT 0004000 /* set effective uid_t on exec */
#define I_SET_GID_BIT 0002000 /* set effective gid_t on exec */
#define ALL_MODES 0006777 /* all bits for user, group and others */
#define RWX_MODES 0000777 /* mode bits for RWX only */
#define R_BIT 0000004 /* Rwx protection bit */