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 callnr.h
com.h com.h
const.h const.h
error.h
sgtty.h
signal.h
stat.h
type.h type.h

View file

@ -24,6 +24,7 @@
#define SETUID 23 #define SETUID 23
#define GETUID 24 #define GETUID 24
#define STIME 25 #define STIME 25
#define PTRACE 26
#define ALARM 27 #define ALARM 27
#define FSTAT 28 #define FSTAT 28
#define PAUSE 29 #define PAUSE 29
@ -31,6 +32,9 @@
#define ACCESS 33 #define ACCESS 33
#define SYNC 36 #define SYNC 36
#define KILL 37 #define KILL 37
#define RENAME 38
#define MKDIR 39
#define RMDIR 40
#define DUP 41 #define DUP 41
#define PIPE 42 #define PIPE 42
#define TIMES 43 #define TIMES 43
@ -38,6 +42,7 @@
#define GETGID 47 #define GETGID 47
#define SIGNAL 48 #define SIGNAL 48
#define IOCTL 54 #define IOCTL 54
#define FCNTL 55
#define EXEC 59 #define EXEC 59
#define UMASK 60 #define UMASK 60
#define CHROOT 61 #define CHROOT 61

View file

@ -7,12 +7,12 @@
/* Task numbers, function codes and reply codes. */ /* Task numbers, function codes and reply codes. */
#define TTY -NR_TASKS /* terminal I/O class */ #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_READ 3 /* fcn code for reading from tty */
# define TTY_WRITE 4 /* fcn code for writing to tty */ # define TTY_WRITE 4 /* fcn code for writing to tty */
# define TTY_IOCTL 5 /* fcn code for ioctl */ # define TTY_IOCTL 5 /* fcn code for ioctl */
# define TTY_SETPGRP 6 /* fcn code for setpgrp */ # 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 */ # define SUSPEND -998 /* used in interrupts when tty has no data */
#ifdef AM_KERNEL #ifdef AM_KERNEL
@ -21,9 +21,9 @@
#ifdef AMOEBA #ifdef AMOEBA
/* there are AM_NTASK copies of the amoeba kernel task. /* 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 * 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 AM_NTASKS 4 /* number of kernel tasks of this class */
#define AMINT_CLASS (TTY+1) /* Amoeba event handler */ #define AMINT_CLASS (TTY+1) /* Amoeba event handler */
@ -37,36 +37,41 @@
# define AM_PUTSIG 9 /* when the luser hits the DEL ! */ # define AM_PUTSIG 9 /* when the luser hits the DEL ! */
# define AM_TASK_DIED 10 /* sent if task died during a transaction */ # define AM_TASK_DIED 10 /* sent if task died during a transaction */
#else #else /* if AMOEBA not defined */
#define AMOEBA_CLASS TTY #define AMOEBA_CLASS TTY
#endif AMOEBA #endif /* AMOEBA */
/* /*
** New class definitions should go here and should be defined relative * New class definitions should go here and should be defined relative
** to AMOEBA_CLASS (ie. as AMOEBA_CLASS+n, for the nth task added). * 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 */ #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 WINCHESTER -6 /* winchester (hard) disk class */
#define FLOPPY -5 /* floppy 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_READ 3 /* fcn code to DISK (must equal TTY_READ) */
# define DISK_WRITE 4 /* fcn code to DISK (must equal TTY_WRITE) */ # define DISK_WRITE 4 /* fcn code to DISK (must equal TTY_WRITE) */
# define DISK_IOCTL 5 /* fcn code for setting up RAM disk */ # 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 MEM -4 /* /dev/ram, /dev/(k)mem and /dev/null class */
# define RAM_DEV 0 /* minor device for /dev/ram */ # define RAM_DEV 0 /* minor device for /dev/ram */
# define MEM_DEV 1 /* minor device for /dev/mem */ # define MEM_DEV 1 /* minor device for /dev/mem */
# define KMEM_DEV 2 /* minor device for /dev/kmem */ # define KMEM_DEV 2 /* minor device for /dev/kmem */
# define NULL_DEV 3 /* minor device for /dev/null */ # 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 CLOCK -3 /* clock class */
# define SET_ALARM 1 /* fcn code to CLOCK, set up alarm */ # 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 GET_TIME 3 /* fcn code to CLOCK, get real time */
# define SET_TIME 4 /* fcn code to CLOCK, set real time */ # define SET_TIME 4 /* fcn code to CLOCK, set real time */
# define REAL_TIME 1 /* reply from CLOCK: here is 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_ABORT 9 /* fcn code for sys_abort() */
# define SYS_FRESH 10 /* fcn code for sys_fresh() (Atari only) */ # define SYS_FRESH 10 /* fcn code for sys_fresh() (Atari only) */
# define SYS_KILL 11 /* fcn code for sys_kill(proc, sig) */ # 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. */ /* Names of message fields for messages to CLOCK task. */
#define DELTA_TICKS m6_l1 /* alarm interval in clock ticks */ #define DELTA_TICKS m6_l1 /* alarm interval in clock ticks */
@ -102,7 +111,6 @@
/* Names of message fields for messages to TTY task. */ /* Names of message fields for messages to TTY task. */
#define TTY_LINE m2_i1 /* message parameter: terminal line */ #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_REQUEST m2_i3 /* message parameter: ioctl request code */
#define TTY_SPEK m2_l1 /* message parameter: ioctl speed, erasing */ #define TTY_SPEK m2_l1 /* message parameter: ioctl speed, erasing */
#define TTY_FLAGS m2_l2 /* message parameter: ioctl tty mode */ #define TTY_FLAGS m2_l2 /* message parameter: ioctl tty mode */
@ -140,15 +148,19 @@
#ifdef AMOEBA #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_OP m2_i1 /* one of the above operators */
#define AM_PROC_NR m2_i2 /* process # of proc doing operation */ #define AM_PROC_NR m2_i2 /* process # of proc doing operation */
#define AM_COUNT m2_i3 /* size of buffer for operation */ #define AM_COUNT m2_i3 /* size of buffer for operation */
#define AM_ADDRESS m2_p1 /* address 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_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 */ #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 */ #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 /* Copyright (C) 1990 by Prentice-Hall, Inc. Permission is hereby granted
* private individuals and educational institutions to modify and * to redistribute the binary and source programs of this system for
* redistribute the binary and source programs of this system to other * educational or research purposes. For other use, written permission from
* private individuals and educational institutions for educational and * Prentice-Hall is required.
* 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.
*/ */
#ifndef i8088
#ifndef ATARI_ST
#error Either i8088 or ATARI ST must be defined
#endif
#endif
#define EXTERN extern /* used in *.h files */ #define EXTERN extern /* used in *.h files */
#define PRIVATE static /* PRIVATE x limits the scope of x */ #define PRIVATE static /* PRIVATE x limits the scope of x */
#define PUBLIC /* PUBLIC is the opposite of PRIVATE */ #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 TRUE 1 /* used for turning integers into Booleans */
#define FALSE 0 /* 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 HZ 60 /* clock freq (software settable on IBM-PC) */
#define BLOCK_SIZE 1024 /* # bytes in a disk block */ #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 MAJOR 8 /* major device = (dev>>MAJOR) & 0377 */
#define MINOR 0 /* minor device = (dev>>MINOR) & 0377 */ #define MINOR 0 /* minor device = (dev>>MINOR) & 0377 */
#ifdef AM_KERNEL #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 #else
#define NR_TASKS 8 /* number of tasks in the transfer vector */ #define NR_TASKS 9 /* number of tasks in the transfer vector */
#endif #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 NR_SEGS 3 /* # segments per process */
#define T 0 /* proc[i].mem_map[T] is for text */ #define T 0 /* proc[i].mem_map[T] is for text */
#define D 1 /* proc[i].mem_map[D] is for data */ #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 */ #define MAX_P_LONG 2147483647 /* maximum positive long, i.e. 2**31 - 1 */
/* Memory is allocated in clicks. */ /* Memory is allocated in clicks. */
#ifdef i8088 #if (CHIP == INTEL) || (CHIP == M68000)
#define CLICK_SIZE 0020 /* unit in which memory is allocated */
#define CLICK_SHIFT 4 /* log2 of CLICK_SIZE */
#endif
#ifdef ATARI_ST
#define CLICK_SIZE 256 /* unit in which memory is allocated */ #define CLICK_SIZE 256 /* unit in which memory is allocated */
#define CLICK_SHIFT 8 /* log2 of CLICK_SIZE */ #define CLICK_SHIFT 8 /* log2 of CLICK_SIZE */
#endif #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 */ /* Process numbers of some important processes */
#define MM_PROC_NR 0 /* process number of memory manager */ #define MM_PROC_NR 0 /* process number of memory manager */
#define FS_PROC_NR 1 /* process number of file system */ #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 FROM_USER 1 /* flag telling to copy from user to fs */
#define READING 0 /* copy data to user */ #define READING 0 /* copy data to user */
#define WRITING 1 /* copy data from user */ #define WRITING 1 /* copy data from user */
#ifndef ATARI_ST
#if (MACHINE != ATARI)
#define ABS -999 /* this process means absolute memory */ #define ABS -999 /* this process means absolute memory */
#endif #endif
@ -72,13 +69,7 @@
#define NIL_PTR (char *) 0 /* generally useful expression */ #define NIL_PTR (char *) 0 /* generally useful expression */
#define NO_NUM 0x8000 /* used as numerical argument to panic() */ #define NO_NUM 0x8000 /* used as numerical argument to panic() */
#define MAX_PATH 128 /* max length of path names */ #define SIG_PUSH_BYTES (4*sizeof(int)) /* how many bytes pushed by signal */
#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 */
/* Flag bits for i_mode in the inode. */ /* Flag bits for i_mode in the inode. */
#define I_TYPE 0170000 /* this field gives inode type */ #define I_TYPE 0170000 /* this field gives inode type */
@ -86,8 +77,9 @@
#define I_BLOCK_SPECIAL 0060000 /* block special file */ #define I_BLOCK_SPECIAL 0060000 /* block special file */
#define I_DIRECTORY 0040000 /* file is a directory */ #define I_DIRECTORY 0040000 /* file is a directory */
#define I_CHAR_SPECIAL 0020000 /* character special file */ #define I_CHAR_SPECIAL 0020000 /* character special file */
#define I_SET_UID_BIT 0004000 /* set effective uid on exec */ #define I_NAMED_PIPE 0010000 /* named pipe (FIFO) */
#define I_SET_GID_BIT 0002000 /* set effective gid on exec */ #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 ALL_MODES 0006777 /* all bits for user, group and others */
#define RWX_MODES 0000777 /* mode bits for RWX only */ #define RWX_MODES 0000777 /* mode bits for RWX only */
#define R_BIT 0000004 /* Rwx protection bit */ #define R_BIT 0000004 /* Rwx protection bit */

View file

@ -1,44 +1,36 @@
#ifndef _TYPE_H
#define _TYPE_H
/* Macros */ /* Macros */
#define MAX(a,b) (a > b ? a : b) #define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) (a < b ? a : b) #define MIN(a,b) ((a) < (b) ? (a) : (b))
/* Type definitions */ /* 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 */ 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 */ 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 */ then also unshort, else long */
typedef long zone_type; /* zone size */ 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 */ #if (CHIP == INTEL)
#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
typedef unsigned vir_bytes; /* virtual addresses and lengths in bytes */ typedef unsigned vir_bytes; /* virtual addresses and lengths in bytes */
#endif #endif
#ifdef ATARI_ST
#if (CHIP == M68000)
typedef long vir_bytes; /* virtual addresses and lengths in bytes */ typedef long vir_bytes; /* virtual addresses and lengths in bytes */
#endif #endif
typedef unsigned vir_clicks; /* virtual addresses and lengths in clicks */ typedef unsigned vir_clicks; /* virtual addresses and lengths in clicks */
typedef long phys_bytes; /* physical addresses and lengths in bytes */ typedef long phys_bytes; /* physical addresses and lengths in bytes */
typedef unsigned phys_clicks; /* physical addresses and lengths in clicks */ typedef unsigned phys_clicks; /* physical addresses and lengths in clicks */
@ -55,7 +47,11 @@ 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 {int m3i1, m3i2; char *m3p1; char m3ca1[M3_STRING];} mess_3;
typedef struct {long m4l1, m4l2, m4l3, m4l4;} mess_4; 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 {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 { typedef struct {
int m_source; /* who sent the message */ int m_source; /* who sent the message */
@ -128,3 +124,11 @@ struct copy_info { /* used by sys_copy(src, dst, bytes) */
vir_bytes cp_dst_vir; vir_bytes cp_dst_vir;
vir_bytes cp_bytes; 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 callnr.h
com.h com.h
const.h const.h
error.h
sgtty.h
signal.h
stat.h
type.h type.h

View file

@ -24,6 +24,7 @@
#define SETUID 23 #define SETUID 23
#define GETUID 24 #define GETUID 24
#define STIME 25 #define STIME 25
#define PTRACE 26
#define ALARM 27 #define ALARM 27
#define FSTAT 28 #define FSTAT 28
#define PAUSE 29 #define PAUSE 29
@ -31,6 +32,9 @@
#define ACCESS 33 #define ACCESS 33
#define SYNC 36 #define SYNC 36
#define KILL 37 #define KILL 37
#define RENAME 38
#define MKDIR 39
#define RMDIR 40
#define DUP 41 #define DUP 41
#define PIPE 42 #define PIPE 42
#define TIMES 43 #define TIMES 43
@ -38,6 +42,7 @@
#define GETGID 47 #define GETGID 47
#define SIGNAL 48 #define SIGNAL 48
#define IOCTL 54 #define IOCTL 54
#define FCNTL 55
#define EXEC 59 #define EXEC 59
#define UMASK 60 #define UMASK 60
#define CHROOT 61 #define CHROOT 61

View file

@ -7,12 +7,12 @@
/* Task numbers, function codes and reply codes. */ /* Task numbers, function codes and reply codes. */
#define TTY -NR_TASKS /* terminal I/O class */ #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_READ 3 /* fcn code for reading from tty */
# define TTY_WRITE 4 /* fcn code for writing to tty */ # define TTY_WRITE 4 /* fcn code for writing to tty */
# define TTY_IOCTL 5 /* fcn code for ioctl */ # define TTY_IOCTL 5 /* fcn code for ioctl */
# define TTY_SETPGRP 6 /* fcn code for setpgrp */ # 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 */ # define SUSPEND -998 /* used in interrupts when tty has no data */
#ifdef AM_KERNEL #ifdef AM_KERNEL
@ -21,9 +21,9 @@
#ifdef AMOEBA #ifdef AMOEBA
/* there are AM_NTASK copies of the amoeba kernel task. /* 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 * 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 AM_NTASKS 4 /* number of kernel tasks of this class */
#define AMINT_CLASS (TTY+1) /* Amoeba event handler */ #define AMINT_CLASS (TTY+1) /* Amoeba event handler */
@ -37,36 +37,41 @@
# define AM_PUTSIG 9 /* when the luser hits the DEL ! */ # define AM_PUTSIG 9 /* when the luser hits the DEL ! */
# define AM_TASK_DIED 10 /* sent if task died during a transaction */ # define AM_TASK_DIED 10 /* sent if task died during a transaction */
#else #else /* if AMOEBA not defined */
#define AMOEBA_CLASS TTY #define AMOEBA_CLASS TTY
#endif AMOEBA #endif /* AMOEBA */
/* /*
** New class definitions should go here and should be defined relative * New class definitions should go here and should be defined relative
** to AMOEBA_CLASS (ie. as AMOEBA_CLASS+n, for the nth task added). * 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 */ #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 WINCHESTER -6 /* winchester (hard) disk class */
#define FLOPPY -5 /* floppy 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_READ 3 /* fcn code to DISK (must equal TTY_READ) */
# define DISK_WRITE 4 /* fcn code to DISK (must equal TTY_WRITE) */ # define DISK_WRITE 4 /* fcn code to DISK (must equal TTY_WRITE) */
# define DISK_IOCTL 5 /* fcn code for setting up RAM disk */ # 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 MEM -4 /* /dev/ram, /dev/(k)mem and /dev/null class */
# define RAM_DEV 0 /* minor device for /dev/ram */ # define RAM_DEV 0 /* minor device for /dev/ram */
# define MEM_DEV 1 /* minor device for /dev/mem */ # define MEM_DEV 1 /* minor device for /dev/mem */
# define KMEM_DEV 2 /* minor device for /dev/kmem */ # define KMEM_DEV 2 /* minor device for /dev/kmem */
# define NULL_DEV 3 /* minor device for /dev/null */ # 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 CLOCK -3 /* clock class */
# define SET_ALARM 1 /* fcn code to CLOCK, set up alarm */ # 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 GET_TIME 3 /* fcn code to CLOCK, get real time */
# define SET_TIME 4 /* fcn code to CLOCK, set real time */ # define SET_TIME 4 /* fcn code to CLOCK, set real time */
# define REAL_TIME 1 /* reply from CLOCK: here is 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_ABORT 9 /* fcn code for sys_abort() */
# define SYS_FRESH 10 /* fcn code for sys_fresh() (Atari only) */ # define SYS_FRESH 10 /* fcn code for sys_fresh() (Atari only) */
# define SYS_KILL 11 /* fcn code for sys_kill(proc, sig) */ # 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. */ /* Names of message fields for messages to CLOCK task. */
#define DELTA_TICKS m6_l1 /* alarm interval in clock ticks */ #define DELTA_TICKS m6_l1 /* alarm interval in clock ticks */
@ -102,7 +111,6 @@
/* Names of message fields for messages to TTY task. */ /* Names of message fields for messages to TTY task. */
#define TTY_LINE m2_i1 /* message parameter: terminal line */ #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_REQUEST m2_i3 /* message parameter: ioctl request code */
#define TTY_SPEK m2_l1 /* message parameter: ioctl speed, erasing */ #define TTY_SPEK m2_l1 /* message parameter: ioctl speed, erasing */
#define TTY_FLAGS m2_l2 /* message parameter: ioctl tty mode */ #define TTY_FLAGS m2_l2 /* message parameter: ioctl tty mode */
@ -140,15 +148,19 @@
#ifdef AMOEBA #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_OP m2_i1 /* one of the above operators */
#define AM_PROC_NR m2_i2 /* process # of proc doing operation */ #define AM_PROC_NR m2_i2 /* process # of proc doing operation */
#define AM_COUNT m2_i3 /* size of buffer for operation */ #define AM_COUNT m2_i3 /* size of buffer for operation */
#define AM_ADDRESS m2_p1 /* address 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_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 */ #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 */ #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 /* Copyright (C) 1990 by Prentice-Hall, Inc. Permission is hereby granted
* private individuals and educational institutions to modify and * to redistribute the binary and source programs of this system for
* redistribute the binary and source programs of this system to other * educational or research purposes. For other use, written permission from
* private individuals and educational institutions for educational and * Prentice-Hall is required.
* 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.
*/ */
#ifndef i8088
#ifndef ATARI_ST
#error Either i8088 or ATARI ST must be defined
#endif
#endif
#define EXTERN extern /* used in *.h files */ #define EXTERN extern /* used in *.h files */
#define PRIVATE static /* PRIVATE x limits the scope of x */ #define PRIVATE static /* PRIVATE x limits the scope of x */
#define PUBLIC /* PUBLIC is the opposite of PRIVATE */ #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 TRUE 1 /* used for turning integers into Booleans */
#define FALSE 0 /* 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 HZ 60 /* clock freq (software settable on IBM-PC) */
#define BLOCK_SIZE 1024 /* # bytes in a disk block */ #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 MAJOR 8 /* major device = (dev>>MAJOR) & 0377 */
#define MINOR 0 /* minor device = (dev>>MINOR) & 0377 */ #define MINOR 0 /* minor device = (dev>>MINOR) & 0377 */
#ifdef AM_KERNEL #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 #else
#define NR_TASKS 8 /* number of tasks in the transfer vector */ #define NR_TASKS 9 /* number of tasks in the transfer vector */
#endif #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 NR_SEGS 3 /* # segments per process */
#define T 0 /* proc[i].mem_map[T] is for text */ #define T 0 /* proc[i].mem_map[T] is for text */
#define D 1 /* proc[i].mem_map[D] is for data */ #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 */ #define MAX_P_LONG 2147483647 /* maximum positive long, i.e. 2**31 - 1 */
/* Memory is allocated in clicks. */ /* Memory is allocated in clicks. */
#ifdef i8088 #if (CHIP == INTEL) || (CHIP == M68000)
#define CLICK_SIZE 0020 /* unit in which memory is allocated */
#define CLICK_SHIFT 4 /* log2 of CLICK_SIZE */
#endif
#ifdef ATARI_ST
#define CLICK_SIZE 256 /* unit in which memory is allocated */ #define CLICK_SIZE 256 /* unit in which memory is allocated */
#define CLICK_SHIFT 8 /* log2 of CLICK_SIZE */ #define CLICK_SHIFT 8 /* log2 of CLICK_SIZE */
#endif #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 */ /* Process numbers of some important processes */
#define MM_PROC_NR 0 /* process number of memory manager */ #define MM_PROC_NR 0 /* process number of memory manager */
#define FS_PROC_NR 1 /* process number of file system */ #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 FROM_USER 1 /* flag telling to copy from user to fs */
#define READING 0 /* copy data to user */ #define READING 0 /* copy data to user */
#define WRITING 1 /* copy data from user */ #define WRITING 1 /* copy data from user */
#ifndef ATARI_ST
#if (MACHINE != ATARI)
#define ABS -999 /* this process means absolute memory */ #define ABS -999 /* this process means absolute memory */
#endif #endif
@ -72,13 +69,7 @@
#define NIL_PTR (char *) 0 /* generally useful expression */ #define NIL_PTR (char *) 0 /* generally useful expression */
#define NO_NUM 0x8000 /* used as numerical argument to panic() */ #define NO_NUM 0x8000 /* used as numerical argument to panic() */
#define MAX_PATH 128 /* max length of path names */ #define SIG_PUSH_BYTES (4*sizeof(int)) /* how many bytes pushed by signal */
#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 */
/* Flag bits for i_mode in the inode. */ /* Flag bits for i_mode in the inode. */
#define I_TYPE 0170000 /* this field gives inode type */ #define I_TYPE 0170000 /* this field gives inode type */
@ -86,8 +77,9 @@
#define I_BLOCK_SPECIAL 0060000 /* block special file */ #define I_BLOCK_SPECIAL 0060000 /* block special file */
#define I_DIRECTORY 0040000 /* file is a directory */ #define I_DIRECTORY 0040000 /* file is a directory */
#define I_CHAR_SPECIAL 0020000 /* character special file */ #define I_CHAR_SPECIAL 0020000 /* character special file */
#define I_SET_UID_BIT 0004000 /* set effective uid on exec */ #define I_NAMED_PIPE 0010000 /* named pipe (FIFO) */
#define I_SET_GID_BIT 0002000 /* set effective gid on exec */ #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 ALL_MODES 0006777 /* all bits for user, group and others */
#define RWX_MODES 0000777 /* mode bits for RWX only */ #define RWX_MODES 0000777 /* mode bits for RWX only */
#define R_BIT 0000004 /* Rwx protection bit */ #define R_BIT 0000004 /* Rwx protection bit */

View file

@ -1,44 +1,36 @@
#ifndef _TYPE_H
#define _TYPE_H
/* Macros */ /* Macros */
#define MAX(a,b) (a > b ? a : b) #define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) (a < b ? a : b) #define MIN(a,b) ((a) < (b) ? (a) : (b))
/* Type definitions */ /* 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 */ 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 */ 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 */ then also unshort, else long */
typedef long zone_type; /* zone size */ 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 */ #if (CHIP == INTEL)
#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
typedef unsigned vir_bytes; /* virtual addresses and lengths in bytes */ typedef unsigned vir_bytes; /* virtual addresses and lengths in bytes */
#endif #endif
#ifdef ATARI_ST
#if (CHIP == M68000)
typedef long vir_bytes; /* virtual addresses and lengths in bytes */ typedef long vir_bytes; /* virtual addresses and lengths in bytes */
#endif #endif
typedef unsigned vir_clicks; /* virtual addresses and lengths in clicks */ typedef unsigned vir_clicks; /* virtual addresses and lengths in clicks */
typedef long phys_bytes; /* physical addresses and lengths in bytes */ typedef long phys_bytes; /* physical addresses and lengths in bytes */
typedef unsigned phys_clicks; /* physical addresses and lengths in clicks */ typedef unsigned phys_clicks; /* physical addresses and lengths in clicks */
@ -55,7 +47,11 @@ 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 {int m3i1, m3i2; char *m3p1; char m3ca1[M3_STRING];} mess_3;
typedef struct {long m4l1, m4l2, m4l3, m4l4;} mess_4; 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 {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 { typedef struct {
int m_source; /* who sent the message */ int m_source; /* who sent the message */
@ -128,3 +124,11 @@ struct copy_info { /* used by sys_copy(src, dst, bytes) */
vir_bytes cp_dst_vir; vir_bytes cp_dst_vir;
vir_bytes cp_bytes; 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 */