Added new signal types for kernel events:
- SIGKMESS: new kernel message (sent to TTY, IS, or LOG)
- SIGKSTOP: MINIX is shut down (sent to TTY-> switch to primary console)
- SIGKSIG: kernel signals pending (sent to PM)
System processes can be signaled; signals are transformed in SYS_EVENT message
that passes signal map along. This mechanisms is also used for nonuser signals
like SIGKMESS, SIGKSTOP, SIGKSIG.
Revised comments of many system call handlers. Renamed setpriority to nice.
Removed PM signon for INET. Now daemonized in /usr/etc/rc.
SIGTRAP generated in PM (where it belongs / no longer in kernel).
Updated Makefiles: servers are now installed in /usr/sbin.
New alarm(2) timers mechanism.
Kernel no longer keeps track of user alarms on behalf of the PM.
Instead, the PM maintains its own list of watchdog timers, and
uses one synchronous alarm (at the kernel) to get notifications
for expired user timers.
Renamed various system calls.
Cleaned up system call library.
Added new alert() trap to replace notify() --- current notify will be removed
and alert() will be called notify() later.
Reorganized system call library; uses separate file per call now.
New configuration header file to include/ exclude functionality.
Extracted privileged features from struct proc and create new struct priv.
Renamed various system calls for readability.
Ben Gras [Wed, 13 Jul 2005 14:58:21 +0000 (14:58 +0000)]
Made timeout and no. of errors in at_wini dynamically settable
by ioctl; made catch-all function in driver table also called when
unrecognized ioctl called, so drivers can add their own ioctl codes.
Ben Gras [Wed, 13 Jul 2005 14:46:11 +0000 (14:46 +0000)]
Fixed a bug in kstrncpy() that caused mayhem whenever the buffer to be
copied into was the same size as the source string - it will keep on
filling with zeroes forever. This was a signed/unsigned bug, fixed by
making the kstrncpy argument ssize_t instead of size_t. This bug was
triggered by Chris Young <teddga@earthlink.net>, by dazzling coincedence -
changing OS_VERSION into something with one more character (exactly the
same size as the buffer in the kinfo struct).
Also noticed that the kstrncpy() call didn't null-terminate the strings
if necessary, also fixed.
Ben Gras [Fri, 8 Jul 2005 17:30:01 +0000 (17:30 +0000)]
kernel and servers send diagnostic messages to IS; IS sends them to TTY
and the new log driver if enabled.
new usyslogd is started from /usr/etc/rc. New device created by
MAKEDEV.sh. /var/log created by etc/mtree/minix.tree (on root for
now). Made select() slightly more generic, with less code duplication.
Ben Gras [Fri, 8 Jul 2005 17:23:44 +0000 (17:23 +0000)]
New log driver; buffers messages and makes them available to userland.
Added some fields in the generic device table to support this driver
using libdriver. Updated other drivers to fill these fields with nops
and NULLs.
Ben Gras [Fri, 8 Jul 2005 17:21:50 +0000 (17:21 +0000)]
usyslogd - microsyslogd that has a hard-coded configuration (read from
/dev/klog and write to /var/log/messages). It's written so that more
sources and outputs could be added easily though.
Ben Gras [Mon, 4 Jul 2005 15:20:46 +0000 (15:20 +0000)]
A "fix" for bug no. 2 is to check if the process slot has disappeared.
Not a really good solution (as it might not catch situations in which this
is caused by another bug), but the forrest of checks necessary might be worse
than this quick fix - because when looking for the cause, I found some other
cases in which the PM would panic as well. See info in bug 2 for details.
Another fix is to delay notification of PM by SYSTASK of signals delivered
internally until after the reply (e.g. of exec()), because the reply would
be messed up otherwise (receiving the notify instead of reply). This caused
SIGTRAP not to be delivered properly with traced processes.
Ben Gras [Fri, 1 Jul 2005 09:39:47 +0000 (09:39 +0000)]
Fix to check for RDTSC instruction (above 486), and call another timing
function instead if RDTSC is unavailable. This makes minix run on 486
again :) (presumably lower as well).
Jorrit Herder [Thu, 30 Jun 2005 15:55:19 +0000 (15:55 +0000)]
Rewrite of process scheduling:
- current and maximum priority per process;
- quantum size and current ticks left per process;
- max number of full quantums in a row allow
(otherwise current priority is decremented)
Ben Gras [Thu, 30 Jun 2005 13:04:57 +0000 (13:04 +0000)]
Added formatting fixes for larger numbers in fsck and df; made mkfs
test for devices larger than 4GB, so it won't try to test them (and print
a warning message), but it will write the FS.
Ben Gras [Tue, 28 Jun 2005 11:58:17 +0000 (11:58 +0000)]
Removed max-inode check from mkfs because of 32-bit inode numbers in V3
FS. Tested by mkfs -i 200000, fsck, file system creating with 200000
inodes, fsck again.