Short list of differences between 2.0 and 2.0.4: - The ability to run Minix under DOS. - New and improved network task. More stable then the old inet, and allows for user-space serial IP (PPP). ("Allows for" means that only a simple SLIP daemon is supplied. Look for PPP elsewhere.) - Network configuration changed from behind the times RARP to modern DHCP, see boot(8). - Disk like devices (/dev/hd*, cd*, sd*) changed to generic controller names (/dev/c0d*, /dev/c1d*, etc.). Read controller(4) for the gory details. Example: /dev/c0d0p1s0 is now what used to be /dev/hd2a! (It may not seem like it, but this is a simplification.) - The 4 gigabyte disk limit has been replaced by a 2 terabyte limit. (IDE disks still limited to 128G though. Individual partitions also still limited to 4G.) - The Minix /bin/sh is replaced by the BSD shell (formerly /usr/bin/ash.) Makes life easier (always line editing), but is also more memory hungry, which is why we have: - A simple form of swapping that may make life on really old crates bearable. (Alas it isn't good enough to counter the memory need of the BSD shell, so 2.0.3 and 2.0.4 need more than 640K in 16-bit mode. This will be fixed in a next version, really.) - Console driver lines/columns is no longer fixed at 80x25. (See boot monitor's 'console' variable.) - The 'cc' driver now does separate I&D by default. You need 'cc -com' to get common I&D binaries. (Only the bootstraps really need this.) - Its now enough to use 'cc -D_MINIX' to have all POSIX, common UNIX and Minix extensions defined. (One used to use -D_MINIX -D_POSIX_SOURCE). - In 16-bit mode, what used to be 'cc -m' is now the default. The new 'cc -m' behaviour is to change C code to K&R style before passing it to the C compiler to reduce memory use even further. - Support in MM for #! to name the interpreter in scripts. Random scripts are no longer seen as shell scripts, #!/bin/sh is required. - Startup scripts (/etc/rc, /usr/etc/rc) rewritten. Single user mode (boot -s) to interrupt the boot process and do repairs. Daily cleanup scripts that are run each night from cron, not just at reboot. Minix can now run continuously. (Ignoring the little fact that the clock tick counter will overflow in 414 days.) - The monitor has a new 'off' command that turns ATX machines off. (Try 'shutdown -x off'.) Short list of changes in commands: - pc, m2: Pascal and Modula-2 compilers. - readclock -w: Write the current time into the CMOS clock. readclock -2: Add 20 years to compensate for a clock with a Y2K bug. - Several old, useless or minix-only commands removed. Short list of changes in manual pages: - New: pc(1), m2(1), env(1), uptime(1), xargs(1), crontab(1), rdate(1), rget(1), regex(3), dosd(4), ACK(7), cron(8), config(8), dosminix(8), serial-ip(8), slip(8). - Changed: cc(1), rhosts(5), installation manuals. Important kernel changes in 2.0.4 needing clarification: Two changes in the kernel may be a stumbling block for the innocent reader trying to make sense of the 2.0.4 code with the 2.0 based book in hand. One change is the share interrupt code needed for PCI, and the other change is the more sophisticated timer code that makes life easier within a driver. The interrupt handlers used to be a simple array of function pointers indexed by the IRQ. PCI requires shared interrupts, which means that more than one handler may be called on an interrupt. So we have to keep a list of several handlers, and we have to keep track of which handler declares the interrupt to be "handled". Only if all handlers say that the interrupt has been fully serviced can the IRQ be reenabled. Each IRQ now has a list of little "IRQ hooks". An IRQ hook is a small struct containing the following data: A pointer to the next hook to form a list of handlers for the IRQ, a pointer to the function that handles the interrupt, the IRQ number, and an ID bit. When a hook is registered for an IRQ it gets a unique ID bit. An array irq_actids[] contains the set of ID bits per IRQ that are still active, i.e. the handler has not yet declared the interrupt to be fully handled. Only if irq_actids[irq] == 0 is the IRQ reenabled. The functions enable_irq() and disable_irq() now work on hooks instead of IRQs, clear or set the ID bit of that hook, and make sure that the IRQ is masked if irq_actids[irq] is nonzero. The interrupt handler functions withing the drivers haven't changed much, they still return true if the interrupt has been fully handled. The only difference is that they must allow to be called when there's nothing going on, because another device using the same IRQ has triggered an interrupt. The other big change is the timer code. There used to be one kind of timer: You send a message to the clock task asking for a handler to be called by the clock task (!) at a certain time. This setup is a bit odd, because to start a timer you have to send a high level message, but calling the handler was done using a low level function call from the clock task. Timers happen to be started very often, some drivers start one on any operation if the device may choke on it. Most of the time the handlers have nothing to do, because devices usually do as they're told. Also a driver may handle more than one device, so it needs more than one timer. The new timer code makes starting timers cheap, allows a task to have as many timers as it wants, allows handlers to be run by the clock task (asynchronous), or allows the handlers to be run by any other task (synchronous). The technique used for these timers is the same as for the shared IRQs. A timer is a small lump of data that can be linked in lists, and functions for starting, stopping and handling timers all work on this bit of data. In this case the function interface is a better description than the contents of timer.h (see kernel/type.h for that). void tmr_settimer(timer_t *tp, int task, clock_t exp_time, tmr_func_t fp); Activates a timer to run function 'fp' at time 'exp_time'. The timer is owned and handled by the given task. The timer is added to a list maintained by the clock. If it expires then it is added to a list of expired timers for the task that owns it. If that task is the clock then the handlers are immediately run, otherwise an interrupt message is sent to the owning task. void tmr_clrtimer(timer_t *tp) Remove the timer from the active and expired timer lists, disabling it. This is done if the timer is no longer needed, or more often by tmr_settimer if a timer is set to a different time. (One often doesn't bother to stop a timer if the handler can tell that its no longer needed.) void tmr_exptimers(void) Runs the handlers of all the expired timers of the current task. The clock task runs this function if any timer expires, and a task should call it on an interrupt message if it owns timers. This call is often prefixed by a quick test to see if there are any expired timers, but that's only an optimization to avoid a call. Each timer structure may carry a int or a pointer that can be used later by the handler. A good example of the use of these timers is the floppy driver. It has one timer per floppy to turn the motor off, and a global timer for floppy spinup or to time out an operation. Search for 'tmr_' in the code to find the uses. (The floppy is also a good example for why the new timers were needed. After adding timeouts on any operation the messages to the clock task took so much time that slower machines could no longer keep up with the floppy and degraded to one sector per revolution...) The timers for the alarm() system call and the timers for the asynchronous task have also been changed into using the new timer code. The old code had separate code for these two that had to be tested separately on any clock tick. Now it's all one type of timer. (The synchronous alarm task is now more comment than code.) Long list of differences between 2.0 and 2.0.4: (Warning: This list is riddled with lame jokes and other silly things that happen to sneak in when doing something as boring as compiling this list.) include/ansi.h Sets _POSIX_SOURCE if _MINIX is set. This means that just 'cc -D_MINIX' is enough to also add posix support. (Makes no sense without anyway.) include/configfile.h New header file for the common configuration file format. include/dirent.h Include by itself. This fixes the bug that required to be included before most things in C source files. Many other standard include files also do this, but I won't bore you by mentioning them here. include/errno.h Unused internal errors E_BAD_SRC and E_NO_MESSAGE removed. include/ibm/cmos.h include/ibm/portio.h Definitions for the CMOS clock and IBM port I/O routines. The I/O routines should have the same names as those used within the Linux kernel and most of them are also seen in *BSD if I'm not mistaken. The kernel now uses these routines instead of in_byte() etc. The new naming is more regular instead of that of the old "add em when we need em" routines. include/ibm/int86.h Defines 'union reg86', a type used to carry register values for interrupt calls. Used by the BIOS and DOS drivers, and by the experimental user mode BIOS calls. include/ibm/partition.h Unused older Minix partition type removed. include/minix/boot.h Removed. MM and FS use a new system call to get boot parameters, a call that can also be used from user space (see svrctl and sysenv). include/minix/callnr.h New svrctl system call, an ioctl like call for servers and tasks. Is used to implement small stuff for which a full blown system call is too much honour. include/minix/com.h One task renamed (DL_ETH -> DP8390) and several changed from specific names (CDROM, SCSI, WINCHESTER) to a generic controller name (CTRLR(n)). The OPTIONAL_IO attribute is replaced by DEV_SCATTER and DEV_GATHER device codes to write to or read from an array of blocks. Appearance of the DOSDSK and RTL8139 tasks. FUNC_TO_CALL removed with the old timer code. include/minix/config.h Release and version number changed from 3 digits to just 2. With one release every so many years we don't need three levels. ROBUST setting removed, because it is the opposite of robustness. NR_CTRLRS added, specifying the number of controller tasks. ENABLE_NETWORKING removed. The inet server is no longer part of the kernel image. It is optionally started later as a program. ENABLE_ATAPI added for the ATAPI (CDROM) support in the AT/IDE driver. Cosmetic change of "ADAPTEC" in "AHA1540" in this and several other files. Added ENABLE_FATFILE and ENABLE_DOSFILE for two "file as disk" drivers. ENABLE_DP8390 is a new master switch for the network drivers based on the DP8390 chip. Code for specific cards can be turned on with ENABLE_WDETH, ENABLE_NE2000, and ENABLE_3C503. Atari and shadowing code removed. It's not used, so I can't maintain it working with respect to other changes. Release and version numbering changed back to 3 digits. ENABLE_SWAP added to turn the swapping code on. (Not that you want it off, because memory starved machines need it and memory rich machines don't care. It's just something to label the swapping code with.) Added ENABLE_PCI to enable PCI support for drivers that need it. Added ENABLE_RTL8139 for the new Realtek 8139 100 Mbit ethernet card. NR_RS_LINES can now go to 4. (Shared IRQs made that possible.) include/minix/const.h Copyright changed to tell you that /usr/src/LICENSE contains the new BSD style license. "Do what you want with this, but don't mention us, and don't blame us for anything" is what us normal people think the lawyers are saying there. CLICK_SIZE increased from 256 to 1024 to make swapping to disk more efficient. Has the side effect of increasing the maximum addressable memory in 16-bit protected mode to 64 MB. (You need 512 processes of 128K to reach that amount. The process tables can't possibly be that big.) include/minix/ioctl.h Contains helper macros and the definition of ioctl(). Used by the many <*/ioc_*.h> include files that has split into. include/minix/partition.h Partition base and size are now u64_t, a structure posing as a 64 bit number. include/minix/swap.h Describes the header used on swap files/partitions. include/minix/u64.h A buch of routines for 64 bit operations. There is no 'long long', so we have to make do with this. include/net/ Complete overhaul for the new network task. include/regex.h POSIX regex library header file. include/regexp.h Names prefixed by _v8_ to keep them from clashing with the POSIX version. include/signal.h SIGCHLD signal (child terminated) added to the supported set. _NSIG raised from 16 to 17. include/stdio.h Added snprintf() and vsnprintf() to help code to combat buffer overflows. include/string.h Added strncasecmp() and strnlen(). include/sys/ioc_disk.h include/sys/ioc_memory.h include/sys/ioc_scsi.h include/sys/ioc_sound.h include/sys/ioc_tape.h include/sys/ioc_tty.h What has been split into. include/sys/ioctl.h Some new calls for the network task. New calls for user mode BIOS calls and manipulating LDT entries (memory mapping.) Mitsumi CD-ROM ioctls removed. Changed to include and all <*/ioc_*.h>. Code using sees no difference. Minix specific code may choose to only include those among <*/ioc_*.h> that it really needs. Mostly to reduce memory needed by the preprocessor, but also for data hiding reasons. (Only use the minimum you need.) include/sys/svrctl.h New svrctl for odd system calls: Calls for a program to sign on as a server (inet), swapon/off, get boot parameter. include/sys/types.h New u64_t type defined as a struct of two u32_t's. Number of links type nlink_t changed to a short so that more than 127 links can be made on a V2 file system, something it supported all along, but FS didn't offer it. src/LICENSE Removed: "Free for educational use" license. Added: "Free for any use" BSD style license. src/Makefile You can now make 'world', 'libraries', 'all', and 'install'. Just type 'make' to see what each does. src/boot/ Edparams command merged into boot.c, block caching removed to reduce complexity, simply "one command" functions don't need {}, 'memsize' and 'emssize' removed in favour of 'memory', new 'leader' and 'trailer' functions to print greeting messages. A20 enable/disable code in boothead.s has special code for PS/2 machines. Bootblock no longer fiddles with the floppy parameters. Really old crates that expect this no longer boot without a workaround. New systems that do not expect this now work. Sit in a HLT to save power while doing nothing. Use new BIOS calls to break the old 8G BIOS barrier. Limit now 2T. BOOT.COM and MKFILE.COM code ported from Minix-vmd. Extboot code replaced by more generic jumpboot bootstrap. Knowledge of controller style devices added, while remaining backwards compatible to I don't know when. New 'off' command to turn machines that can do power management off. New 'ctty n' command to duplicate the monitor I/O on serial line . More console modes supported, like 80x34 for instance. src/commands/aal/ Added 'u' flag to make aal more ar compatible. src/commands/ash/ Ash no longer runs any old file as a script if it has executable bits. It leaves this to execve(), and execve only runs scripts that start with #!. Don't turn on -e or -x until .profile is done. src/commands/cron/ New cron backported from Minix-vmd. Has per-user cronjobs and stuff. See cron(8) and crontab(1). src/commands/dhcpd/ New DHCP client/server program. See dhcpd(8) and dhcp.conf(5). Since 2.0.4: Server code has seen and supports more weird clients, client code more resilient against buggy servers. src/commands/ftpd/ Allows clients without reverse DNS. Given up on trying to improve the world on this point. There are worse things. Leave passwd and group file out of chrooted environment to give spammers no names. src/commands/i386/asmconv/ GNU assembly parser added by R. Veldema, but still buggy. Fixes by Will Rose not yet incorporated. (I totally forgot about this until I saw it here while I compiled this list for 2.1.) src/commands/i386/mtools-3.9.7/ New mtools command to operate on FAT file systems to replace the buggy dos{dir,read,write} on 386+ systems with enough memory. Type 'mtools' to see how it works. The manual pages were junk, so the're not added. With -? you can figure it all out. (I really should start a commands/big hierarchy.) src/commands/i86/cc.c ASCII EM parser added to translation tables. "What's that?", you say? ACK translates from high level to an abstract machine, named EM, which in turn is translated to the target machine. The ability to compile ASCII EM code is nice for machine independent libary files written in EM assembly. Made 'cc -m -i' the default. Repaired the irrel pass (-m) to not choke on big functions, and made it able to turn a standard C file to K&R for the new -m flag. src/commands/ibm/ Removed the Mitsumi stuff (cdplay, etc.). src/commands/ibm/loadfont.c Changed to be able to load the appropriate font from a combined font file, a file that contains 8x8, 8x14, and 8x16 dot fonts. Font files in /usr/lib/fonts/ replaced by combined fonts. src/commands/ibm/loadkeys.c Work on /dev/console instead of standard input, which made no sense. src/commands/ibm/part.c Changed to know about controller devices and 64 bit disk offsets. Larger list of major device numbers to know disks from other stuff. Still user-hostile/expert-friendly. src/commands/ibm/partition.c Now able to add a partition to an existing table. Not easy to use alas. src/commands/ibm/readclock.c Revamped to properly set the clock (Philip read a data sheet), and a Y2K kludge to add 20 years to a clock set 20 years back because it can't run in 2000. (Options -w and -2.) Reads a TZ boot variable that tells the timezone of the hardware clock. Use 'TZ=GMT0' and forget about summer and winter time changeovers. (Windows will go bonkers, of course, which is why my Windows systems use the timezone of Casablanca. Windows doesn't know what time it is no matter what timezone you use.) src/commands/make/ An "include" command added to the syntax. Timing problem on fast machines fixed. src/commands/reboot/ Log shutdown messages in /usr/adm/log instead of authlog. (Reduces the number of logfiles to one.) src/commands/rlogind/ Renamed 'rld' to 'rlogind'. Changed for the new .rhosts that allow wildcards and CIDR notation. More secure against DNS trickery. src/commands/scripts/DESCRIBE.sh src/commands/scripts/MAKEDEV.sh Code to describe/create new ethernet and controller devices added. src/commands/scripts/cd.sh A script for all the commands builtin to the shell. Simply lets the shell do the work. Thanks to the new #! stuff in MM this can work. Does [, cd, command, echo, expr, false, getopts, read, test, true, umask, and wait. Does away with any C code for same. src/commands/scripts/clear.sh Short for 'tget -str cl'. Replaces clr.c thanks to #!. commands/scripts/mkdist.sh Changed a bit so that Minix-vmd can call it. Can now build distributions under Minix-vmd of a Minix system mounted by it. src/commands/sh/ Old Minix shell. Now installed as /usr/bin/msh. src/commands/simple/at.c Still puts an at job in /usr/spool/at/, but alerts cron to this instead of letting the now dead atrun command run the job. src/commands/simple/atrun.c Removed. Cron now keeps track of and runs at jobs. src/commands/simple/cat.c Proper option processing, proper error messages. src/commands/simple/cleantmp.c New command to carefully clean out /tmp directories. src/commands/simple/cp.c Uses a temp file for hard link administration so that it no longer blows up trying to keep track of too many hard links. Some mistakes in 'clone -s' fixed. src/commands/simple/crc.c Use strerror() to print a meaningful error message instead of just "cannot open". Not a very spectacular change, but I wanted to pay attention to this, as many programmers still have lousy error reporting in their code. src/commands/simple/date.c Added a bit of silliness in the form of a -S flag. It gives the time as "eternal september". September used to be the time that new, uneducated, college students learned about the net. With the start of Prodigy and AOL close to september 1993 some say that that month never ended. It's Sun Sep 2805 17:28:16 CEST 1993 when I write this. :-) src/commands/simple/df.c Replaced by the Minix-vmd version that has many more options, including POSIX mandated 'df -P'. src/commands/simple/ed.c Added 'ed -s' as a synonym for 'ed -'. Fixed a bug with character classes that went unnoticed for an amazing time. (Using two regular expressions went bad on the second.) src/commands/simple/env.c New environment manipulation command. Not very useful, but POSIX mandates it. Useful for one thing though, #!/usr/bin/env perl at the top of a script does a PATH search for perl! src/commands/simple/fsck.c "Huge directory" warnings removed. Directories really can get big. Errors with overflows on filesystems with exactly 65535 inodes fixed. LINK_MAX changed to SHRT_MAX to allow for more links on a V2 file system. (LINK_MAX has to advertise the smaller V1 maximum.) src/commands/simple/fsck1.c LINK_MAX replaced by CHAR_MAX just in case... src/commands/simple/getty.c Run a shell on the console if you can't execute login. Shrunk to the bare minimum by removing the useless suspend/resume signals. src/commands/simple/grep.c Grep fix to work properly as grep and also as egrep. I believe Michael Haardt gave me the patches. src/commands/simple/hostaddr.c Changed to use data gathered by DHCP. src/commands/simple/intr.c Used in /etc/rc to connect a program back to the console, because /etc/rc is now run completely disconnected to keep programs from having a process group and dying when /etc/rc is done. src/commands/simple/id.c Merged with the Minix-vmd version, no difference in function. src/commands/simple/in.rshd.c Like in.rlogind changed for the improved .rhosts. src/commands/simple/irdpd.c Old "look for a router" daemon. Still available for odd cases, but replaced by DHCP normally. src/commands/simple/isoread.c Fixed by Al Woodhull so that it now actually works. Added a new -B command to print byte offsets and lengths of a file on a CD. Useful to build a Minix partition table on an ISO image that points into disk images on that CD. Helpful to create a bootable CD. src/commands/simple/kill.c You can now use 'kill -HUP' instead of 'kill -1'. See signal list in sigaction(2). src/commands/simple/last.c Show time since boot if called as "uptime". src/commands/simple/login.c Can now print a welcome banner for in.telnetd. src/commands/simple/look.c Replaced by the Minix-vmd version, same function. src/commands/simple/lpd.c Small changes in special character handling. Still too stupid to be useful. src/commands/simple/ls.c The -T option shows time to the second. -D (formerly -T) sorts by file type. -h shows sizes abbreviated. This is a halfbaked ls, whole alphabet still far from fully used as option letters. src/commands/simple/mail.c Added -s option by Al Woodhull. Cron needs it send send mail to a user if a cron job produces output. src/commands/simple/man.c Aren't you happy to know that it now also handles Solaris 8 manual pages? src/commands/simple/mkdir.c Allows you to write 'mkdir -m 755' too. The -m option used to only do symbolic modes, as if anyone can remember how. src/commands/simple/mkswap.c New command to initialize swap partitions or files as such. src/commands/simple/mount.c src/commands/simple/umount.c Let mount and umount turn on/off swapping with -s. src/commands/simple/nonamed.c Use the name daemons found by DHCP for information. Added a cache to make it useful for offline use. src/commands/simple/pr_routes.c Shows interface device names instead of their IP addresses, and shows destinations in CIDR notation. One route fits on one line now. src/commands/simple/printf.c New command that is works like the printf() library function. It's a new echo that doesn't suffer from BSD vs SystemV incompatibilities. (Under SystemV the behaviour of 'echo -e' is the default.) src/commands/simple/rarpd.c Dumbed down to be a pure RARP daemon. It used to configure the network devices, but that is now dhcpd's job. src/commands/simple/rdate.c Gets the time from a remote machine and sets the local clock. src/commands/simple/rget.c The rget and rput command pair implement a kind of pipe across a network. Used a lot by yours truly. src/commands/simple/slip.c Implementation of the SLIP protocol, but no header compression. Merely an example of Pseudo IP network device programming. Real PPP programs can be obtained at the other side of the world. src/commands/simple/stat.c New command that is the shell level equivalent of the stat(2) system call. src/commands/simple/stty.c Taught about pixel sizes, mostly useful to guess the console font size. src/commands/simple/sysenv.c New command to show the boot environment with the help of the svrctl(2) system call. Just type 'sysenv'. src/commands/simple/tcpd.c Has a normal and a paranoid version. The latter is run if /etc/serv.access exists to enable network access restrictions. No longer wrongly masks SIGCHLD under 2.0.4. src/commands/simple/xargs.c New xargs command obtained from BSD. src/commands/urlget/ New command to get a file from a Web or FTP site. src/etc/hostname.file This and more files added as defaults to fill /etc/ with (mkdist). src/etc/inet.conf New configuration file for inet. Changed under 2.0.4 to use /dev/psip0 as the default. src/etc/profile Timezone now by default GMT instead of CET. (I happen to be in The Netherlands, i.e. the CET timezone. You shouldn't be bothered by that fact.) src/etc/rc Large changes in system startup. /etc/rc now knows a single user mode (boot -s) and calls /usr/etc/rc to do the hard work. (Inspired by Minix-vmd.) src/fs/ The 'dont_reply' variable has been removed. The code now passes the error code "SUSPEND" back up to the main loop, which is treated by FS as "don't send a reply message now, the process is suspended". It's not always mentioned below if { dont_reply = 1; return(0); } is replaced by { return(SUSPEND) }; src/fs/Makefile FS is now needs the -lsys library for calls to the system task. src/fs/cache.c The scatter/gather I/O has been rewritten. It used to use a vector of individual (position, buf, nbytes, read/write) requests. This was too rich for the way it was used. Now a single starting disk position is used, its all reads (GATHER) or all writes (SCATTER) and the vector only describes memory as (address, size) pairs. So one big disk block is read into a bunch of memory blocks, or written from a bunch of memory blocks. (In retrospect the gather = read and scatter = write names should have been reversed. "Gather" just reminds one too much of reading and scatter of writing.) One important point is that the device drivers only need to do the first element of the memory vector, the rest is optional. So a floppy disk driver may stop at the end of a track. The write code in cache.c knows this and will repeat a scatter operation until all the dirty blocks are written out. src/fs/device.c The interface to the devices has been improved. In order to "open" a device one used to do this: major = (dev >> MAJOR) & BYTE; task = dmap[major].dmap_task; dev_mess.m_type = DEV_OPEN; dev_mess.DEVICE = dev; dev_mess.COUNT = R_BIT|W_BIT; (*dmap[major].dmap_open)(task, &dev_mess); r = dev_mess.REP_STATUS; All this tedious code has been replaced by: r = dev_open(dev, FS_PROC_NR, R_BIT|W_BIT); In many places in FS one can find dev_open() and dev_close() replacing the seven line equivalent. The existing dev_io() routine has had its arguments rearranged a bit, but is basically unchanged. (Only the specific "nonblock" flags became a generic "flags" field.) The dev_*() routines use the dmap[] table to interface to a several kinds of devices. Usually its gen_opcl() and gen_io() for generic devices. (Note that separate open and close routines have been mapped to a single opcl.) Some devices require special processing, so there is tty_opcl() for terminals to do "controlling terminal" stuff, ctty_*() for /dev/tty, and clone_opcl() for the TCP/IP server. Ergo: dev_open(), ---> dmap_opcl ---> gen_opcl(), tty_opcl(), dev_close() ctty_opcl(), clone_opcl() dev_io() ---> dmap_io ---> gen_io(), ctty_io() The *_opcl() functions also use dev_io()/dmap_io to pass there request down to the device after doing special open/close processing. (Whether they use dev_io() or dmap_io depends on what is convenient at a given point in the code. Dev_io() builds a message and chooses the proper dmap[] entry, something one may have already done.) src/fs/glo.h Definition of 'dont_reply' removed. src/fs/inode.c Some casts and masks on i_nlinks removed to allow i_nlinks to have a larger value for V2 file systems. src/fs/link.c Links maximum now depends on the file system type. CHAR_MAX or SHRT_MAX is used instead of LINK_MAX. src/fs/main.c Main now uses the new sys_sysctl() call to get boot parameters out of the kernel. (Sys_sysctl() is the kernel interface of the new svrctl() system call.) The old SYS_GBOOT call to get some boot parameters is dead. Variables like ROOT_DEV that aliased boot parameter fields have been renamed to root_dev. A special process ID value PID_SERVER has been invented to mark processes that are or have become a server, like MM, FS and INET. Many examples of the new dev_open() and dev_close() found here. Don't send a reply if the message return code is SUSPEND. src/fs/misc.c Addition of the FS side of the new svrctl() system call. It implements the FSSIGNON call that allows a process to tell FS that it is becoming a server and that it wants to handle a given group of devices in a given way. (I.e. "generic", "as a terminal", "clone on open". The latter is for inet, where each open of a TCP/IP devices causes a new device inode to spring to life for the new TCP/IP connection. Do_reboot() now carefully exits all processes and unmounts all filesystems. This should take care of mysterious bitmap errors that plagued 2.0.3. src/fs/mount.c Unmount code put in an unmount() function that both the umount and reboot system calls can use. src/fs/open.c Pipe administration moved to the proper first two different zone number slots in the in-core inode. Leave last zone number free. Named pipe open code allows for a SUSPEND code out of pipe_open(). This is the only place where removal of dont_reply was a bit tricky, although the result is no less readable. src/fs/pipe.c The totally unused XOPEN code removed. There is a dmap[] call here that I dare not replace by dev_io(). Too strange. Return a SUSPEND code if suspend(XPIPE) is done. src/fs/read.c Unneeded check of rw position against MAX_FILE_POS removed. It caused I/O of more than 4G through character devices to fail. (Many character devices don't even care about the position.) (Found by people doing I/O speed tests. Today's hardware is so ridiculously fast that they ran into the limit in no time.) Follow suspend(XPIPE) with a return(SUSPEND). src/fs/table.c Svrctl call added. Dosdisk table entry added. Open and close dmap[] entries merged into a single opcl field. (They mostly contained the same value already.) The /dev/ip entry is now always unused, but can be claimed by INET later. Reboot system call added, only to be called by MM. src/fs/type.h Types of d1_nlinks and d1_gid changed to u8_t, because they're smaller than the new default set by the V2 file system. src/inet/ Replaced by a much newer version. Stable, two ethernets and two pseudo IP networks for serial IP for instance. For 2.0.3 the startup code was changed to allow the program to start as an ordinary program, to configure itself from /etc/inet.conf and to become a server with a few svrctl() calls. src/kernel/ I/O functions like in_byte, out_byte, in_word, etc, replaced by inb, outb, inw, etc. Use of replaced by as few <*/ioc_*.h> as possible. Milli_{delay,start,elapsed} replaced by micro_* versions that allow more precise polling. These simple changes aren't always noted below. The timer code changes are not always mentioned except for their first occurrence. src/kernel/3c503.[ch] Code and definitions for the 3C503 network adapter by G. Falzoni. src/kernel/aha1540.c The file aha_scsi.c is renamed to aha1540.c to better reflect the type of card. Useful if someone with lots of time writes a 2940 driver, so they won't clash in name. src/kernel/*_wini.c Each of the disk drivers can be tied to any of up to four controller tasks through the boot monitor (c0=at, etc). To make this possible the task number is no longer hardcoded. The schedule/finish routines have been replaced by a single transfer function. The abstraction went too far. The schedule function usually did nothing but recode the I/O vector in a different structure (struct trans) and hand it over to finish. Now this is all done by transfer(). (Pity this schedule/finish mistake has been immortalized in the second book. That's the problem with such major mistakes, they never really go away.) The transfer function now has to work with the simplyfied I/O vector. This makes these questions unnecessary: "Byte positions still consecutive?", "I/O direction still the same?", "Is this part of the vector optional?" 64-bit byte position computations. Common code like this: block = (w_dv->dv_base + pos) >> SECTOR_SHIFT; Has due to the lack of a built-in 64-bit type been replaced by this: block = div64u(add64ul(w_dv->dv_base, position), SECTOR_SIZE); See the int64(3) manual page for a list of these 64 bit routines. src/kernel/at_wini.c Addition of ATAPI CD-ROM code by Michael Temari. (His changes were fairly benign. Blame me for the huge differences.) The port_read() and _write() functions are renamed to phys_insw() and _outsw(). There are also plain insw() and outsw() that move data to the local address space, the phys_*() are special versions for kernel use that move data to or from absolute memory addresses. Sort of like the difference between memcpy() and phys_copy(). Timer code changed from: clock_mess(WAKEUP, w_timeout); To: tmr_settimer(&w_tmr_timeout, CLOCK, get_uptime() + WAKEUP, w_timeout); (Start an asynchronous timer with data in w_tmr_timeout, WAKEUP ticks from now to call function w_timeout().) src/kernel/bios_wini.c Old bios13 calls removed in favour of the newer, more generic, int86 call. (Drivers can now make any BIOS call they want.) This driver is still the most easily understood of all drivers. Read it first if you want to study disk drivers. 2.0.4 fixes an obscure bug in the use of 'al'. src/kernel/clock.c Old timer value returned by alarm(2) rounded up to the nearest second. Alarm should never return 0 if the timer is still running. Next_alarm, watch_dog[], sys_table[] all gone in favour of a single list of timers under 'timers' and a single list of user process alarms in tmr_alarm[]. The one global message 'mc' is moved to clock_task() as a local variable and the do_xxx functions that need it now take a message pointer. Data hiding, limited scope, and all that. Do_clocktick() only cares about one list of timers now, sees which ones have expired, moves those to p_exptimers of the owning process and runs tmr_exptimers on the timers that are owned by CLOCK itself. Tmr_inittimer(), a macro, initializes a new timer variable, but this is not necessary on a timer in global storage, so it's hardy ever used. Tmr_settimer() clears a timer if running and then starts it to expire at a certain time. Tmr_clrtimer() stops a timer. Tmr_exptimers() runs all functions of the expired timers on the p_exptimers list of the current process. A common variable in the timer code is 'atp', or "alias to a timer pointer" that is set so that '*atp' aliases the first pointer in a timer list {atp = &p->p_exptimers;}, moved to alias the next timer in the list {atp = &(*atp)->tmr_next;}, used to cut out a timer {*atp = (*atp)->tmr_next;}, or to insert a timer {tp->tmr_next = *atp; *atp = tp;}. That's easier than walking a list with a prev_ptr in tow. Really. The do_setalarm and do_setsynalarm functions have been merged into one function that schedules the cause_alarm or cause_synalarm to be called by either the CLOCK or the SYN_ALRM_TASK. The timers used for this are found in the tmr_alarm[] array for each process. Cause_alarm() uses cause_sig() to have a SIGALRM be sent to the process that wants it. Cause_synalarm() sends a CLOCK_INT message to the calling process, which is usually a server like INET. The syn_alrm_task()'s only job is to expire timers. All the milli_xxx functions have been replaced by micro_xxx functions that only differ in the factor 1000 implied by the name. Some drivers need more precise timing. A milli_delay(n) macro that calls micro_delay(1000*(n)) keeps us from having to update too much code. Note the last few lines at the end of micro_elapsed(), avoiding overflow in computations with large numbers can be tricky. These changes cause a few timing constants to be 1000 times bigger in several drivers. src/kernel/console.c Screen dimensions (rows/columns) now variable and obtained from the BIOS tables. This makes it possible to run the console in 132x43 if the video card permits. Reverse video bug fixed. Report screen pixel sizes in termios struct. src/kernel/const.h IRQ vectors renumbered to 0x50 (more or less free) and 0x70 (same as BIOS). This does not upset DOS. Unused INIT_SP macro removed. A leftover from the time when MM, FS and init had to set up their own stack. Lock() and unlock() changed to macros that call intr_disable() and intr_enable() found in . They are mostly used to guard an area of code against interrupts, so the lock/unlock names better describe what they're doing. Or are we hiding their true nature here? A new macro structof() can be used to compute the address of a structure given a pointer to a field within that structure. Used in functions that have a struct with information per device and a timer per device. With structof() we can go from timer pointer to a pointer for the struct with information. Don't worry, it's only used in a few drivers. src/kernel/dosfile.c New driver to see a big DOS file as a Minix disk using DOS file I/O. src/kernel/dp8390.c Allow the DPETHn variables to specify a PCI device, namely the RTL8029 NE2000 clone. src/kernel/driver.c Changes to allow one task to make I/O calls to another task, like dosdisk to at_wini. The do_rdwt and do_vrdwt rewritten to use transfer instead of schedule/finish. The main loop calls tmr_exptimers() and the clock_mess() function is gone. src/kernel/fatfile.c New driver to see a big file on a FAT file system by interpreting a FAT file system directly to find the blocks of a file. src/kernel/floppy.c Loose arrays carrying floppy parameters merged into one array of structs. Some parameters (like start times, head settle times) increased a bit after observing reference manual. (Not that the old parameters ever seemed to be a problem.) Series of fdc_out() calls replaced by a single fdc_command() with better checking. After changing the floppy parameters to "better" number for 2.0.3 that came directly out of some spec sheet the numbers are now back to what they were and what actually works. If it works, don't fix it. Thanks to Mike Haertel the floppy driver works again on an original IBM PC/AT. It's floppy controller didn't like to seek to a cylinder it was already sitting on. Floppy motors are now independently stopped thanks to the new timers. Before there was only one timer, so motors, once started, were kept running until all could be stopped. (This at a time when many PCs don't even have a floppy anymore, let alone more than one.) src/kernel/glo.h The old irq_table[] for one handler per IRQ is replaced by a list of interrupt hook pointers in irq_hooks[] and bitmaps for the active handlers in irq_actids[]. src/kernel/i8259.c As the file with code that interfaces with the i8259 interrupt controller you can expect a few changes for shared interrupts. Get_irq_handler() was never used and spurious_irq() no longer needed, so they're gone. Put_irq_handler() now takes the address of an interrupt hook and chains that hook into a list of hooks for an IRQ. It computes a unique ID bit for that hook, so that the different hooks for the same IRQ can be told apart. A new function intr_handle() is called by the assembly code in mpx*86.s to call each of the handlers in a list of interrupt hooks. It also sets the ID bits in irq_actids[] to show that a handler is busy, and clears an ID bit if the handler returns true. src/kernel/keyboard.c Left and right versions of shift-type keys better kept apart. (One used to be able to press both control keys and release just one to make the system think control was no longer active.) CTLR-ALT-INS has the same effect as CTRL-ALT-DEL for Minix in a Windows window. Lock key state (caps, num and scroll lock) kept per virtual console. Struct kb_s removed, since there is only one keyboard. (Only kb_lines[0] was used, wasting the rest.) Better tracing of ALT keys (CTRL + left-ALT is the same as right-ALT, also know als ALTGR on national keyboards like the German one.) src/kernel/keymaps/italian.src Replaced by keymap supplied by Ernesto Del Prete. src/kernel/keymaps/polish.src Brand new keymap by Antek Sawicki. src/kernel/klib386.s src/kernel/klib88.s BIOS disk I/O function bios13 replaced by more generic int86 interrupt call. A20 enable/disable code in klib88 has special code for PS/2 machines. Video memory code changed to address video memory at vid_seg:vid_off instead of vid_seg:0 to support different ways of handling segments. 16-bit p_cp_mess changed to handle any click size instead of just 256. Both p_cp_mess and p_phys_copy compute full 32 bit physical addresses. All the wrappers for I/O instructions (in_byte, out_byte, etc) are removed in favour of the new ones in the library. Only port_read(), port_write() and their byte versions are still around, but renamed to phys_insb(), etc, that mirror functions like insb() that only work within the address space of one process. There are no 32 bit versions yet. Enable_irq() and disable_irq() now work on hooks and use the active ID bits in irq_actids[] to decide if an interrupt must be masked. src/kernel/main.c Kernel, MM, FS, etc. information now comes from an array of a.out headers supplied by the boot monitor. Available memory comes from the new 'memory' boot variable. This allows Minix to start in an arbitrary location in memory, for instance in the memory that DOS offers as "free". src/kernel/mcd.c Mitsumi CD-ROM driver removed. Not only is it obsolete, I couldn't even test any changes, because the only drive we had has gone missing. src/kernel/memory.c "RAM disk is too big" message changed into "Not enough memory for RAM disk". The old message confused people, although either message is equally right. New user BIOS ioctl added that allows a user process to execute a BIOS call if it doesn't mind being limited to the DMA buffer if it needs memory for the call. New LDT getting and setting ioctl. A user process has two LDT entries that it can set to any range of memory, video memory for instance. src/kernel/misc.c Get free memory list from the 'memory' boot variable. "Shadow RAM" feature removed, current machines don't have shadow RAM under 16M anymore. Env_parse() now allows :,;. as separators, and allows a prefix word if the pattern starts with a *. A prefix word can be tested with the new env_prefix() function, and env_panic() is used when it's all bad. Now one can use DPETH0=pci:0.6.1 to tell the DP8390 driver that one particular RTL8029 card is to be the first ethernet card. (One would normally use DPETH0=pci to select the first available RTL8029.) src/kernel/mpx386.s src/kernel/mpx88.s New feature flag bits: Don't patch any sizes into the kernel, offer generic INT support, pass a memory list, new way to pass monitor code back. The IDLE task executes a HLT instruction to save power. (Keeps my new notebook from turning its fan on. There is nothing like a personal reason to add a feature. It also makes VMWare happy.) The hwint_master() and hwint_slave() macros are changed to support shared interrupts. Instead of calling the single interrupt handler directly they now call intr_handle() that will run through a list of interrupt hooks to call all the handlers for an IRQ. src/kernel/pci.c src/kernel/pci.h src/kernel/pci_amd.h src/kernel/pci_intel.h src/kernel/pci_sis.h src/kernel/pci_table.c src/kernel/pci_via.h Code to walk the PCI device tree. Used to answer this question: Do you have a device with vendor ID and device ID ? Most of the device strings in pci_table() will eventually be removed, once we have a system call that allows a user mode program to query this information. src/kernel/printer.c Printer driver is made optional with an ENABLE_PRINTER switch. Only initialize the printer on the first open(), so that IRQ 7 isn't claimed unless needed. So even when enabled the driver won't mess anything up as long as you don't go near /dev/lp. src/kernel/proc.c src/kernel/proc.h Process type tests changed a bit. The queue could be chosen easily using the new p_priority field that tells if a process is a not there, a task, a server, a user process or the IDLE task. This field allows that a user process can change into a server. The static division on slot number didn't allow this. Almost forgot to mention this detail: All the shadowing code has been removed. It got too difficult to maintain something that is not currently used. In such cases one should not hesitate. A call to ready() was inlined for speed, it has been uninlined, because one little call isn't that expensive. A new field p_exptimers added to struct proc for a list of expired timers. src/kernel/protect.c src/kernel/protect.h Small interrupt vector / segment descriptor initialization changes. Code and data bases moved to the early start code. New phys2seg() routine that translates a physical address to a segment/offset pair in real mode, or a selector/offset pair in protected mode. In 16-bit protected mode the selector must be chosen among 64K segments starting at 0xA0000, 0xB0000, 0xC0000 and 0xD0000. These selectors replace dedicated video and ethernet selectors that also point in the those areas. (Now there doesn't have to be added new selectors if a new task needs a memory area.) In 32-bit protected mode the flat 4G selector is simply used. src/kernel/pty.c It was so simple. Just let ioctls on the pty side have the same effect as ioctls on the tty side and rlogin is able to transmit the window size. Why didn't I figure this out before? Now we are no longer limited to exactly 80x24 windows to log into Minix. (Only Window size changes aren't automatic yet. Needs SIGWINCH.) src/kernel/rs232.c Thanks to X the CLOCAL mode now works properly. The first thing that was done with the new shared interrupts was to raise the allowed number of interrupt lines to 4. (The odd and even numbered COM lines use the same IRQ.) (Still haven't figured out who X is.) src/kernel/rtl8029.c New driver for the Realtek 8029 chipset that implements a 10 Mbit NE2000 clone on a itty bitty PCI card. src/kernel/rtl8139.c src/kernel/rtl8139.h New driver for the 100 Mbit Realtek 8139. Needs to be whacked every now and then when it freezes up, but dirt cheap which is always a good point for people giving an old PC a new life with Minix. src/kernel/start.c Changes to allow for the variable placement of the kernel in memory. Boot parameters structure removed. FS now uses svrctl calls to get boot parameters. src/kernel/system.c Sys_sysctl, the kernel side of the svrctl call added. Sys_puts that allows MM and FS to send console messages instead of bothering the TTY task (no problems anymore with ^S/^Q processing). Sys_findproc that allows a server to find a task by name, like the TCP/IP task that needs DP8390. Lots of small changes in process type tests. Many "can't happen" panics changed into asserts that are compiled out in 16-bit mode. (So 16-bit code is smaller, but runs without checks, or as the comment in assert.h says: "8086 must do without training wheels".) The svrctl calls allow a process to become a server, and implements a getenv() like call for boot parameters. New vir_copy() call to copy bytes from one process' address space to that of another. Saves making umap calls in those places where speed isn't required, and saving a few code bytes always is. src/kernel/table.c Changes in the driver choice code for controllers. Mapdrivers() function added to make those choices. src/kernel/type.h Interface declarations for the int86 routine using a big fat union to be able to access 8086/386 registers in many different ways, i.e. reg86.b.al, reg86.w.al, reg86.l.eax. Struct milli_state renamed to micro_state. New timer and IRQ hook structures defined. src/kernel/wini.c Removed. The disk driver selection code has been generalized and moved to table.c src/lib/Makefile Only make the new regex library if the system isn't a lowly 8086. src/lib/ansi/atoi.c Changed to simply call strtol(). src/lib/ansi/clock.c A lovely bit of portable code brought back to just a call to times(2). src/lib/ansi/malloc.c Malloc changed so that it no longer sets errno to ENOMEM if it succeeds. Should be no problem, except that a common bug in the use of perror() causes "Not enough core" errors to appear instead of the proper error message. src/lib/ansi/misc.c Fixed list of (outdated) time zone information removed. One should use a proper TZ definition. src/lib/dummy/ Creates an empty dummy library that is used as libm.a so that -lm works. (Minix math code is in the C library.) src/lib/editline/ Filename completion (if you hit TAB) changed to understand weird characters in filenames. They are simply quoted with a backslash. src/lib/end/ End label declarations simplified a bit. src/lib/i386/int64/ src/lib/i86/int64/ Assembly routines for 64-bit integers. src/lib/i386/misc/io_*.s src/lib/i86/misc/io_*.s A set of I/O instruction wrappers from io_inb.s to io_outw.s that implement the functions in . Old iolib.s that offered a subset removed. (Why so many little files? So that only the routines you need are compiled into your program.) src/lib/i386/misc/oneC_sum.s src/lib/i86/misc/oneC_sum.s Assembly version of oneC_sum(), the Internet checksum. It speeds up networking quite nicely on not too fast machines. (The problem with fast machines is that you don't notice it at all if your code is rotten. That's why a certain Redmond based company should be forced to develop on 486s.) src/lib/i386/rts/crtso.s src/lib/i86/rts/ncrtso.s The variable '_penviron' is initialized to point to either 'environ' or a hidden variable '_penvp'. *_penviron is then used throughout the library as the environment pointer. Applications can now use (and change) 'environ' as the environment pointer, or stupidly use 'environ' for other things without ill effect. src/lib/i386/rts/m2rtso.s src/lib/i386/rts/prtso.s src/lib/i86/rts/nm2rtso.s src/lib/i86/rts/nprtso.s New Pascal and Modula-2 runtime startoffs. src/lib/i86/em/ Files have em_ prefixed so they don't easily clash with other files with the same name when put in the C library. src/lib/i86/misc/getprocessor.s 286/386 detection code fixed. It used a test that depended on the top bits of a segment descriptor being 0xFF on a 286. Some 386+ machines have this for the GDT. We now use the IDT where this can't happen. src/lib/i86/misc/hton86.s Assembly versions of hton[ls] and ntoh[ls]. Not faster or slower than inlined macros, but saves many bytes of code. src/lib/ip/ Several new and updated network library routines. src/lib/libm2 src/lib/libp New Pascal and Modula-2 library. src/lib/other/_svrctl.c For the new svrctl() system call. src/lib/other/configfile.c New "common config file" interpretation routine. src/lib/other/reg*.c src/lib/other/v8reg*.c Old nonstandard V8 regexp routines files prefixed by v8 to keep them apart from the regex(3) routines. src/lib/posix/_exec*.c New group of exec*() functions all interfacing to the execve() system call. src/lib/posix/_sleep.c A zero second sleep never woke up, now it does nothing as it should. src/lib/regex/ POSIX regular expression routines regex(3). Only available under 32-bit Minix. src/lib/rts/ New machine independent runtime system stuff, currently containing only setjmp.e moved here from the i386 directory. An old i86/setjmp.s has been removed. Hopefully this code will end the spurious "longj err" seen on some old XTs. Make sure you're seated properly before attempting to read setjmp.e. src/lib/syslib/kmalloc.c Small and simple malloc for small things such as the bootstrap. src/lib/syslib/kprintf.c Moved here from the 'other' directory. It is now only put in the -lsys library and only used for low level system code. Simply as printf, not as printk. (So that the printf = prink macros is no longer needed.) src/lib/syslib/putk.c Used by the kernel printf to put characters on the console with a SYS_PUTS call to the SYSTEM task. If that fails then a write() system call is used. The TCP/IP task needs this to be able to print messages before and after it becomes a server. src/mm/ replaced by the appropriate . Swapping code enclosed by ENABLE_SWAP to make the swapping code easily visible. Eventually either the swapping code should be totally removed, or the ENABLE_SWAP should be permanently enabled and the #ifs removed. E_NO_MESSAGE return code to indicate "no answer" replaced by SUSPEND. src/mm/alloc.c Swapping code added. It works by treating swap space as memory that sits above swap_base. Alloc_mem() tries to get memory from a hole below swap_base. If that fails then the swapping code is called to move blocked processes' data spaces away to holes above swap_base. Only processes blocked on MM can be swapped out, and only their data spaces. (Alas this isn't good enough for 640K XTs, so next on the agenda is swapping code spaces of any process. This needs help from the kernel, because the kernel isn't to run those processes.) The max_hole() code is removed, because it was too difficult to figure out what the biggest hole is after swapping everything out that can be swapped out. The exec code that needed it was simply rewritten to immediately use alloc_mem() instead of first testing with max_hole(). This is actually better because splitting the test and the action over two separate calls is a bad style of programming that leads to race conditions and/or security holes. Mem_init() sets the swap_base to one click above the last normal memory click. Swap_on() opens a file through FS to use for swapping. Swap_off() closes the swap file if all currently swapped out processes can be swapped in. Swap_inqueue() puts a process on a queue of processes that must be swapped in as soon as possible because it is now runnable. Swap_in() tries to swap all processes on the inswap queue in. It is called on each turn through the main loop of MM. Swap_out() tries to find a process that is blocked on MM and to swap it out. It returns true if it could find one. Alloc_mem loops over this routine if it can't immediately find a big enough hole. src/mm/exec.c Code added to handle #! for executable scripts. A patch_stack() routine can prepend extra arguments to the argv[] array for optional arguments and the name of the script. This means that if a script that starts with '#!/bin/sh -x' that is called with execle() as '/bin/script script arg1 arg2' (path + argv[]) is executed as '/bin/sh /bin/script -x arg1 arg2'. Call to max_hole() trivially changed into directly calling alloc_mem(). Load_seg() function changed to rw_seg() that can both read and write a segment for use by exec and the swapping code. Returns the proper ENOMEM error code if not enough memory instead of EAGAIN. src/mm/main.c Changes in the memory summary code to accomodate the no longer fixed position of the Minix kernel in memory and the memory list. The single reply message has been changed into one reply message per process in the process table. Processes may have to wait to be swapped in so any reply message has to wait to be sent as well. The 'dont_reply' flag as been removed and replaced by a special error code, E_NO_MESSAGE, that indicates that no reply message must be sent, or has already been sent. "Sent" in this case means having been placed in the outgoing message slot in the process table to be actually sent when possible. Extra reply codes such as 'result2' have been renamed to field names in the per-process reply message. A setreply() function replaced reply() to just set a reply message and if needed move a swapped out process to be inswap queue. At the end of main()'s main loop it tries to swap processes on the inswap queue in and tries to sent pending messages. The SIGCHLD signal is added as a "default ignored" signal. src/mm/misc.c New file for miscellaneous system calls, reboot() and svrctl(). Svrctl() allows a process to do a semi-exit to become a server, or to add or remove swapspace. Reboot code now uses a single tell_fs(REBOOT, ...) to tell FS that the end is near instead of EXIT(INIT), EXIT(MM), SYNC. src/mm/mproc.h The flag name "HANGING" has been renamed to "ZOMBIE", because that is what everyone calls a process that is dead but unwaited for. New flags REPLY (reply message waiting), ONSWAP (data segment swapped out), and SWAPIN (waiting on the inswap queue). src/mm/signal.c Many off by one errors on _NSIG fixed. (_NSIG equals the highest signal number, so (sig <= _NSIG) is the proper test.) Open a core file in nonblocking mode to avoid hanging MM on a named pipe. (Independently found by a few sharpeyed people.) src/mm/utility.c Open a file in nonblocking mode in allowed(). Like above, to not hang on an execve of a named pipe. src/test/ Test code removed due to lack of maintenance. They're more likely now to trigger bugs in their own code than to find bugs in Minix. src/tools/init.c Query 'bootopts' from the boot environments, the flags given on the boot command of the monitor (e.g. 'boot -s'.) These flags are passed to /etc/rc. src/tools/ps.c Changed to allow 'ps -ef' to do the same as 'ps alx'. (System V vs. BSD syntax.) Doubled stack allocation of 'ps'. Kees J. Bot