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,8 +1,5 @@
config.h
callnr.h
com.h
const.h
error.h
sgtty.h
signal.h
stat.h
type.h

View file

@ -1,53 +1,58 @@
#define NCALLS 70 /* number of system calls allowed */
#define NCALLS 70 /* number of system calls allowed */
#define EXIT 1
#define FORK 2
#define READ 3
#define WRITE 4
#define OPEN 5
#define CLOSE 6
#define WAIT 7
#define CREAT 8
#define LINK 9
#define UNLINK 10
#define CHDIR 12
#define TIME 13
#define MKNOD 14
#define CHMOD 15
#define CHOWN 16
#define BRK 17
#define STAT 18
#define LSEEK 19
#define GETPID 20
#define MOUNT 21
#define UMOUNT 22
#define SETUID 23
#define GETUID 24
#define STIME 25
#define ALARM 27
#define FSTAT 28
#define PAUSE 29
#define UTIME 30
#define ACCESS 33
#define SYNC 36
#define KILL 37
#define DUP 41
#define PIPE 42
#define TIMES 43
#define SETGID 46
#define GETGID 47
#define SIGNAL 48
#define IOCTL 54
#define EXEC 59
#define UMASK 60
#define CHROOT 61
#define EXIT 1
#define FORK 2
#define READ 3
#define WRITE 4
#define OPEN 5
#define CLOSE 6
#define WAIT 7
#define CREAT 8
#define LINK 9
#define UNLINK 10
#define CHDIR 12
#define TIME 13
#define MKNOD 14
#define CHMOD 15
#define CHOWN 16
#define BRK 17
#define STAT 18
#define LSEEK 19
#define GETPID 20
#define MOUNT 21
#define UMOUNT 22
#define SETUID 23
#define GETUID 24
#define STIME 25
#define PTRACE 26
#define ALARM 27
#define FSTAT 28
#define PAUSE 29
#define UTIME 30
#define ACCESS 33
#define SYNC 36
#define KILL 37
#define RENAME 38
#define MKDIR 39
#define RMDIR 40
#define DUP 41
#define PIPE 42
#define TIMES 43
#define SETGID 46
#define GETGID 47
#define SIGNAL 48
#define IOCTL 54
#define FCNTL 55
#define EXEC 59
#define UMASK 60
#define CHROOT 61
/* The following are not system calls, but are processed like them. */
#define KSIG 64 /* kernel detected a signal */
#define UNPAUSE 65 /* to MM or FS: check for EINTR */
#define BRK2 66 /* to MM: used to say how big FS & INIT are */
#define REVIVE 67 /* to FS: revive a sleeping process */
#define TASK_REPLY 68 /* to FS: reply code from tty task */
#define KSIG 64 /* kernel detected a signal */
#define UNPAUSE 65 /* to MM or FS: check for EINTR */
#define BRK2 66 /* to MM: used to say how big FS & INIT are */
#define REVIVE 67 /* to FS: revive a sleeping process */
#define TASK_REPLY 68 /* to FS: reply code from tty task */
/* The following IS a system call for amoeba transactions */
#define AM_SYSCALL 69

View file

@ -7,12 +7,12 @@
/* Task numbers, function codes and reply codes. */
#define TTY -NR_TASKS /* terminal I/O class */
# define TTY_CHAR_INT 1 /* fcn code for tty input interrupt */
# define TTY_O_DONE 2 /* fcn code for tty output done */
# define TTY_READ 3 /* fcn code for reading from tty */
# define TTY_WRITE 4 /* fcn code for writing to tty */
# define TTY_IOCTL 5 /* fcn code for ioctl */
# define TTY_SETPGRP 6 /* fcn code for setpgrp */
# define TTY_OPEN 7 /* fcn code for opening tty */
# define TTY_CLOSE 8 /* fcn code for closing tty */
# define SUSPEND -998 /* used in interrupts when tty has no data */
#ifdef AM_KERNEL
@ -21,9 +21,9 @@
#ifdef AMOEBA
/* there are AM_NTASK copies of the amoeba kernel task.
** If you change AM_NTASKS be sure to adjust kernel/table.c and fs/table.c
*/
/* There are AM_NTASK copies of the amoeba kernel task.
* If you change AM_NTASKS be sure to adjust kernel/table.c and fs/table.c
*/
#define AM_NTASKS 4 /* number of kernel tasks of this class */
#define AMINT_CLASS (TTY+1) /* Amoeba event handler */
@ -37,36 +37,41 @@
# define AM_PUTSIG 9 /* when the luser hits the DEL ! */
# define AM_TASK_DIED 10 /* sent if task died during a transaction */
#else
#else /* if AMOEBA not defined */
#define AMOEBA_CLASS TTY
#endif AMOEBA
#endif /* AMOEBA */
/*
** New class definitions should go here and should be defined relative
** to AMOEBA_CLASS (ie. as AMOEBA_CLASS+n, for the nth task added).
*/
* New class definitions should go here and should be defined relative
* to AMOEBA_CLASS (ie. as AMOEBA_CLASS+n, for the nth task added).
*/
#define IDLE (AMOEBA_CLASS+1) /* task to run when there's nothing to run */
#define PRINTER -7 /* printer I/O class */
/* the printer uses the same commands as TTY */
/* The printer uses the same commands as TTY. */
#define WINCHESTER -6 /* winchester (hard) disk class */
#define FLOPPY -5 /* floppy disk class */
# define DISKINT 1 /* fcn code for disk interrupt */
# define DISK_READ 3 /* fcn code to DISK (must equal TTY_READ) */
# define DISK_WRITE 4 /* fcn code to DISK (must equal TTY_WRITE) */
# define DISK_IOCTL 5 /* fcn code for setting up RAM disk */
# define SCATTERED_IO 6 /* fcn code for multiple reads/writes */
# define OPTIONAL_IO 16 /* modifier to DISK_* codes within vector */
#define MEM -4 /* /dev/ram, /dev/(k)mem and /dev/null class */
# define RAM_DEV 0 /* minor device for /dev/ram */
# define MEM_DEV 1 /* minor device for /dev/mem */
# define KMEM_DEV 2 /* minor device for /dev/kmem */
# define NULL_DEV 3 /* minor device for /dev/null */
#if (CHIP == INTEL)
# define PORT_DEV 4 /* minor device for /dev/port */
#endif
#define CLOCK -3 /* clock class */
# define SET_ALARM 1 /* fcn code to CLOCK, set up alarm */
# define CLOCK_TICK 2 /* fcn code for clock tick */
# define GET_TIME 3 /* fcn code to CLOCK, get real time */
# define SET_TIME 4 /* fcn code to CLOCK, set real time */
# define REAL_TIME 1 /* reply from CLOCK: here is real time */
@ -83,8 +88,12 @@
# define SYS_ABORT 9 /* fcn code for sys_abort() */
# define SYS_FRESH 10 /* fcn code for sys_fresh() (Atari only) */
# define SYS_KILL 11 /* fcn code for sys_kill(proc, sig) */
# define SYS_GBOOT 12 /* fcn code for sys_gboot(procno, bootptr) */
# define SYS_UMAP 13 /* fcn code for sys_umap(procno, etc) */
# define SYS_MEM 14 /* fcn code for sys_mem() */
# define SYS_TRACE 15 /* fcn code for sys_trace(req,pid,addr,data) */
#define HARDWARE -1 /* used as source on interrupt generated msgs */
#define HARDWARE -1 /* used as source on interrupt generated msgs*/
/* Names of message fields for messages to CLOCK task. */
#define DELTA_TICKS m6_l1 /* alarm interval in clock ticks */
@ -102,7 +111,6 @@
/* Names of message fields for messages to TTY task. */
#define TTY_LINE m2_i1 /* message parameter: terminal line */
#define TTY_SPEED m2_i2 /* low byte = input speed, next byte = output*/
#define TTY_REQUEST m2_i3 /* message parameter: ioctl request code */
#define TTY_SPEK m2_l1 /* message parameter: ioctl speed, erasing */
#define TTY_FLAGS m2_l2 /* message parameter: ioctl tty mode */
@ -140,15 +148,19 @@
#ifdef AMOEBA
/* names of message fields for amoeba tasks */
/* Names of message fields for amoeba tasks */
#define AM_OP m2_i1 /* one of the above operators */
#define AM_PROC_NR m2_i2 /* process # of proc doing operation */
#define AM_COUNT m2_i3 /* size of buffer for operation */
#define AM_ADDRESS m2_p1 /* address of buffer for operation */
/* for communication between MM and AMOEBA_CLASS kernel tasks */
/* For communication between MM and AMOEBA_CLASS kernel tasks */
#define AM_STATUS m2_i3 /* same use as REP_STATUS but for amoeba */
#define AM_FREE_IT m2_l1 /* 1=not a getreq, 0=is a getreq */
/* and a special for passing a physical address from the ethernet driver */
/* Special for passing a physical address from the ethernet driver */
#define AM_PADDR m2_l1 /* to the transaction layer */
#endif AMOEBA
#endif /* AMOEBA */
#define HARD_INT 2 /* fcn code for all hardware interrupts */

View file

@ -0,0 +1,121 @@
/* This file sets configuration parameters for the MINIX kernel, FS, and MM.
* It is divided up into two main sections. The first section contains
* user-settable parameters. In the second section, various internal system
* parameters are set based on the user-settable parameters.
*/
/*===========================================================================*
* This section contains user-settable parameters *
*===========================================================================*/
/* MACHINE must be set to one of the machine types list below. */
#define MACHINE IBM_PC /* Must be one of the names listed below */
#define IBM_PC 1 /* any 8088 or 80x86-based system */
#define SUN_4 40 /* any SUN SPARC-based system */
#define ATARI 60 /* ATARI ST (68000) */
#define AMIGA 61 /* Commodore Amiga (68000) */
#define MACINTOSH 62 /* Apple Macintosh (68000) */
/* If ROBUST is set to 1, writes of i-node, directory, and indirect blocks
* from the cache happen as soon as the blocks are modified. This gives a more
* robust, but slower, file system. If it is set to 0, these blocks are not
* given any special treatment, which may cause problems if the system crashes.
*/
#define ROBUST 0 /* 0 for speed, 1 for robustness */
/* If HAVE_SCATTERED_IO is set to 1, scattered I/O is enabled. */
/* DEBUG - 1.4b will always use this. */
#define HAVE_SCATTERED_IO 1
/* The buffer cache should be made as large as you can afford. */
#if INTEL_32BITS
#define NR_BUFS 320 /* # blocks in the buffer cache */
#define NR_BUF_HASH 512 /* size of buf hash table; MUST BE POWER OF 2*/
#else
#define NR_BUFS 30 /* # blocks in the buffer cache */
#define NR_BUF_HASH 32 /* size of buf hash table; MUST BE POWER OF 2*/
#endif
/* Defines for kernel configuration. */
#define AUTO_BIOS 0 /* xt_wini.c - use Western's autoconfig BIOS */
#define C_RS232_INT_HANDLERS 0 /* rs232.c - use slower C int handlers */
#define DEFAULT_CLASS 0 /* floppy.c - 3 or 5 to get only that size */
#define LINEWRAP 0 /* console.c - wrap lines at column 80 */
#define NO_HANDSHAKE 1 /* rs232.c - don't use CTS/RTS handshaking */
/* These configuration defines control debugging and unfinished code. */
#define FLOPPY_TIMING 0 /* floppy.c - for fine tuning floppy driver */
#define MONITOR 0 /* xt_wini.c - monitor loop in w_wait_int */
#define RECORD_FLOPPY_SKEW 0 /* floppy.c - for deciding nr_sectors */
/* These configuration defines control worthless code. */
#define SPARE_VIDEO_MEMORY 0 /* misc.c - use memory from any 2nd vid card */
#define SPLIMITS 0 /* mpx*.x - set stack limits (never checked) */
#if (MACHINE == ATARI)
/* this define says whether the keyboard generates VT100 or IBM_PC escapes */
#define KEYBOARD VT100 /* either VT100 or IBM_PC */
#define VT100 100
/* IBM_PC is already defined above. Use IBM_PC to be Minix ST 1.1 compatible */
/* the next define says whether you have SUPRA or ATARI extended partitioning */
/* hook for future extensions; not yet implemented; not yet used */
#define PARTITIONING SUPRA /* either SUPRA or ATARI */
#define SUPRA 1
/* ATARI is already defined */
/* define the number of hard disk drives on your system */
/* (assuming 2 drives/controller) */
#define NR_DRIVES 1 /* typically 0 or 1 */
#endif
/*===========================================================================*
* There are no user-settable parameters after this line *
*===========================================================================*/
/* Set the CHIP type based on the machine selected. The symbol CHIP is actually
* indicative of more than just the CPU. For example, machines for which
* CHIP == INTEL are expected to have 8259A interrrupt controllers and the
* other properties of IBM PC/XT/AT/386 types machines in general. */
#define INTEL 1 /* CHIP type for PC, XT, AT, 386 and clones */
#define M68000 2 /* CHIP type for Atari, Amiga, Macintosh */
#define SPARC 3 /* CHIP type for SUN-4 (e.g. SPARCstation) */
#if MACHINE == IBM_PC
#define CHIP INTEL
#endif
#if (MACHINE == ATARI) | (MACHINE == AMIGA) | (MACHINE == MACINTOSH)
#define CHIP M68000
#endif
#if (MACHINE == SUN_4)
#define CHIP SPARC
#endif
#if MACHINE == ATARI
#define ASKDEV 1 /* ask for boot device */
#define FASTLOAD 1 /* use multiple block transfers to init ram */
#endif
/* The file buf.h uses MAYBE_WRITE_IMMED. */
#if ROBUST
#define MAYBE_WRITE_IMMED WRITE_IMMED /* slower but perhaps safer */
#else
#define MAYBE_WRITE_IMMED 0 /* faster */
#endif
#ifndef MACHINE
#error "In <minix/config.h> please define MACHINE"
#endif
#ifndef CHIP
#error "In <minix/config.h> please define MACHINE to have a legal value"
#endif
#if (MACHINE == 0)
#error "MACHINE has incorrect value (0)"
#endif

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 */

View file

@ -1,61 +1,57 @@
#ifndef _TYPE_H
#define _TYPE_H
/* Macros */
#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
/* Type definitions */
typedef unsigned short unshort; /* must be 16-bit unsigned */
typedef unsigned short unshort; /* must be 16-bit unsigned */
typedef unshort block_nr; /* block number */
#define NO_BLOCK (block_nr) 0 /* indicates the absence of a block number */
#define MAX_BLOCK_NR (block_nr) 0177777
typedef unshort inode_nr; /* inode number */
#define NO_ENTRY (inode_nr) 0 /* indicates the absence of a dir entry */
#define MAX_INODE_NR (inode_nr) 0177777
typedef unshort zone_nr; /* zone number */
#define NO_ZONE (zone_nr) 0 /* indicates the absence of a zone number */
#define HIGHEST_ZONE (zone_nr) 0177777
typedef unshort bit_nr; /* if inode_nr & zone_nr both unshort,
#define MAX_BLOCK_NR ((block_nr) 0177777) /* largest block number */
#define HIGHEST_ZONE ((zone_nr) 0177777) /* largest zone number */
#define MAX_INODE_NR ((ino_t 0177777) /* largest inode number */
#define MAX_FILE_POS 017777777777L /* largest legal file offset */
#define NO_BLOCK ((block_nr) 0) /* absence of a block number */
#define NO_ENTRY ((ino_t) 0) /* absence of a dir entry */
#define NO_ZONE ((zone_nr) 0) /* absence of a zone number */
#define NO_DEV ((dev_t) ~0) /* absence of a device numb */
typedef unshort bit_nr; /* if ino_t & zone_nr both unshort,
then also unshort, else long */
typedef long zone_type; /* zone size */
typedef unshort mask_bits; /* mode bits */
typedef unshort dev_nr; /* major | minor device number */
#define NO_DEV (dev_nr) ~0 /* indicates absence of a device number */
typedef char links; /* number of links to an inode */
#define MAX_LINKS 0177
typedef long real_time; /* real time in seconds since Jan 1, 1970 */
typedef long file_pos; /* position in, or length of, a file */
#define MAX_FILE_POS 017777777777L
typedef short int uid; /* user id */
typedef char gid; /* group id */
#ifdef i8088
#if (CHIP == INTEL)
typedef unsigned vir_bytes; /* virtual addresses and lengths in bytes */
#endif
#ifdef ATARI_ST
#if (CHIP == M68000)
typedef long vir_bytes; /* virtual addresses and lengths in bytes */
#endif
typedef unsigned vir_clicks; /* virtual addresses and lengths in clicks */
typedef long phys_bytes; /* physical addresses and lengths in bytes */
typedef unsigned phys_clicks; /* physical addresses and lengths in clicks */
typedef int signed_clicks; /* same length as phys_clicks, but signed */
/* Types relating to messages. */
#define M1 1
#define M3 3
#define M4 4
#define M3_STRING 14
#define M1 1
#define M3 3
#define M4 4
#define M3_STRING 14
typedef struct {int m1i1, m1i2, m1i3; char *m1p1, *m1p2, *m1p3;} mess_1;
typedef struct {int m2i1, m2i2, m2i3; long m2l1, m2l2; char *m2p1;} mess_2;
typedef struct {int m3i1, m3i2; char *m3p1; char m3ca1[M3_STRING];} mess_3;
typedef struct {long m4l1, m4l2, m4l3, m4l4;} mess_4;
typedef struct {char m5c1, m5c2; int m5i1, m5i2; long m5l1, m5l2, m5l3;} mess_5;
typedef struct {int m6i1, m6i2, m6i3; long m6l1; int (*m6f1)();} mess_6;
#if _ANSI
typedef struct {int m6i1, m6i2, m6i3; long m6l1; void (*m6f1)(int);} mess_6;
#else
typedef struct {int m6i1, m6i2, m6i3; long m6l1; void (*m6f1)();} mess_6;
#endif
typedef struct {
int m_source; /* who sent the message */
@ -74,44 +70,44 @@ typedef struct {
#define NIL_MESS (message *) 0
/* The following defines provide names for useful members. */
#define m1_i1 m_u.m_m1.m1i1
#define m1_i2 m_u.m_m1.m1i2
#define m1_i3 m_u.m_m1.m1i3
#define m1_p1 m_u.m_m1.m1p1
#define m1_p2 m_u.m_m1.m1p2
#define m1_p3 m_u.m_m1.m1p3
#define m1_i1 m_u.m_m1.m1i1
#define m1_i2 m_u.m_m1.m1i2
#define m1_i3 m_u.m_m1.m1i3
#define m1_p1 m_u.m_m1.m1p1
#define m1_p2 m_u.m_m1.m1p2
#define m1_p3 m_u.m_m1.m1p3
#define m2_i1 m_u.m_m2.m2i1
#define m2_i2 m_u.m_m2.m2i2
#define m2_i3 m_u.m_m2.m2i3
#define m2_l1 m_u.m_m2.m2l1
#define m2_l2 m_u.m_m2.m2l2
#define m2_p1 m_u.m_m2.m2p1
#define m2_i1 m_u.m_m2.m2i1
#define m2_i2 m_u.m_m2.m2i2
#define m2_i3 m_u.m_m2.m2i3
#define m2_l1 m_u.m_m2.m2l1
#define m2_l2 m_u.m_m2.m2l2
#define m2_p1 m_u.m_m2.m2p1
#define m3_i1 m_u.m_m3.m3i1
#define m3_i2 m_u.m_m3.m3i2
#define m3_p1 m_u.m_m3.m3p1
#define m3_ca1 m_u.m_m3.m3ca1
#define m3_i1 m_u.m_m3.m3i1
#define m3_i2 m_u.m_m3.m3i2
#define m3_p1 m_u.m_m3.m3p1
#define m3_ca1 m_u.m_m3.m3ca1
#define m4_l1 m_u.m_m4.m4l1
#define m4_l2 m_u.m_m4.m4l2
#define m4_l3 m_u.m_m4.m4l3
#define m4_l4 m_u.m_m4.m4l4
#define m4_l1 m_u.m_m4.m4l1
#define m4_l2 m_u.m_m4.m4l2
#define m4_l3 m_u.m_m4.m4l3
#define m4_l4 m_u.m_m4.m4l4
#define m5_c1 m_u.m_m5.m5c1
#define m5_c2 m_u.m_m5.m5c2
#define m5_i1 m_u.m_m5.m5i1
#define m5_i2 m_u.m_m5.m5i2
#define m5_l1 m_u.m_m5.m5l1
#define m5_l2 m_u.m_m5.m5l2
#define m5_l3 m_u.m_m5.m5l3
#define m5_c1 m_u.m_m5.m5c1
#define m5_c2 m_u.m_m5.m5c2
#define m5_i1 m_u.m_m5.m5i1
#define m5_i2 m_u.m_m5.m5i2
#define m5_l1 m_u.m_m5.m5l1
#define m5_l2 m_u.m_m5.m5l2
#define m5_l3 m_u.m_m5.m5l3
#define m6_i1 m_u.m_m6.m6i1
#define m6_i2 m_u.m_m6.m6i2
#define m6_i3 m_u.m_m6.m6i3
#define m6_l1 m_u.m_m6.m6l1
#define m6_f1 m_u.m_m6.m6f1
#define m6_i1 m_u.m_m6.m6i1
#define m6_i2 m_u.m_m6.m6i2
#define m6_i3 m_u.m_m6.m6i3
#define m6_l1 m_u.m_m6.m6l1
#define m6_f1 m_u.m_m6.m6f1
struct mem_map {
vir_clicks mem_vir; /* virtual address */
@ -120,11 +116,19 @@ struct mem_map {
};
struct copy_info { /* used by sys_copy(src, dst, bytes) */
int cp_src_proc;
int cp_src_space;
vir_bytes cp_src_vir;
int cp_dst_proc;
int cp_dst_space;
vir_bytes cp_dst_vir;
vir_bytes cp_bytes;
int cp_src_proc;
int cp_src_space;
vir_bytes cp_src_vir;
int cp_dst_proc;
int cp_dst_space;
vir_bytes cp_dst_vir;
vir_bytes cp_bytes;
};
struct iorequest_s {
long io_position; /* position in device file (really off_t) */
char *io_buf; /* buffer in user space */
unsigned short io_nbytes; /* size of request */
unsigned short io_request; /* read, write (optionally) */
};
#endif /* _TYPE_H */

View file

@ -1,8 +1,5 @@
config.h
callnr.h
com.h
const.h
error.h
sgtty.h
signal.h
stat.h
type.h

View file

@ -1,53 +1,58 @@
#define NCALLS 70 /* number of system calls allowed */
#define NCALLS 70 /* number of system calls allowed */
#define EXIT 1
#define FORK 2
#define READ 3
#define WRITE 4
#define OPEN 5
#define CLOSE 6
#define WAIT 7
#define CREAT 8
#define LINK 9
#define UNLINK 10
#define CHDIR 12
#define TIME 13
#define MKNOD 14
#define CHMOD 15
#define CHOWN 16
#define BRK 17
#define STAT 18
#define LSEEK 19
#define GETPID 20
#define MOUNT 21
#define UMOUNT 22
#define SETUID 23
#define GETUID 24
#define STIME 25
#define ALARM 27
#define FSTAT 28
#define PAUSE 29
#define UTIME 30
#define ACCESS 33
#define SYNC 36
#define KILL 37
#define DUP 41
#define PIPE 42
#define TIMES 43
#define SETGID 46
#define GETGID 47
#define SIGNAL 48
#define IOCTL 54
#define EXEC 59
#define UMASK 60
#define CHROOT 61
#define EXIT 1
#define FORK 2
#define READ 3
#define WRITE 4
#define OPEN 5
#define CLOSE 6
#define WAIT 7
#define CREAT 8
#define LINK 9
#define UNLINK 10
#define CHDIR 12
#define TIME 13
#define MKNOD 14
#define CHMOD 15
#define CHOWN 16
#define BRK 17
#define STAT 18
#define LSEEK 19
#define GETPID 20
#define MOUNT 21
#define UMOUNT 22
#define SETUID 23
#define GETUID 24
#define STIME 25
#define PTRACE 26
#define ALARM 27
#define FSTAT 28
#define PAUSE 29
#define UTIME 30
#define ACCESS 33
#define SYNC 36
#define KILL 37
#define RENAME 38
#define MKDIR 39
#define RMDIR 40
#define DUP 41
#define PIPE 42
#define TIMES 43
#define SETGID 46
#define GETGID 47
#define SIGNAL 48
#define IOCTL 54
#define FCNTL 55
#define EXEC 59
#define UMASK 60
#define CHROOT 61
/* The following are not system calls, but are processed like them. */
#define KSIG 64 /* kernel detected a signal */
#define UNPAUSE 65 /* to MM or FS: check for EINTR */
#define BRK2 66 /* to MM: used to say how big FS & INIT are */
#define REVIVE 67 /* to FS: revive a sleeping process */
#define TASK_REPLY 68 /* to FS: reply code from tty task */
#define KSIG 64 /* kernel detected a signal */
#define UNPAUSE 65 /* to MM or FS: check for EINTR */
#define BRK2 66 /* to MM: used to say how big FS & INIT are */
#define REVIVE 67 /* to FS: revive a sleeping process */
#define TASK_REPLY 68 /* to FS: reply code from tty task */
/* The following IS a system call for amoeba transactions */
#define AM_SYSCALL 69

View file

@ -7,12 +7,12 @@
/* Task numbers, function codes and reply codes. */
#define TTY -NR_TASKS /* terminal I/O class */
# define TTY_CHAR_INT 1 /* fcn code for tty input interrupt */
# define TTY_O_DONE 2 /* fcn code for tty output done */
# define TTY_READ 3 /* fcn code for reading from tty */
# define TTY_WRITE 4 /* fcn code for writing to tty */
# define TTY_IOCTL 5 /* fcn code for ioctl */
# define TTY_SETPGRP 6 /* fcn code for setpgrp */
# define TTY_OPEN 7 /* fcn code for opening tty */
# define TTY_CLOSE 8 /* fcn code for closing tty */
# define SUSPEND -998 /* used in interrupts when tty has no data */
#ifdef AM_KERNEL
@ -21,9 +21,9 @@
#ifdef AMOEBA
/* there are AM_NTASK copies of the amoeba kernel task.
** If you change AM_NTASKS be sure to adjust kernel/table.c and fs/table.c
*/
/* There are AM_NTASK copies of the amoeba kernel task.
* If you change AM_NTASKS be sure to adjust kernel/table.c and fs/table.c
*/
#define AM_NTASKS 4 /* number of kernel tasks of this class */
#define AMINT_CLASS (TTY+1) /* Amoeba event handler */
@ -37,36 +37,41 @@
# define AM_PUTSIG 9 /* when the luser hits the DEL ! */
# define AM_TASK_DIED 10 /* sent if task died during a transaction */
#else
#else /* if AMOEBA not defined */
#define AMOEBA_CLASS TTY
#endif AMOEBA
#endif /* AMOEBA */
/*
** New class definitions should go here and should be defined relative
** to AMOEBA_CLASS (ie. as AMOEBA_CLASS+n, for the nth task added).
*/
* New class definitions should go here and should be defined relative
* to AMOEBA_CLASS (ie. as AMOEBA_CLASS+n, for the nth task added).
*/
#define IDLE (AMOEBA_CLASS+1) /* task to run when there's nothing to run */
#define PRINTER -7 /* printer I/O class */
/* the printer uses the same commands as TTY */
/* The printer uses the same commands as TTY. */
#define WINCHESTER -6 /* winchester (hard) disk class */
#define FLOPPY -5 /* floppy disk class */
# define DISKINT 1 /* fcn code for disk interrupt */
# define DISK_READ 3 /* fcn code to DISK (must equal TTY_READ) */
# define DISK_WRITE 4 /* fcn code to DISK (must equal TTY_WRITE) */
# define DISK_IOCTL 5 /* fcn code for setting up RAM disk */
# define SCATTERED_IO 6 /* fcn code for multiple reads/writes */
# define OPTIONAL_IO 16 /* modifier to DISK_* codes within vector */
#define MEM -4 /* /dev/ram, /dev/(k)mem and /dev/null class */
# define RAM_DEV 0 /* minor device for /dev/ram */
# define MEM_DEV 1 /* minor device for /dev/mem */
# define KMEM_DEV 2 /* minor device for /dev/kmem */
# define NULL_DEV 3 /* minor device for /dev/null */
#if (CHIP == INTEL)
# define PORT_DEV 4 /* minor device for /dev/port */
#endif
#define CLOCK -3 /* clock class */
# define SET_ALARM 1 /* fcn code to CLOCK, set up alarm */
# define CLOCK_TICK 2 /* fcn code for clock tick */
# define GET_TIME 3 /* fcn code to CLOCK, get real time */
# define SET_TIME 4 /* fcn code to CLOCK, set real time */
# define REAL_TIME 1 /* reply from CLOCK: here is real time */
@ -83,8 +88,12 @@
# define SYS_ABORT 9 /* fcn code for sys_abort() */
# define SYS_FRESH 10 /* fcn code for sys_fresh() (Atari only) */
# define SYS_KILL 11 /* fcn code for sys_kill(proc, sig) */
# define SYS_GBOOT 12 /* fcn code for sys_gboot(procno, bootptr) */
# define SYS_UMAP 13 /* fcn code for sys_umap(procno, etc) */
# define SYS_MEM 14 /* fcn code for sys_mem() */
# define SYS_TRACE 15 /* fcn code for sys_trace(req,pid,addr,data) */
#define HARDWARE -1 /* used as source on interrupt generated msgs */
#define HARDWARE -1 /* used as source on interrupt generated msgs*/
/* Names of message fields for messages to CLOCK task. */
#define DELTA_TICKS m6_l1 /* alarm interval in clock ticks */
@ -102,7 +111,6 @@
/* Names of message fields for messages to TTY task. */
#define TTY_LINE m2_i1 /* message parameter: terminal line */
#define TTY_SPEED m2_i2 /* low byte = input speed, next byte = output*/
#define TTY_REQUEST m2_i3 /* message parameter: ioctl request code */
#define TTY_SPEK m2_l1 /* message parameter: ioctl speed, erasing */
#define TTY_FLAGS m2_l2 /* message parameter: ioctl tty mode */
@ -140,15 +148,19 @@
#ifdef AMOEBA
/* names of message fields for amoeba tasks */
/* Names of message fields for amoeba tasks */
#define AM_OP m2_i1 /* one of the above operators */
#define AM_PROC_NR m2_i2 /* process # of proc doing operation */
#define AM_COUNT m2_i3 /* size of buffer for operation */
#define AM_ADDRESS m2_p1 /* address of buffer for operation */
/* for communication between MM and AMOEBA_CLASS kernel tasks */
/* For communication between MM and AMOEBA_CLASS kernel tasks */
#define AM_STATUS m2_i3 /* same use as REP_STATUS but for amoeba */
#define AM_FREE_IT m2_l1 /* 1=not a getreq, 0=is a getreq */
/* and a special for passing a physical address from the ethernet driver */
/* Special for passing a physical address from the ethernet driver */
#define AM_PADDR m2_l1 /* to the transaction layer */
#endif AMOEBA
#endif /* AMOEBA */
#define HARD_INT 2 /* fcn code for all hardware interrupts */

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 */

View file

@ -1,61 +1,57 @@
#ifndef _TYPE_H
#define _TYPE_H
/* Macros */
#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
/* Type definitions */
typedef unsigned short unshort; /* must be 16-bit unsigned */
typedef unsigned short unshort; /* must be 16-bit unsigned */
typedef unshort block_nr; /* block number */
#define NO_BLOCK (block_nr) 0 /* indicates the absence of a block number */
#define MAX_BLOCK_NR (block_nr) 0177777
typedef unshort inode_nr; /* inode number */
#define NO_ENTRY (inode_nr) 0 /* indicates the absence of a dir entry */
#define MAX_INODE_NR (inode_nr) 0177777
typedef unshort zone_nr; /* zone number */
#define NO_ZONE (zone_nr) 0 /* indicates the absence of a zone number */
#define HIGHEST_ZONE (zone_nr) 0177777
typedef unshort bit_nr; /* if inode_nr & zone_nr both unshort,
#define MAX_BLOCK_NR ((block_nr) 0177777) /* largest block number */
#define HIGHEST_ZONE ((zone_nr) 0177777) /* largest zone number */
#define MAX_INODE_NR ((ino_t 0177777) /* largest inode number */
#define MAX_FILE_POS 017777777777L /* largest legal file offset */
#define NO_BLOCK ((block_nr) 0) /* absence of a block number */
#define NO_ENTRY ((ino_t) 0) /* absence of a dir entry */
#define NO_ZONE ((zone_nr) 0) /* absence of a zone number */
#define NO_DEV ((dev_t) ~0) /* absence of a device numb */
typedef unshort bit_nr; /* if ino_t & zone_nr both unshort,
then also unshort, else long */
typedef long zone_type; /* zone size */
typedef unshort mask_bits; /* mode bits */
typedef unshort dev_nr; /* major | minor device number */
#define NO_DEV (dev_nr) ~0 /* indicates absence of a device number */
typedef char links; /* number of links to an inode */
#define MAX_LINKS 0177
typedef long real_time; /* real time in seconds since Jan 1, 1970 */
typedef long file_pos; /* position in, or length of, a file */
#define MAX_FILE_POS 017777777777L
typedef short int uid; /* user id */
typedef char gid; /* group id */
#ifdef i8088
#if (CHIP == INTEL)
typedef unsigned vir_bytes; /* virtual addresses and lengths in bytes */
#endif
#ifdef ATARI_ST
#if (CHIP == M68000)
typedef long vir_bytes; /* virtual addresses and lengths in bytes */
#endif
typedef unsigned vir_clicks; /* virtual addresses and lengths in clicks */
typedef long phys_bytes; /* physical addresses and lengths in bytes */
typedef unsigned phys_clicks; /* physical addresses and lengths in clicks */
typedef int signed_clicks; /* same length as phys_clicks, but signed */
/* Types relating to messages. */
#define M1 1
#define M3 3
#define M4 4
#define M3_STRING 14
#define M1 1
#define M3 3
#define M4 4
#define M3_STRING 14
typedef struct {int m1i1, m1i2, m1i3; char *m1p1, *m1p2, *m1p3;} mess_1;
typedef struct {int m2i1, m2i2, m2i3; long m2l1, m2l2; char *m2p1;} mess_2;
typedef struct {int m3i1, m3i2; char *m3p1; char m3ca1[M3_STRING];} mess_3;
typedef struct {long m4l1, m4l2, m4l3, m4l4;} mess_4;
typedef struct {char m5c1, m5c2; int m5i1, m5i2; long m5l1, m5l2, m5l3;} mess_5;
typedef struct {int m6i1, m6i2, m6i3; long m6l1; int (*m6f1)();} mess_6;
#if _ANSI
typedef struct {int m6i1, m6i2, m6i3; long m6l1; void (*m6f1)(int);} mess_6;
#else
typedef struct {int m6i1, m6i2, m6i3; long m6l1; void (*m6f1)();} mess_6;
#endif
typedef struct {
int m_source; /* who sent the message */
@ -74,44 +70,44 @@ typedef struct {
#define NIL_MESS (message *) 0
/* The following defines provide names for useful members. */
#define m1_i1 m_u.m_m1.m1i1
#define m1_i2 m_u.m_m1.m1i2
#define m1_i3 m_u.m_m1.m1i3
#define m1_p1 m_u.m_m1.m1p1
#define m1_p2 m_u.m_m1.m1p2
#define m1_p3 m_u.m_m1.m1p3
#define m1_i1 m_u.m_m1.m1i1
#define m1_i2 m_u.m_m1.m1i2
#define m1_i3 m_u.m_m1.m1i3
#define m1_p1 m_u.m_m1.m1p1
#define m1_p2 m_u.m_m1.m1p2
#define m1_p3 m_u.m_m1.m1p3
#define m2_i1 m_u.m_m2.m2i1
#define m2_i2 m_u.m_m2.m2i2
#define m2_i3 m_u.m_m2.m2i3
#define m2_l1 m_u.m_m2.m2l1
#define m2_l2 m_u.m_m2.m2l2
#define m2_p1 m_u.m_m2.m2p1
#define m2_i1 m_u.m_m2.m2i1
#define m2_i2 m_u.m_m2.m2i2
#define m2_i3 m_u.m_m2.m2i3
#define m2_l1 m_u.m_m2.m2l1
#define m2_l2 m_u.m_m2.m2l2
#define m2_p1 m_u.m_m2.m2p1
#define m3_i1 m_u.m_m3.m3i1
#define m3_i2 m_u.m_m3.m3i2
#define m3_p1 m_u.m_m3.m3p1
#define m3_ca1 m_u.m_m3.m3ca1
#define m3_i1 m_u.m_m3.m3i1
#define m3_i2 m_u.m_m3.m3i2
#define m3_p1 m_u.m_m3.m3p1
#define m3_ca1 m_u.m_m3.m3ca1
#define m4_l1 m_u.m_m4.m4l1
#define m4_l2 m_u.m_m4.m4l2
#define m4_l3 m_u.m_m4.m4l3
#define m4_l4 m_u.m_m4.m4l4
#define m4_l1 m_u.m_m4.m4l1
#define m4_l2 m_u.m_m4.m4l2
#define m4_l3 m_u.m_m4.m4l3
#define m4_l4 m_u.m_m4.m4l4
#define m5_c1 m_u.m_m5.m5c1
#define m5_c2 m_u.m_m5.m5c2
#define m5_i1 m_u.m_m5.m5i1
#define m5_i2 m_u.m_m5.m5i2
#define m5_l1 m_u.m_m5.m5l1
#define m5_l2 m_u.m_m5.m5l2
#define m5_l3 m_u.m_m5.m5l3
#define m5_c1 m_u.m_m5.m5c1
#define m5_c2 m_u.m_m5.m5c2
#define m5_i1 m_u.m_m5.m5i1
#define m5_i2 m_u.m_m5.m5i2
#define m5_l1 m_u.m_m5.m5l1
#define m5_l2 m_u.m_m5.m5l2
#define m5_l3 m_u.m_m5.m5l3
#define m6_i1 m_u.m_m6.m6i1
#define m6_i2 m_u.m_m6.m6i2
#define m6_i3 m_u.m_m6.m6i3
#define m6_l1 m_u.m_m6.m6l1
#define m6_f1 m_u.m_m6.m6f1
#define m6_i1 m_u.m_m6.m6i1
#define m6_i2 m_u.m_m6.m6i2
#define m6_i3 m_u.m_m6.m6i3
#define m6_l1 m_u.m_m6.m6l1
#define m6_f1 m_u.m_m6.m6f1
struct mem_map {
vir_clicks mem_vir; /* virtual address */
@ -120,11 +116,19 @@ struct mem_map {
};
struct copy_info { /* used by sys_copy(src, dst, bytes) */
int cp_src_proc;
int cp_src_space;
vir_bytes cp_src_vir;
int cp_dst_proc;
int cp_dst_space;
vir_bytes cp_dst_vir;
vir_bytes cp_bytes;
int cp_src_proc;
int cp_src_space;
vir_bytes cp_src_vir;
int cp_dst_proc;
int cp_dst_space;
vir_bytes cp_dst_vir;
vir_bytes cp_bytes;
};
struct iorequest_s {
long io_position; /* position in device file (really off_t) */
char *io_buf; /* buffer in user space */
unsigned short io_nbytes; /* size of request */
unsigned short io_request; /* read, write (optionally) */
};
#endif /* _TYPE_H */