Source to mint/changes
* This file has been modified as part of the FreeMiNT project. See
* the file Changes.MH for details and dates.
This is the original Changes file. Check the file Changes.MH for
changes made since MiNT 1.12. --hohmuth
Changes are listed in *reverse* order, most recent changes being
dos.c, dosdir.c: ++email@example.com
Added Dreadlabel() and Dwritelabel() system calls.
Added T_ECHOCTL flag.
Added iwake() function to go with isleep().
Fixed Fselect() collision detection.
Use effective user id's when creating files.
Added code to call debugging routines only if the debugging
level is appropriately set.
Fixed a big security hole in killgroup().
all over the place: ++firstname.lastname@example.org
Extensive changes to the modem code, to support
new ioctls (e.g. for VMIN and VTIME) and to support
Added an optional long argument for timeouts.
Added DP_MODEATTR and DP_XATTRFIELDS to Dcntl() call.
Made Fselect correctly handle collisions.
various places: ++David.Stevenson@jet.uk
Patches for Lattice C compatibililty.
For traced processes, notify tracer about all signals
sent (even if they are ignored or blocked).
Don't follow links in Fchown.
Various bug fixes and enhancements.
Added date,time fields for drive U:, and made
the root directory accessible only to administrators.
Fixed timeouts so that canceltimeout() on an
expired timeout will no longer cancel a new one.
Made it no longer fatal to use FIONREAD or FIONWRITE
on unidirectional pipes.
version 1.11 BETA
biosfs.c, pipefs.c, tty.c: ++email@example.com
Improved ^S/^Q handling for ptys.
biosfs.c, proc.c, xbios.c: ++firstname.lastname@example.org
Cleaned up xbios and related initializations.
dos.c, dosmem.c, dossig.c, intr.spp, proto.h: ++email@example.com
Added new system call Psigintr().
dos.c, proc.[ch]: ++firstname.lastname@example.org
Implemented Tsetitimer() system call.
add readb+writeb for ptys (for the slave->master pipe),
use memcpy for all pipes
really buffer 4K not 4K - 1 byte so the copies are aligned more often
add shortcuts for fast RAW tty IO in the DEVDRV
make memcpy an extended quickmove
add an XDEF'd _bcopy as a hint for gcc
Moved definition of INLINE here.
Better serial line support, particularly for SCC ports,
and work arounds for some BIOS bugs.
Fix a memory leak with M_KEEP regions.
Allow memory protection to work with the old AES (if
MULTITOS is not defined).
dosfile.c fasttext.c *fs.c: ++itschere@TechFak.Uni-Bielefeld.DE
Add FIOEXCEPT ioctls, and make Fselect() able to
select for exceptional conditions.
dosfile.c, proc.c: ++email@example.com
Solve the 'endless serial overruns' bug.
Don't allocate memory for shared text regions in a fork().
New system calls to support supplementary group id's.
dosfile.c dosmem.c filesys.c mem.[ch]: ++firstname.lastname@example.org
Improve the shared text sticky bit code.
dosmem.c, mem.c: ++email@example.com
Keep shared-text memory regions in memory even after
the last process using them exits (like a sticky bit)
dos.c,intr.spp,proc.c,loadave.h: ++steve usher (?)
Added uptime/load average code.
bios.c biosfs.c intr.spp: ++firstname.lastname@example.org,email@example.com, et. al.
Allow select() on serial devices.
lots of places: ++firstname.lastname@example.org
Diffs for Pure C compatibility.
Made Dcntl() check for already existing devices
with the same name, when installing a new device.
Fixed a bug in the force media change code.
Made blksize 1024.
When a process exits both its own and its children's
process time should be added to the parent's children
time. Also the time reported as resource usage
should include the children's time.
Don't cancel selects when pipes are closed, unless
it is the last close for the pipe.
Added Pseteuid() and Psetegid() system calls.
Added Dxreaddir() system call.
Provide more information about program crashes
to the ALERT pipe.
Allowed permissions to be changed on the root
directories of TOS drives; added CRC code for
inode numbers; fixed blocksize reported when
sector size != 512.
Provided a version of "kill" that device drivers may
safely call from an interrupt. This function (ikill)
is available in the kerinfo structure.
Made Fselect() recognize extended escape sequences.
Improved job control checks for SIGTTIN/SIGTTOU.
Give more time to starting processes.
Reduce the amount of time the kernel spends at ipl 7.
When the window size for a tty, has changed, send SIGWINCH to the
foreground process group of the tty.
Do CRMOD input translation only in COOKED mode.
Fixed some bugs in the re-entrant open() function.
Added Kay Roemer's MiNTNet code.
Relax the conditions for EUNDEV drives (OK, I was wrong :-)).
Finished the select() collision detection code (inspired by
Kay Roemer's patch for 1.09).
Only release the controlling terminal when all members of a pgroup
Don't "follow the chain" for character special devices
tty.c, file.h, xbios.c: ++email@example.com
Add a real TIOCSETP (differs from TIOCSETN in that it waits for
the output buffer to be empty if the device supports TIOCOUTQ.)
Remove a kludge in rsconf() which is not needed if a real TIOCSETP
various places: ++firstname.lastname@example.org
Added __attribute__((noreturn)) support.
debug.c, fasttext.c: ++email@example.com
Assorted bug fixes.
Improved select() for repeating keys.
various places: ++firstname.lastname@example.org
All kinds of useful optimizations and bug fixes.
various places: ++email@example.com
Removed various PureC warnings.
Initialize timestamp and datestamp before
doing file system initialization.
Changed FIONREAD to correctly return the number
of bytes available for reading, even if there
are no writers.
Make FIONREAD return an accurate count of the
number of bytes left to read.
Fcntl(TIOCSETP) now puts the terminal into RAW or
cooked mode immediately (it used to take until
the next read or write).
Watch out for aliasing of pointers passed to
New Fcntl() command (PFSTAT) for finding
control terminals of processes.
Make f_open and f_create reentrant.
Better Falcon Bconmap() fix.
NEW SYSTEM CALL: Tmalarm() for millisecond resolution
Fixed ioctl(,,TCSETBAUD) when oldbaud == newbaud.
Extended Dfree() to work properly on arbitrary drives,
not just ones that are root directories or aliased
(this arises e.g. for Dfree() on U:, when the current directory
isn't a root).
Bugfix for TOS 1.4: the BIOS expects register A5 to
contain a 0 when it is called.
Make reads on console interrupt driven.
Fixed Fseek(offset,f,2) to properly add "offset" to the
end of file position, rather than subtracting it.
Made sleep return a value specifying whether or not the
sleeping process was interrupted by any signals.
Added XATTR structure to bios files, to allow them to have
ownership, access modes, and time stamps. Restricted
Dcntl on u:\dev to superuser processes.
biosfs.c, pipefs.c, file.h: ++firstname.lastname@example.org
Fix TIOCFLUSH on biosfs.
Give meaning to TIOCFLUSH's argument: it is now a pointer
to a longword mask specifying the type of flush:
*arg & 1 -> flush input only
*arg & 2 -> flush output only
*arg == 0 -> flush input and output
arg == NULL -> flush input and output (backwards compatibility)
Add TIOCOUTQ to biosfs and pipefs. The argument is a pointer
to a longword to be filled with the number of bytes in the
Added an "rdev" field to the XATTR structure, so that programs
can find the BIOS device number for character devices.
Added a /dev/fd subdirectory.
Restrict some operations to privileged users.
Create new device filenames in lower case, for consistency.
Improved security for Fdelete, Dsetpath, and some other
calls; made TOS file systems accessible only to root and
the admin group.
Added a flag (in_dos) to the PROC structure; the BIOS can use
this for security checking on Rwabs and similar calls.
Bug fix: memory protection modes weren't being properly reset
after memory was read from/written to.
Fixed a bug with memory initialization when the screen is
at a fixed location (i.e. with 3rd party graphics cards).
Only check for 64 bytes of supervisor stack, rather than 1K; also,
corrected some loop counters.
Hack so that ^S/^Q work on BIOS devices other than the keyboard.
Check for auto-repeating keys so that Fselect() wakes up more
Made BIOS devices take less CPU time while waiting for characters.
If a search for a path component (other than the last one)
fails, always return EPTHNF (like GEMDOS does).
When freeing a closed fifo, free any associated tty as well.
New command for mint.cnf: "include".
In create_base(), limited the amount of memory assigned to
a new basepage if the current process has a limit assigned
Fixed the DEV_NEWBIOS call (it wasn't linking the newly created
device into the bios file system chain).
Based on a suggestion by Uwe Seimet: made Dlock() return
ELOCKED when called twice by the same process, so that under
single tasking AES accessories may use it.
Fixed a bug in FS_UNMOUNT (fc->index is not necessarily
a pointer to a UNIFILE, since the file system may use
that for its own purposes).
Make only ctrl-alt-key characters significant to the
debug code (before, any character could start/stop output).
Andreas did a major clean-up of the memory protection code.
It's now faster, and quite a few bugs have been fixed.
Made sure that only even addresses are passed to zero() (I guess
some linkers don't make sure that text, data, and bss are all
In kmalloc(), the size passed to nalloc_add_arena() was wrong.
Restore the screen to its original address when exiting MiNT.
Allowed the fasttext device to be opened more than once.
Fixed the code for figuring out when to free an arena (it didn't
use to take account of the arena size itself).
Allocate all memory before doing file duplication, so that
if a fork() runs out of memory we don't leave cookies
Allow quotes to delimit arguments in the MINT.CNF file.
Installed a work-around in dosound() for Pure C's problem
Put in a temporary kludge so that .XFSes that don't install
BIOS vectors can work (for a while). Note that .XFSes should
either install BIOS vectors, or should mount themselves on
drive U: without taking up a drive letter. THIS KLUDGE WILL
GO AWAY SOMEDAY SOON!!!
Implement file locking for BIOS devices.
Fix the Pexec(200,...) bug (trying to save the command line
image must be done *before* the existing program's memory
Allow kmalloc()'d memory to be returned to the OS, if possible.
Dosound() can be called with a negative number as its parameter,
in which case it is only an inquiry function.
Made the file and directory operations re-entrant, by replacing
the global variable "temp1" with local variables (where needed).
Cleaned up the directory closing functions.
Fixed a bug in do_vfork (the child's PROC structure could be
freed when signals are checked for, and the old code wasn't
prepared for that).
Updated for the new version of MiNT.
Lots of fixes to get rid of warnings and some small optimizations.
In Pexec, save the name and arguments a process was started with
into the PROC structure, so that they can be recovered at run time.
filesys.c,main.c,unifs.c: ++Ulrich Kuehn
At boot time, load files called *.xdd which contain external
Also, provide Dcntl calls for drive U: to allow installing and
de-installing file systems at run time.
Only busy-wait for the parallel port, not for serial ports.
Pass Dcntl commands along to file systems.
Make Fselect interruptable.
Check for illegal signal numbers in ioctl(PTRACEGO,...).
Fattrib should have been following links.
*.spp: ++Claus Brod and Uwe Seimet
Translated the German "FATAL ERROR" message.
The bus error handler shouldn't use 68030 MMU instructions unless
it is on a 68030. (Thanks to Stephen Henson for catching this.)
Fixed a bug with Bconout and TOS 1.02.
Bug fix: Pexec mode 4 should cause the child to inherit its parent's
if disk_changed() detects an invalid drive, return EDRIVE from
it and also from path2cookie().
Fixed the PRN= line in mint.cnf (it was redirecting AUX:, not
Made Dosound() automatically grant supervisor access to the
region the sound is in.
Make the "FATAL ERROR" message multilingual, and also less
confusing if debugging information is not provided.
Make the addtimeout() and canceltimeout() functions available
for device drivers.
Reduce the amount of space needed for signal calls (we were
being overly cautious on that),
Make sure that the text segment in which a process will be
executing is attached to that process when it is started with
a Pexec (4,...).
Enhanced to accept some 68030 specific addressing modes.
Removed the save/restore of the logical screen pointer for the
MultiTOS kernel (this causes problems on a Falcon, since if the
AES changes resolution its parent process may be left with a
logical screen pointer pointing at invalid memory).
Some small optimizations.
Fcntl() was not interacting properly with rsconf(), so that
setting baud rates via Fcntl didn't work.
Fforce() should return 0 on success.
Patches for PureC.
Small optimization: no return value is needed for spl().
A better Falcon BIOS fix: if we're on a broken Falcon, turn
off Bconmap completely.
various places: ++email@example.com
Applied Michael's patch to make MiNT compile with PureC and
the MiNT library.
Fixed a bug in prot_temp (the cookie values weren't being
parsed out correctly). Also, added "const" where appropriate.
Fixed some places where the fdflags for file handles
wasn't be set up correctly (default is 0 for std handles,
FD_CLOEXEC for non-std).
Saved the MMU context when starting MiNT, so that we can
restore it again afterwards (and thus exit MiNT gracefully).
Supplied a PMMU cookie if memory protection is on; if a PMMU
cookie already exists, don't do memory protection.
Added ESC-t support to the fasttext device.
Some modem port TSRs also don't return the correct value from
Made Tsettime() and Tsetdate() available only to the super user.
various places: ++firstname.lastname@example.org,++email@example.com
Portability fixes to make the code compile with PureC and
Lattice C; also, Alex fixed up the cache clearing code.
Fixed a bug in the NEWWAY code (during disk change, don't
free file cookies that may be in use).
In the restore context code, touch the page containing the
(new) supervisor stack pointer before switching stack pointers.
Otherwise, if the page is not resident (a 3rd party virtual
memory system has swapped it out) then the resulting
bus error is fatal.
Fixed a bug that could cause crashes on disk changes (the
'open' field was an integer for directories).
rendez.c, mem.c: ++Martin_Koehling@un.maus.de
Fixed some memory leaks (semaphores weren't freed after being
destroyed, and if load_and_reloc failed then the memory
allocated for the shared text region wasn't freed).
When tracing is cancelled for a process with PTRACESFLAGS,
start the process again by sending it SIGCONT.
Don't allow processes to be removed by a different user.
Fixed the debug tracing code so that SIGCONT doesn't stop
a process, even if it is being traced.
Dpathconf was returning the wrong value (8 instead of 12 -- it
wasn't taking the pid number extension into account).
Changed the way timeout worked for Bconout() stuff (basically,
rewrote the code so that it really does work -- the old code
used the system clock in timeout.c, which doesn't get updated
if no context switches are happening; the new code uses the
200hz counter, which is always updated).
Increased the number of Fsfirst searches that can happen
simultaneously to 10 from 6 (this is a per-process
limit, not system wide).
In old versions of TOS, Rsconf could get stuck waiting for the
transmit buffer to empty if flow control was on. Added a timeout.
Changed Psetpgrp so that passing a pgrp of -1 makes it into
an inquiry call.
Fixed a bug in Flock (regions were being locked 1 byte too far).
Changed the memory allocation quantum to 256 bytes, so that
Srealloc will always work right on ST's.
Run any AUTO folder programs appearing after MINTNP.PRG
as well as just plain MINT.PRG.
Pop more stuff off the stack in sig_return, since we
did push more onto it in handle_sig. (It really shouldn't
matter, restore_context will restore the stack pointer
anyway, but better safe than sorry.)
Made the open file associated with shared text memory
regions be closed automatically when a media change occurs.
Changed the do_usrcall function into an assembly language
routine which preserves all registers. Apparently some
programs rely on being able to pass parameters to Supexec
in registers. We only used to kill register A0, which was
reserved for BIOS use anyway, but obviously some programmers
choose not to read the f'ing manual.
Fixed a typo (PATH_MAX where ERANGE should have been).
Check control keys on every newline, so users get quick response
to their key hits.
Fixed a typo (t_startc is the character to use to resume terminal
output, not t_stopc!)
Fixed many dup_cookie and release_cookie bugs; the code should be much
more usable now.
Corrected a flaw in the 68030 only version -- it assumed that
68030 was synonymous with memory protection. Also: set
Checked to see if we're called "MINTNP.PRG"; if so, turn off
memory protection automatically. Commented out the code
for automatically turning MP off on 1 meg machines.
Use init_tail for the temporary stack (saves us 128 bytes of bss,
If less than 1 megabyte is free, turn off memory protection
If there's no memory protection, do all ROUNDing etc. to
16 byte boundaries rather than 8K page boundaries.
Added a check for the ability to move screen RAM; evidently
some boards use ST RAM but still don't allow Setscreen()
all over the place: ++firstname.lastname@example.org
Cleaned up the code for PureC compatibility.
all over the place: ++email@example.com
Cleaned up the code for Lattice compatibility.
Sped up by special casing some of the gotoxy() calls, and
also allowed 8 pixel high characters in monochrome mode.
Allow Frename() to succeed on symbolic links.
Save processor context stuf in the reserved BIOS area even for
bus errors with memory protection on.
Initialize the exception file descriptors to 0, in anticipation
of future use of this Fselect feature.
Allow pipes to be opened and written to with O_APPEND mode.
Got rid of the PATCHLEVEL define. Now that I've finally
checked everything into RCS, it's much easier to just bump
up the version numbers on each release.
Sigh. This is MultiTOS 1.0's MiNT, so even though I don't
consider it "finished", I'm changing the version number to
1.0. At least it's no worse than TOS 1.0 :-).
We want to flush the ATC cache, *not* the CPU cache. Thanks
for pointing this out, Alex.
Fixed a problem with Speedo GDOS; if the printer's buffer was
full, Bconout(2,...) would do a context switch, which is not
a good thing for Speedo.
Big bug fix -- the do_exec_os routine was being called with a
basepage that occupied all of memory, so that the Pexec(200) it
did was failing due to insufficient memory. Now we Mshrink the
basepage; this also necessitates fixing up the stack pointer.
Handle mint.cnf files that don't end in a carriage return/line feed
New path parsing code to correct a bug in the way symbolic
links were being handled on loadable file systems.
Made the default debugging level give ALERT messages.
Corrected a bug in the way global file handles are closed.
Made it so that overlay Pexec modes (e.g. 200) set up
the basepage to preserve the same "parent".
Added in a kludge so that if we're starting GEM from a file
(e.g. gem.sys) then we do it via the exec_os vector. I hope
this makes the Codeheads happy :-).
Backed out entropy's and schwab's changes. Random programs
were getting stopped under MultiTOS because of them; I can't
find the cause, so let's go back to something that worked
Fixed a silly initialization error: we should not
assume a default language, we should get it from
Extended Dlock: if bit 1 of the mode is set, then the
process id of the process using the drive is returned
instead of ELOCKED or EACCDN; this allows for more
informative error messages.
Updated the copyright notice.
Corrected some silliness in the job control code.
Took out the ONLY030 optimization; it didn't work correctly
(I can't see any reason why it shouldn't have worked, but
it didn't; perhaps a compiler bug bit us?)
Changed magic shift key to LEFT shift key.
Make loaded .XFS files go into supervisor accessible
Ask user in her own language whether or not to boot if the
kernel is a MultiTOS one and she held down the shift key.
Relax O_COMPAT mode opens somewhat so that any
number of processes can open the file for reading,
as long as no more than 1 has it open for writing.
ALSO: make sure O_EXEC gets treated the same as O_RDONLY.
Change TRACE() to TRACELOW() on Fread and Fwrite.
Went back to old method of doing tosfs.c; this is
better tested and safer.
New system call, Salert(msg), for doing an alert message.
Terminate messages written to the alert pipe with a 0.
Also: pour them into alert boxes so that programs like
sysalert don't have so much to do.
Corrected the quote_putch function.
Allow Dfree(n) to work if "n" is a big number (e.g. BIOSDRV)
and the corresponding pseudo-drive is a current or root directory
of the current process.
Return a new error number, EPIPE, for writes to broken pipes.
If a tty loses its owner, the next process to do i/o to it
will become the owner.
FA_RDONLY doesn't mean "read only" on the process file system,
so allow such processes to be opened for writing.
Fixed Supexec to pass the function pointer on the stack, too
(just as TOS does). This is still undocumented behaviour,
so you rely on it at your own risk.
Applied a fix for Rsconf() with TOS 1.04, and made the
old TOS Rsconf stuff #ifndef ONLY030.
Wrap all calls to add_q/rm_q in spl7(), so that the
wakeselect() function truly can be called from
Make provisions for compiling an 030/040 only version
of MiNT; this should be faster and smaller than the
The file system interface changes warrant a new version
number, so here it is.
Keep a chain of open directories, so that if a program
terminates without calling closedir() we can still clean
up after it. Also: allocate directory structures from
kernel memory rather than user memory, so that we don't
take an 8K hit on each one. PROBLEM: a bug in the mntlib
readdir() function causes bus errors if memory protection
is on. This is a library bug that needs to be fixed
real soon now.
TSRs now get forced into global memory if they were running
privately; this should make things easier for users who
forgot to change prgflags on their TSR programs.
New meaning for O_COMPAT mode: deny write access to all other
Added a define to turn on/off the RO_FASCISM code. Personally,
I think it should always be on.
New file system functions, release() and dupcookie(), so that
the kernel can inform file systems when it is finished
with a file cookie; networked file systems will be very
happy about this.
Moved the memory protection checks for proc_read and
proc_write to a separate function in memprot.c.
Remove the old compatibility code for Fcntl(F_SETFL,...).
(Actually, it's commented out, so we can put it back in
if we need to.)
Change default behaviour for SIGFPE (which is raised
by division by 0) to "ignore", same as TOS.
Made Dgetcwd() use the new size parameter, so that it
works as advertised.
Provide a "size" parameter for the getname() file system
function, so that we can do Dgetpath() of arbitrary length
BIG_MEM_DUMP is a nasty thing for users to get;
so we shouldn't do it on all failed mallocs!
Plugged a memory leak (dispose_proc was failing to
free the process table memory, because fork_proc
was zeroing that field in the PROC structure).
Fixed MAXMEM= (it was setting the maximum CPU time,
not the maximum memory -- I thought I tested this!)
Added MAXMEM= and SLICES= variables for mint.cnf.
Fixed Setexc so that if the new vector is in a global
region, the region is re-marked to be super.
Fixed a race condition with memory protection and
Pexec(100,...) (if the new process exited early,
the old process might still try to access it).
New file, for doing the Srealloc system call (for
Merged in Allan's memory protection and debugging
code. New files: memprot.c, nalloc2.c, welcome.c.
Aaargh! Just after cutting this patch I discovered
that I had the test backwards.
Changed so that Fsfirst()/Fsnext() always return
upper case, regardless of domain. (MiNT aware
programs should use the new directory functions.)
Got rid of the special hack for drive x:, since
drive x: no longer exists.
Cleaned up a bit.
Some minor patches for PureC.
New system call, Dgetcwd(), with a 'size' parameter;
this doesn't do anything different from Dgetpath
now, but it's there for future expansion.
Update the patchlevel correctly.
Keep the Unix style semantics for pipes created with
Fpipe, but not for other fifo's (which by default will
continue to read the number of bytes requested).
Support word-erase and quote-next-char.
(screen_ioctl): tty_ioctl is now called by parent by default if
signal.c (check_sigs): ++schwab
Use an int to index signals, not a long
biosfs.c (bios_getxattr): ++schwab
u:\dev\stdin, etc., get the attributes of
the associated files
dos.c (p_setuid, p_setgid): ++schwab
Allow setting to the current real [gu]id
bios.c (checkkeys): ++firstname.lastname@example.org
Keys read by do_func_key should not be
interpreted (esp. UNDO -> SIGQUIT). also recheck shift status
since do_func_key may take some time
Added code to support old (tos < 1.4) Rsconf()
Changed so that attempts to execute a shared text program
which has data/bss references in the text segment will
get an ENOEXEC error instead of ENSMEM.
Applied Julian's purec patches.
Changed so that read() on a pipe will return as
soon as some data is available; this is how
all Unixes work.
Applied Julian's patches to allow compilation with
New variable, MAXMEM=, for setting maximum memory
size (in K).
Removed PSEUDODRIVES= command, since "alias" has
Changed atoi to atol; it's more generally useful.
Applied Howard's patches; in particular, made %ifdef
apply to other commands (like %define) as well as to
Cleaned up a bit more for cross-compilation.
in_kernel can be set while the process is in user mode
(if the critical error handler calls GEM)
Get rid of some more magic numbers.
While fixing the mtt bug, a new bug was introduced. So,
let's try again :-).
Fixed a particularly silly bug in bios.c: in do_bconin(),
r was being returned without being initialized. Why didn't
gcc catch this?
Applied Alex's patches for Lattice, and Julian's patches for
Kill programs with p_term() instead of terminate() (except for
signal SIGKILL) so as to allow them a chance to clean up via
the term_vec vector.
Allow Fattrib() call to change the read-only
bit. Made Fxattr() return the correct mode
for shared memory files.
Allowed HARDSCROLL=AUTO to set the number of
lines of scrolling to the current screen size.
New functions, callout2() and callout1(), with
less overhead; used by bios.c to call the
Changed calls to Bconxxx functions into
jumps through the defined vector table in
low memory, when this is possible (TOS 1.0
doesn't have the table).
Added %ifdef, %else, and %endif commands (for
future expansion). Removed the requirement that
macros to be expanded be delimited by % signs,
and cleaned up the definitions. Changed
"SECTION FOO" to "FOO". Added -purec compilation
Fixed a bug in changedrv (there was no
check to see if "d" was a BIOS drive before
aliasdrv[d] was tested).
Fixed incorrect code that assumed TCURSON
Fixed Makefile to work with older versions
of gmake, as well as generic make programs.
Radical overhaul of how assembly language is
handled. We now provide 2 utility programs,
"genmagic" (for producing symbolic names for
various offsets into structures) and "asmtrans"
(for processing .spp files, replacing macros
defined by "genmagic" and optionally translating
Motorola to MIT syntax). Now we only have to
maintain the .spp files; the Lattice and gcc
versions of the .s files are generated automatically,
and as a side benefit we can get rid of magic
numbers in the .s files and be sure that if we
change proc.h, the assembly language will be
Added a new command to mint.cnf, "alias", to
enable aliases for pseudo (and other) drives
to be created. Also, deleted drives q:, v:, and
x:. Programs should no longer be using these;
if they are, users can put things like
"alias q: u:\pipe" into mint.cnf.
Fixed the definitions for TCURSON and TCURSOFF.
Moved the handle checks in file_* functions into
separate functions, since for example we *know*
that handle 0 falls within the legal range; this
should remove a bit of overhead on BIOS and
single character GEMDOS I/O.
Got rid of the zeroexit() code; since we now
allow the whole boot process to be aborted by
Allow Cursconf() to work on TOSWIN pipes.
Check the date and time of shared text regions
before re-using them.
Changed the trap #13 entry point to allow quick
evaluation of BIOS functions that don't need
the full context save/restore done.
Macro-ize TRACE and DEBUG so that it's possible
to produce a smaller version of MiNT without
Don't check for keyboard presses after every
BIOS write, it's too time consuming.
Another bug: we shouldn't do the dLibs Pexec
hack on the first process we start up, because
it means messing with the MiNT basepage (which
is not ours to mess with, it's TOS's).
Fixed bug in enter_kernel (rootproc->base is no
longer necessarily MiNT's basepage).
Tried to remove gcc warnings about constant
Applied Alex's patch to allow trace mode to work
with non-MiNT debuggers.
Applied Alex's patches to get rid of Lattice warnings
about unneeded assignments.
Added extra traces to exec_region() in an effort to
track down the mysterious crash problems that others
Made do_vfork not bother to save shared text regions.
Made Rwabs respect Dlock.
Made the TOS media change routines lazier (actual
disk access is deferred until the disk is next
Applied Alex's patches for setenv.
Applied Julian's patches for Pure/Turbo C. The
resulting kernel doesn't actually work yet, but
at least we don't get so many error messages when
compiling. (Who needs lint when you have three
fussy ANSI compilers?)
Oops; we should have had #include "inline.h" here.
Applied jrb's GCC patches, and Alex's Lattice patches.
Some optimizations in bflush(). I tried something like
this before, but messed up the terminal output modes.
Let's hope I got it right this time. Also:
removed some dependencies on sizeof(int).
Tried -O2 instead of -O. It seems to work, so let's
leave it on for now.
New file to keep short, inlined versions of frequently
Check the floppy disk locking flag before doing a
pre-emption. Not really necessary now, but it doesn't
hurt to be careful.
Applied Alex's F_SETLKW patches. If Alex isn't careful,
he's going to make MiNT Posix compliant on us :-).
Applied Alex's patches to add a Pwaitpid system call.
If running from the AUTO folder, adjust the basepage
chains so that MiNT is invisible to programs that
(incorrectly!) make assumptions about basepages.
Some optimizations in do_wakeup.
Don't call (*fs->dskchng)() twice when a disk
change is detected.
Make sure the _resvalid system variable has the
correct magic number in it for indicating that
we want to catch the reset.
Really forbid deleting other process' current
directories (the actual "return EACCDN" was missing!)
Inlined the check_time() function, and re-arranged
do_wakeup_things a bit to be more efficient.
Streamlined a bit; things are now kept in registers
When loading file systems at startup time, don't
check the \MINT directory if that's the current one.
After a media change, instead of throwing away all
handles that pointed to the changed drive, make
them point to /dev/null instead, so that they
won't be re-used until the user explicitly closes
Allow Dlock() to succeed even if there is an
unfinished Fsfirst/Fsnext sequence on the drive.
Allow relocations outside of the program load area;
apparently, some programs actually need these.
Insert some sanity checks on memory addresses.
Restart check_sigs if the process stopped because of
a signal, since the parent may reset the set of
New file from Alex, to control caching &c.
More debugging patches from Alex, to make attaching
to existing processes work correctly.
Cleaned up the debugging stuff a bit. For example, if a
process does PTRACESFLAGS on itself, it's the same
as if the parent did; also, if the process does a
Pexec with overlay (i.e. Unix exec()) then it stops
before its first instruction. This makes emulating
the Unix ptrace() system call much easier.
Changed Fcntl TIOCISPEED/TIOCOSPEED to return the
next lowest legal baud rate if an illegal one is
Fix a bug that would cause an infinite loop if a
bad .XFS format is encountered.
Implemented shared text; if the appropriate bit
(for now, 0x800) in the program header is set, then
the loader will set up a shared text region for
the program, and subsequent executions of it will
run out of the same text segment. Note that this
does require appropriate compiler support!
Fixed bug in the way directory searches are closed
after a media change.
Applied Julian's third mouse button patch for
Applied Alex's debugging patches. Also: wrote a
Motorola->MIT syntax converter, so that we only
have to maintain the stuff in the "asm" directory.
Applied Alex's debugging patches, with a few
Check for the existence of the \MINT directory before
trying to load .XFS files from there.
--- patchlevel 13 released to the public ---
Added Alex's patches for Lattice.
Fsnext() on symbolic links was broken, because
relpath2cookie no longer checks drive letters
unless "depth" is > 0. Fixed this. (why did
we change relpath2cookie that way?? this is
changed back in 0.99pl2)
Added support for putting the mint.cnf file
and any *.XFS files into the directory \mint.
Added Pgeteuid() and Pgetegid() system calls.
Fixed the "set current directory" code to
Added a sanity check; if GEM is already running,
don't try to run it again.
Added FIONWRITE and FIONREAD ioctl calls.
Fixed the type of the critical error handler.
Added Alex's patches for O_APPEND and O_NOINHERIT.
Fixed lseek() on shared memory segments, and added
FIONWRITE and FIONREAD ioctl calls.
Tried once again to tame the wild cursor.
Modified process startup code so that PROC structures are no
longer kept forever by the kernel (which should help alleviate
memory fragmentation problems a bit).
Applied Alex Kiernan's SIGTRAP bug fix (and kicked myself for
forgetting C's precedence rules; thanks, Alex!).
Fixed relpath2cookie so that names like "C:\Z:" aren't
interpreted as referring to drive Z:.
Restored the "turn on cursor when opening()" code, because
without it the fasttext driver and BIOS aren't in sync.
Moved the check for the presence of an already existing MiNT
cookie to earlier in the initialization process, so that
the error message can be printed properly.
Fixed Dpathconf() on U:\SHM (filenames are truncated automatically
on that file system) and corrected the comment there.
New function, call_aes, used to check for the presence of GEM
(so we can tell whether or not we're running from the AUTO folder).
Run any programs which come after mint.prg in the AUTO
Changed so that the patchlevel is always printed on boot-up.
Add U:\SHM as an interface for shared memory.
New file system for doing shared memory.
Fixed Bconmap() to always return an error if the underlying
TOS doesn't support Bconmap.
Fixed a bug in the argument parsing code for the "exec"
command in mint.cnf.
Changed Dlock() to return ELOCKED if an attempt is made to
lock a drive that's already locked, and ENSLOCK if an attempt
is made to remove a non-existent lock.
I forgot again to update this. Aargh!
Align everything on 16 byte boundaries.
Actually fix the "memory being allocated twice" bug.
The problem was that setting m->links to 0 before calling
attach_region was a no-no.
Attempt to fix the strange "memory being allocated
Truncating names at 14 characters came *before* the
8.3 kludge, which meant that long names were being
interpreted incorrectly (e.g. gcc-cc1plus.ttp was
becoming "gcc-cc1p.tt"). Temporary kludge: only
truncate at 32 characters. Long term solution:
re-write this code to do the 8.3 truncation at the
same time as the truncation.
Provide a more explicit type for criticerr.
Don't make _logbase per-process if hardware scrolling
is active, since this makes for all kinds of weirdness!
Allow NULL commandline to be the same as an empty
string. (It was acting this way before, due to the MiNT
library strncpy; now that we use our own strncpy some
programs were passing funny arguments.)
Provide a more detailed trace of Pexec activity.
Added a sanity check in get_region().
Set the time/date stamp of process 0 to the
date & time when the system was booted.
Commented out the code that turns the cursor
on when u:\dev\fasttext is opened.
Unsigned characters are always >= 0, so we
don't need to check this.
Added Alex's patches.
Added Alex's patch to cast the result to void.
Make sure the file system media change routine
is called every time a disk change is forced;
this corrects the Dlock() bug (it wasn't forcing
media change as it should have).
Oops! I forgot to increment this for pl6, so
it jumps by 2 this time.
New Fcntl calls for controlling terminal baud
rates and flags such as parity and stop bits.
These have been integrated with the old TIOC*
calls where applicable.
Changed Fcntl to make a call to tty_ioctl be the
default if the device is a terminal and the device
ioctl routine returns EINVFN.
The date/time stamp of a process now shows when the
process was started, rather than being the number
of seconds of CPU time used.
Degrade an ALERT to a TRACE; there is a circumstance
in which a root directory can apparently be changed,
and that's when a program tries to open an empty
file name. We don't need to warn the user that
something is wrong in this case; we can just fail
Save the logical screen base for each process.
Made the critical error handler per-process.
A cleaner way of saving registers when calling
functions... this wasn't really necessary, but I
did it to make tracking a bug down easier.
New terminal flag, T_NOFLUSH, to suppress flushing of
input when SIGINT or SIGQUIT is received.
Added a new Dpathconf() option that tells whether or
not a file system is case sensitive.
Forbid Prenice() on processes that you don't own.
Correct a typo that was causing terminal process groups
to be incorrectly set.
The -DOWN_LIB declaration should have been on (actually,
it was, in my copy... sorry for the mix-up).
Applied Alex's patch for the disappearing cursor bug.
Applied Alex's patches to add "const" declarations where
appropriate, and to get rid of size_t (since if OWN_LIB
is defined we use "int" instead).
Fixed M_KEEP to attach memory to rootproc *only* at
Added prototype for do_func_key().
Applied apratt's debugging/trace patches.
Change Bconmap to actually do the equivalent of an
Fforce(-2, foo) call; this way, we don't need the
ugly DFLTMODM kludge. (On the other hand, we introduce
some new ugly kludges :-)).
Wait until everything is initialized before opening
devices; this avoids bogus critical error messages from
util.c, mint.h, ctype.h:
Add all sorts of utility routines (for string processing,
character type recognition, and the like). This is
designed to make sure that MiNT works the same regardless
of what library is used to compile it. We're not quite
totally independent of library yet (the startup code and
<osbind.h> aren't replaced) but we're pretty close.
Initialize the current directory for the root
process *after* file systems have been loaded, since
otherwise the info is nuked when a new fs is loaded in.
Allow output to BIOS device 5 to be redirected along
with BIOS device 2; we do this by using the MW
ESC-Q control sequence to quote characters. A bit of
a hack, but then, not many people use device 5.
Fixed two bugs in quickmove: (1) it didn't work for
regions bigger than 0x00fffe00 bytes in length,
and (2) it assumed the length was a multiple of 4
Re-arrange things a bit to get rid of a gcc 2.1 warning.
Change flag 0x4000 to mean "don't free the memory
automatically on process termination"; explicit
Mfree requests are still allowed, and after
termination *any* process may Mfree the memory.
Remove -fcombine-regs from CFLAGS, since gcc 2.1
doesn't understand it.
Ignore value returned by Bconout for the screen
(many text accelerators get this wrong :-( ).
New system call, Psigaction(), by AGK.
Added support for Bconmap.
Rationalized the way biosfs and bios interact;
no more funny device numbers are needed. Also:
added support for Bconmap, and a new default
Applied Michael Hohmuth's patch for pipe_close (thanks,
Don't try to initialize all the drives at boot time; path2cookie
is quite capable of initializing, and it saves having
to access drive B: (for example) while booting is going
Allow the user to avoid booting MiNT if the right shift key
is held down.
Added safety checking, as suggested by AKP.
In Mxalloc, if (mode & 0x4000) is nonzero then allocate non-freeable
memory (we do this by attaching the memory to the root process).
Tabs should be non-destructive on the ST!
Re-arranged some things. Note that "slices" was never supposed
to be visible to users! Also, added a "bconmap" variable to
give the current Bconmap mapping for the process.
Fail Ddelete of current directories only on the current
drive; for other drives, reset the current directory
to the root directory. NOTE: Ddelete of a current directory
is forbidden only if the directory is someone else's
current directory; if it's only your current dir., you
can delete it (and get automatically bumped back to
Fixed a bug that caused processes with no '.' in their names
to have the wrong process name.
In Pexec, make sure we yield to the new process so that
it gets at least one timeslice to do an Mshrink().
In preempt(), don't punish processes that have buffered
BIOS output and are preempted; the process of flushing the
buffer may very well put them to sleep, and in any event
processes doing I/O should not be considered "hogs".
Don't look for volume labels in opendir/readdir/lookup etc.
AGK: added DEBUG_LEVEL and DEBUG_DEVNO options to mint.cnf.
New system call (Psigpause()) courtesy of Alex Kiernan.
In Pexec(200,...), don't reset base->p_parent, since the
"parent" in an overlay exec is oneself.
Fixed so that RAW mode reads will return all of an
extended escape sequence at once, rather than waiting
for the next read.
When terminating a process, make sure that it's "number of
memory regions" is set to 0; otherwise, calls to memused()
on the process (e.g. by procfs) can crash the system.
When removing directories, make sure that the directory
isn't in use as someone's current directory (so that
they don't get left in limbo).
Screen memory must come from ST RAM -- otherwise hardware
scrolling crashes and burns. Fixed thanks to AGK.
Moved the prototype for midiws to proto.h, and corrected the
type of its argument (it should have been "int", not "short").
Terminal modes weren't being set correctly in Bconout, and also
weren't being set in bflush (which should have employed RAW
mode output, but didn't).
Merged in Alex Kiernan's latest Lattice C patches.
Use U:\DEV\CON for CON:, instead of V:\CON, since we're
going to make drive V: go away soon.
When looking up a drive, make sure that it has a valid file
system attached to it -- otherwise, newly installed ramdisks
can cause system crashes :-(.
Patches to make the fast text device work correctly on a TT,
courtesy of Erling Henanger.
Install 16 extra cookies, instead of 8, just to be friendly.
Allow PSEUDODRIVES=MAP to put the extra drives in
_drvbits without installing new drivers for them.
Don't rely on drvmap() to figure out what drives exist;
it isn't accurate if PSEUDODRIVES=NO.
Added an option for turning off the BIOS routines for the
Moved the vector set/restore code to main.c (where all the
other vector stuff is).
If the _FLK cookie was already set when MiNT started, we
pass file sharing and locking requests through to GEMDOS.
Turn the cursor off when leaving, if we were started from
Fixed a bug in which tos_chmode was returning an incorrect
Added code for octal output to sprintf().
Make Fsfirst() with the FA_LABEL bit set work on non-TOS
file systems (via the file system readlabel function).
(This used to work only when the search was restricted to
Get rid of gcc 2.0 warnings.
Because Fmidipipe and the disk change code can close
files other than the files of the current process,
the device driver "close" function needs another
parameter, namely the process id being closed; this
allows device drivers to remove locks properly.
Volume labels shouldn't be found by Dreaddir().
Added file locking.
filesys.c, main.c, file.h:
New utility routine (denylock) to make implementing file
locking easier for file systems.
Canonicalize file names (i.e. convert to 8.3 format).
Also, keep track of the value returned from the last
readdir() call, so that a subsequent Fxattr() will take
In sleep(), make sure interrupts are disabled while queue
manipulations are occuring.
Correct a stuttering problem for ^C and similar interrupts.
8 character process names weren't terminated properly.
Aaargh! Shift+cursor keys were being interpreted even when
they shouldn't have been.
Check for newly installed drives when parsing an
absolute path without an explicit drive letter, as
well as when looking at ones with drive letters.
Allow TIOCGWINSZ calls on the console (we use the line A
variables to get the number or rows and columns).
Fix a typo in the file system initialization checking.
Make "VIRGIN_PIPE" more obviously a magic value, and
Make u:\pipe have a sensible date/time; also, make
Dfree on u:\pipe return some useful statistics about
the number of pipes in the system.
u:\proc has a sensible time and date now, namely the
time/date of the last process creation or destruction.
Fcreate() of a volume label now returns a handle to
Make sure the BIOSBUF buffer is flushed when terminating.
There's a bug in TOS 1.4: GEM seems to assume that all
memory is zero initially, and if it isn't (e.g. if a large
AUTO folder program like MiNT terminates and leaves behind
dirty memory) then having too many (or the wrong kind of)
desk accessories can lead to a crash. This was a real bear
to track down, and the work-around is very ugly; before
MiNT exits we copy a short machine language subroutine into
the command line, and then execute it; the routine zeros
all of the TPA and then does a Pterm0().
Change a "short" to "int" for the benefit of gcc 2.0.
Stop process dumps from stuttering.
Added support for global file handles.
In Fselect(), we have to re-validate file handles after
a sleep() call, since signal handlers may close files.
Pre-allocate more PROC structures (this should help
reduce memory fragmentation).
Allow cursor/function keys to send escape sequences.
As suggested by S. Henson: Dsetpath through a symbolic link
may also require changing the current drive as well.
New process scheduling algorithm, as suggested by A. Pratt.
Make only the low bit of Dlock() significant, for future
Allow Fcreate() to create a global file handle.
Changed TRACE mode output so that not just any keys will
start/stop output, but only Help and Undo.
Add a Dlock() system call to lock/unlock drives.
Only initialize drives if the BIOS drive map says that
In Pexec, make a copy of any name we're going to use
before freeing memory for overlayed programs; the old
way was decidedly incorrect!
Allow for global file handles, so that shared libraries
can use file handles that are the same for all processes.
In Mxalloc, ignore bits that we don't understand, to
allow for future expansion.
Fix a bug that could cause the wrong system call to be
made if BIOS buffering is on (!).
Streamline the BIOS buffering mechanism, and make it
more conservative about multiple processes doing Bconout
Allow "foo.-1" to stand for the current process, and
"foo.-2" to stand for our parent. Also, add new
Fcntls for getting/setting memory flags.
In Setexc(), don't actually change any vectors, let the BIOS
do it -- some TSR's install trap handlers that look for
certain Setexc functions...
Allow nested Supexec() calls, or Supexec()'s from a terminate
Change the definition of PPROCADDR and add a new Fcntl,
In exec_region, set the stack based on the value of p_hitpa
from the basepage, instead of the size of the memory
region -- some programs rely on being able to set the initial
stack pointer for a Pexec(4,...) this way.
Avoid using 68020 instructions if we're on a 68010.
More tweaking of the priority code.
Change the type of "tosbp" from char ** to BASEPAGE **,
since that's what it really is.
Add a special case for the Spanish TOS 1.0 act_pd variable.
When a writer is waiting to write a small amount of data
atomically, remember to wake up readers so that they
can clear the pipe!
Add the %u flag to ksprintf() (Fselect uses it, maybe others
In Pterm(), put the exit code onto the stack when calling
etv_term. It won't be in the same place as it was for TOS,
but c'est la vie. (People asked for this feature...)
Provide a way to pass arguments to Supexec(). Note that Atari
never documented that this was possible, but some people were
relying on it anyway :-(. (Don't use this feature, it's only
there as a compatibility hack.)
In shutdown(), don't bother waiting a second for processes
to finish if there are no other processes.
Make sure that path names are null terminated after strncpy.
Fix the code to zero process registers so that it *only* zeros
Eliminate some redundant code.
Open u:\pipe\sys$pipe.xxx rather than q:\sys$pipe.xxx.
Change a "malloc" into "kmalloc", and restore the #include
of <minimal.h> that was inadvertently deleted.
Allow parameters to be passed to the initial program specified
by the INIT= string.
Fix a typo in shutdown() that was causing problems when
MiNT was shut down while processes were active.
Make sure that tfullpath() returns a string less than
PATH_MAX characters long.
Replace "sprintf" with "ksprintf".
Add a "ksprintf" function that's like sprintf(), but
(a) doesn't have so many features (making it smaller),
and more importantly (b) won't try to write more than
SPRINTF_MAX characters into a buffer.
In path2cookie, make sure we don't try to copy more than
PATH_MAX characters into the fixed size buffers.
The "sleep if no memory available during Malloc" code
was causing more problems than it solved, so it was
removed. To compensate, we increase the priority of
newly Pexec'd processes to make sure that they get
Aaaargh! A very serious screw-up in terminate() was
causing us to wake up processes sleeping in vfork()
even when their children were still using the address
space; needless to say, horrible (and mysterious)
crashes could ensue. Fix: only force the parent awake
if wait_q == WAIT_Q && wait_cond matches the terminating
process, otherwise let post_sig() handle waking.
While fixing this bug, re-arrange the terminate code
to do the waking up at the very end, just in case some
of the other code may cause a sleep() temporarily.
Fix the scan code for the UNDO key.
Use Setscreen() to set the hardware screen base, since setting
the variable at 0x45e causes TOS to keep setting the screen base
When waking a process up from a semaphore, check to see
if it's on the WAIT_Q before trying to remove it from
that queue (it might have been moved off the wait queue
by a signal).
Make sure that Bconout(2,c) always succeeds, to compensate
for text accelerators and other programs that don't return
sensible values from Bconout. Also, ignore the Bconout
return value when flushing the text output buffer.
Provide devices for the extra Mega STe serial ports.
Make the kernel info structure available to device drivers
loaded with Dcntl.
Provide a modified Midiws function so that this is also
affected by Fmidipipe and Fforce.
Split bios_device into two device drivers; one for
terminal devices, and one for plain character devices
(the printer and IKBD port fall into this category).
Also: provide a new Dcntl call to install plain BIOS
devices in U:\DEV.
Check for terminal start/stop keys while reading.
In checkkeys, loop through all keys received since our last
interrupt, rather than just checking the last thing in the
buffer (as A. Pratt suggested).
Made the "disable" character for special terminal functions
(e.g. the EOF key) be 0 instead of -1; this matches System V,
is more POSIX friendly, and also makes confusing function keys
and ^@ less likely. (Thanks to Scott Willingham for this
file.h, elsewhere as needed:
Renamed the O_BIOS flag O_TTY (since that's what it really
represents) and renamed the is_bios macro is_terminal.
Make Pexec mode 106 cause the child to be truly independent
of the parent (i.e. it doesn't get the parent's address space,
nor does the parent get the child's).
Allow symbolic links from U:\DEV; this lets us do things like
When PRN=d:\foo is specified, create the file foo instead of
just trying to open it; this makes no difference to devices,
but makes redirecting printer output to a file much more
Fix a bug that was causing Dgetpath() to return incorrect
information for U:\A.
Make sure "searchtime" is up-to-date; bconout uses this for
the time out.
Fix bios_write so that if bconout fails, so does the write.
Fix bconout so that it doesn't hang forever if the device isn't
going to be ready (e.g. the printer is off); instead, there's
a 10 second timeout.
Send all processes SIGTERM when we're shutting down, so that
they have a chance to clean up after themselves.
The KBDVEC structure was missing the "clockvec" element (!).
Revised to allow support for loading/removing device drivers
dynamically, via a Dcntl() call.
Added support for setuid/setgid. These bits are only checked
in Pexec modes 0, 100, and 200, i.e. the "load and go" modes.
Added new semaphore code from Allan Pratt.
New command for mint.cnf: "exec foo.prg bar" runs the program
"foo" with argument(s) "bar".
Use the XBRA protocol for all interrupt routines that we grab.
When terminating MiNT, close all open files to make sure data
is flushed and devices are nicely shut down.
Add some more variables, such as CON and PRN for redirecting
those handles, and HARDSCROLL for controlling the fast text
Make sure the "links" field for the prn and aux handles is
Special case the BIOS Bconout code to try to speed it up
a bit. We allow for buffering of Bconout output; the buffer
is flushed on the next non-Bconout system call or context
switch. This should usually work OK, but as a precaution
we provide for a way to turn it off (BIOSBUF=NO in mint.cnf).
New files for a faster text output device; changes were
made to biosfs.c to support this, too.
Streamline writes to terminals by sending data to the
tty device in chunks instead of 1 character at a time.
In do_open, always return EFILNF, never EPTHNF.
Use supexec() to execute the terminate vector code, to
avoid duplication of signal 0 faking.
In Supexec() does leave the kernel, so we have to make
appropriate adjustments. We do this by faking a signal
(signal 0) and installing the user's function as a signal
Make Dfree(x) actually look at free space on the drive which
corresponds to the current directory on <x>; this should make
Dfree on drive U: much more useful.
Make the "base" field of the PROC structure have type BASEPAGE *
(since that's what it is!)
basepage.h, dosdir.c, dosmem.c:
Support some undocumented fields in the basepage a little bit
(i.e. they're read only). Programs that try to write to these
fields break. Surprise, surprise.
The docs say that children started with Pexec(104,...) or
Pexec(106,...) share the parent's memory. This was unfortunately
not the case; if the parent exited and the child was running
in the parent's address space (e.g. see tfork() in mntlib)
the child died very soon thereafter (like when the next program
comes along and clears the memory the child was running out of).
This is now fixed.
dos.c, proc.c, timeout.c:
More tuning of the process scheduler.
Added "setenv" function for mint.cnf.
In some circumstances, AHDI will keep telling us that a drive
has changed, ad infinitum. To avoid this, we stop trying after
8 media changes occur in a row.
Tuned the kmalloc() strategy to reduce memory fragmentation
(every process will be allocating 264 bytes for its
memory region maps right after creation, and this should
come from kernel memory).
Under TOS, 1 byte writes should always be in raw mode.
In Syield(), we should call sleep() even if no other processes
are waiting, just to make sure that signals, alarms, etc.
are properly dealt with.
The media change code was wedged (actually, the fault was in
do_pclose, which sometimes neglected to check to see whether
or not the file had a still-valid device driver).
In the termination code, close "files" referring to a process
*before* freeing all the process memory; that way, we don't
have to worry in do_pclose() and other places about what
kind of state the process is in.
Round off memory regions only to a word boundary for better
Changed s_yield() to actually give up the processor if
another process is waiting for it; this means that processes
that call Syield() won't be penalized by the priority code.
Also: added a new kernel function, preempt(), which does
what the old s_yield() did (and hence penalizes CPU hogs).
Cleaned up a bit, per suggestions from A. Pratt and D. Gymer.
Only the high 4 bits of the program load flags give memory
requirements (we were using 8 bits).
Add a hack so that ksh still works (it was using '/' in a
path name). THIS HACK WILL GO AWAY SOMEDAY!
CBREAK mode shouldn't do erase, kill, or EOF processing.
Freadlink should check first to make sure the file really
is a link!
Change the name "struct winsiz" to "struct winsize" to match
what Unix calls it (cosmetic change only).
Allow renaming of the drives, and allow rmdir() to work
like unlink() for symbolic links (since we fake the return
value from Fsfirst to look like a directory if the link
points to a directory).
lseek() on the null device should not return 0 always;
otherwise, it will look like a terminal to many programs!
If a MiNT domain process closes stdin or stdout, they
really do want them closed (for compatibility with
When returning from traps, don't pre-empt the current process
if it's in supervisor mode.
Fake some stuff in the basepage so that programs compiled
with dLibs will work some of the time.
Make the value returned from Dgetpath() lower case in the MiNT
domain. Also, make tosfs a little less verbose when debugging
or tracing is on.
Try to allocate space for saved fork() memory in the alternate (TT)
memory map first, as well as in core (ST) memory.
Round allocation requests up to multiples of 8 bytes instead
of 4; this automatically gives us a bit of slush for ill
behaved programs, and also means that requests will always
be for a multiple of sizeof(double) bytes.
Get rid of the extra slush around kmalloc'd regions (which
was a lot bigger than originally intended anyway!)
PATCHLEVEL21:: released version
Make Malloc and Mxalloc try again if there isn't enough memory;
maybe the situation is temporary.
Plug a memory leak in load_region(); also make load_region try again
if there isn't enough memory to load the program (just in case the
situation is temporary).
Add a check to Fattrib to make sure that attributes of directories
are never changed.
Allow Frenames of processes and other special kinds of files even
if they do have the FA_RDONLY bit set.
Allow creation of files with the read-only attribute.
Change the file deletion code so that an attempt to delete an
open file no longer fails, but rather marks the file to be
deleted when it is closed.
Add some extra space to the tty struct, for future expansion.
Make sure the fake BIOS disk routines are available before
any of the pseudo-drives are used, by having them set up
in init_filesys() instead of init_intr().
Remove some debugging output that isn't needed anymore.
provide some fake BIOS disk routines for the pseudo-drives,
in hopes of avoiding "drive U: is not responding" types of
messages that some have reported
half.ttp was failing under mgr, because of a race condition:
our select() returns "ready" for a pipe if nobody exists to
write to it (since then a read will return immediately). half
would make a pipe that would end up being destroyed immediately
by mgr before it got attached to a process. Solution: pipes that
have *never* been opened yet for writing get a special marker
and select doesn't worry about them, only about ones that were
once written to.
Fixed FIONWRITE to return the correct value.
Refuse to Frename a file with the FA_RDONLY attribute.
Fixed bios_write to return the number of bytes successfully
LAST_DEVICE was inaccurate. This could happen again, so I'm simply
getting rid of it and leaving all errors to the BIOS.
Make sure the FA_RDONLY attribute is sensible (i.e. unidirectional
pipes that don't have a writer can still be written to).
Fixed relpath2cookie so that it doesn't *always* follow symlinks
(it only should when lastname == follow_links)
If the FA_RDONLY bit is set on the file, even the superuser should
be denied access for writing.
Requiring write permission for Fdatime is a Bad Idea, since GEMDOS
doesn't; so now MiNT doesn't either.
Fixed a bug with media changes (Fsfirst would sometimes try to close a
directory that had already been automatically closed by a media change).
Fixed the machine type detection code; it needs to run before
biosfs is initialized, i.e. before init_filesys().
Provide a configuration file so that users can automatically
setup symbolic links and can change their init program.
Allow rename on bios devices, so people who want terminals called
"ttyX" instead of "modemX" can do so.
Flink shouldn't need write permission on the destination
directory, only the source.
Added FSTAT function for Fcntl, to allow a better version of
fstat() for the library.
Add code to fcntl to automatically convert MiNT 0.8 O_NDELAY
into MiNT 0.9 O_NDELAY. This is a temporary measure only,
to let older versions of mgr continue to work for a while.
Symbolic links with relative paths were always failing with
ELOOP. Oops! (Thanks to Stephen Henson for catching this.)
file.h, tosfs.c, dosfile.c:
Added a new flag, FS_NOXBIT, to control whether or not the
file system has a sensible notion of execute permission.
This removes an ugly check for &tos_filesys.
Added a compile time option, JUNK_MEM, to deliberately fill
the memory MiNT acquires with garbage; this is for debugging
(to help track down silly failures to initialize memory) and
not for production code.
Fixed a typo in init_proc() that was causing memory not to
be initialized to 0 correctly. (Thanks are due to Stephen
Usher for catching this one.)
Added a tos_rewinddir that works.
Added blocks and blksize fields to the XATTR structure, and
provided a few extra reserved fields for future expansion.
(Also: re-arranged some fields to match what the gcc library
Add sleep, wake, and wakeselect to the kernel info structure;
some device drivers will need these.
Make nodskchng do a Getbpb on the (non-existent) device; the officially
documented way of forcing a disk change requires this.
Remove the "flag" argument from the dskchng function, and
have the kernel check Rwabs for E_CHNG; this should save
a lot of duplication in user file systems, since everyone
really has to do this anyways.
Make sure that Fsfirst names can be null-terminated.
Oops: a misplaced bracket in disk_changed was causing
write-protected disks to always appear to have changed!
Made it illegal to delete or truncate an open file.
I think we can call this version an "alpha" one, now. No more
major features remain to be added (fingers crossed, here).
Media change detection code; this is now the kernel's
responsibility. This necessitated an additional function
for file systems; I hope this is the last one.
Check what kind of machine we're on, and adjust what devices are
present accordingly. The rs232 file has been renamed to "modem1".
WARNING: This will break existing code that uses the name "rs232".
Code for loading file systems (finally!)
Made Rwabs, Getbpb, and Mediach save registers (since device
drivers often don't, and loadable file systems will be calling
Implemented the "struct kerinfo" to pass information to loadable
Re-wrote path2cookie to provide for symbolic links; a new routine
(relpath2cookie) helps us out.
Code for creating, reading, and deleting symbolic links.
*fs.c, dosfile.c, file.h:
Changed the way file opens and creates are done; the former
(*getdev) routine for file systems has been split into
(*creat) and (*getdev), both of which are quite a bit simpler.
This whole scheme is clearer, less work for the file system,
and will support symbolic links much better.
Add security checks. This is still pretty sad, but at least it
can provide one with a modicum of protection against silly
Require write permission on a file before changing its date via
Cleaned up and streamlined a bit, and fixed tos_readlabel.
Changed the file system "getxattr", "chmode", "chown", and
"chattr" functions to take a single file cookie instead of a
(directory, name) pair. This should make most uses of these
functions (e.g. in name lookups) more efficient. Also,
changed the readdir() function to return a file cookie to go
along with the newly read file name.
If "init.prg" isn't found, try starting GEM instead.
Re-arranged to allow for symbolic links.
Implemented some media change routines.
Added Fchown and Fchmod system calls.
Added security check for Fattrib().
lots of places:
Try to make TRACE() and DEBUG() messages more useful for people
who don't know the internals of the kernel, and who just want to
debug their own programs.
Added Flink, Fsymlink, Freadlink, and Dcntl system calls.
Added a new mode to Dpathconf() to determine whether the
file system uses DOS type file naming conventions, ordinary
Unix type, or _POSIX_NO_TRUNC type.
Add an "fscntl" field to the file system structure.
Fix the mode values returned from getxattr() (regular files
have type S_IFREG, not S_IFMT).
Zero the child's srchdta field after fork_proc(); otherwise,
the accounting for Fsfirst/Fsnext can get messed up. Thanks
again to S. Henson.
As Steve Henson pointed out, resetting the effective user and
group id's in exec_region is probably a Bad Idea.
Change Dopendir/Dclosedir to use umalloc and ufree instead of
kmalloc and kfree.
When terminating, clean up after any Fsfirst/Fsnext sequences that
didn't go to completion.
Streamlined garbage collection code, and also corrected a bug in
which file indices used in directory searches could be garbage
Add symlink and hard link functions.
Make FIONWRITE work again (a line was accidentally deleted).
Make sure that Fselect() will select any pipes that have been
Put back the user id check in Pkill.
Make sure that the "euid" and "egid" fields are set with
the Psetuid and Psetgid calls. Also, make sure the fields
are reset after an exec.
Make exec_region shrink the process 'mem' and 'addr' tables
to the default again if extra regions had been allocated.
Get rid of the magic number "100", and introduce a maximum user
settable priority MAX_NICE so that the kernel can make sure
that a process that needs to run (e.g. an aborted vfork) will
run first by setting its priority to MAX_NICE+1.
Make sure the initial process memory tables are zeroed.
Adjust the process scheduling algorithm (yet again!). Also,
rename "nice_count" to "curpri".
Added Dopendir, Dreaddir, Drewinddir, Dclosedir system calls.
Made readdir return a file index (inode number) if it's not
doing a TOS mode search.
PHYSCONS is such an ugly name; CONSOLE makes more sense.
Allow the kernel to dynamically allocate memory region
descriptors if it runs out; also, increase the number that
it starts with by default.
Made it harmless to call kfree with a NULL argument.
Eliminate the 64 region per process limit, by making the "mem"
and "addr" arrays dynamically allocated.
Change the code for selecting which process to run next; if more
than one process is on the ready queue, we use a per-process
counter to prevent high priority processes from hogging all the
Release a process' controlling terminal (by setting it's process
group back to 0) if the process is a process group leader and
Made do_open set terminals up correctly on open/close, and
handle assigning process groups to them. Also, made the terminal's
process group be set automatically on Fforce(-1,...).
Added AKP's code for better resolution of time usage.
xlate.c, xlate32.s, newdisk.s
Removed all references to NEED_TRANSLATION. This is getting to be a
pain to maintain, and nobody seems to actually use it.
Fixed the ENAMETOOLONG detection code in readdir (thanks, Steve!).
New function, nap, for processes that are in busy loops waiting for
an event that probably won't happen for a while (e.g. waiting for
the user to hit a key); use e.g. nap(60) to sleep for 60 milliseconds
instead of yield().
create_env() should use the value from the current process' basepage,
since this may *not* be the same as the environment the process
was actually started with
Make Fcntl(fh, arg, F_SETFL) leave the file sharing mode alone as well
as the read/write mode.
Change the name "fifo" to "pipe"; change "drva", "drvb" etc. into just
"a", "b" etc.
Make it possible to provide a name with Pexec mode 104. Provide a new
mode 106 that starts a process in the background and automatically
detaches the process TPA from the parent's memory.
Made sure that tty_getchar() won't see (long) negative values
returned from a successful read, by clearing the high bit
of read values.
Made file systems responsible for dealing with "." and "..";
introduced a new (fake) EMOUNT error to indicate when ".." is
found in a root directory (this is for the benefit of the
unified file system code)
Changes to allow for the unified file system.
New file, for a "unified" file system.
Renamed denyaccess() to denyshare().
Changed getname() to work from the root down instead of from
the directory up; this should work better for mounting and
Moved the check for a drive specifier (A:\FOO) in Dsetpath to
where it should have been, namely before any use of the drive.
In opendir, make sure the directory structure is properly
Changed snice and srenice to pnice and prenice; also modified the
return values to be 16 bit (for the normal case), and 32 bit
negative for errors, so that low priority processes can be
distinguished from errors.
The Bconstat() check for the printer should be applied to device
0, not 1.
Re-wrote Fsfirst/next to use opendir/readdir/closedir. Re-wrote
the pat_match function to work correctly (at least, according
to the TOS rules :-).
Added opendir/readdir/closedir calls to file systems to allow
more general file systems; also changed getattr into getxattr
(again, to allow file systems with extra goodies), setattr into
chattr, and added chown and chmod calls. Deleted sfirst/snext
file system entry points, and the Xsfirst/Xsnext system calls.
Changed file systems to have separate calls for reading/writing
volume labels. Added checks to Fattrib and Fcreate to avoid creating
files with bad attributes (e.g. FA_LABEL or FA_DIR and anything
Change the definition of tosvers so that TOS 1.0 corresponds
to tosvers == 0x100, not tosvers == 0. Also, clean up the
code for testing TOS versions.
WARNING: This may break RAM TOS versions. I doubt it matters.
Always set the kbshft variable, so that kbshift is more
Eliminated the old code that allowed Super(-1L) to work (GEMDOS
doesn't support this, so why should MiNT?)
Added GEMDOS date and time routines, and made sure that
datestamp and timestamp are initialized properly when
MiNT is started.
Increased the size of the buffer used for reading relocation
information in load_region.
Changed the filesystem getdev call to return a file cookie
(this saves a call to lookup on every open).
Eliminated static variables, changed all routines that used to
return pointers to cookies to take an extra argument (a pointer
to the place to put the result).
Turn O_COMPAT sharing mode into O_DENYNONE (after making other
appropriate changes to the access modes).
Updated to reflect changes in debug.c.
Added calls to va_end where appropriate.
Before, hitting a key paused debugging output; now, debug_ws
checks the device that output is going to, so that e.g. if it's
going to the MIDI port, the output is paused when a character
arrives on the MIDI port.
Made exec_region use O_DENYNONE sharing mode instead of O_DENYW
Forbid closing file handles < 0; this will prevent accidental
destruction of the BIOS handles.
Change Fbiosdev to be MIDI specific, rename it to Fmidipipe, and
move it to dosfile.c. The semantics are a bit different, too;
see the comments in dosfile.c.
Really fix the MIDI output routines, this time. (sigh)
Fixed a typo in the message printed when bombs occur. Also,
removed the copying of data from the supervisor stack to the
BIOS area -- this was causing very strange problems, and it's
not clear that the info would be useful under MiNT anyway.
Finally, all this is only supposed to happen for certain
signals, not for any random killings.
Changed the definition of the DTA buffer to free up space for
user/group id fields and an extended attributes field. Made
sfirst/snext use the 'aux' field of the directory cookie
as an index.
Fixed Talarm() to return the number of seconds left before an
alarm, not the number of milliseconds.
New system calls, Xsfirst/Xsnext, for accessing file systems
with long (>12 character) names.
Fill in the BIOS post-mortem dump error correctly after
bus errors, address errors, etc. Also, made the "bomb" replacement
routine give the process basepage address and program counter,
as suggested by AKP.
Fixed the tos_lookup bug that was causing bus errors during file
Made opens with O_COMPAT sharing mode always open for both reading
and writing; this is so broken TOS programs that write to read-only
handles will continue to work.
Added TIOCGWINSZ/TIOCSWINSZ and the appropriate window size
fields to the tty structure to support them.
Remove user id checks (for now). Make it impossible to catch
Fix so Bconout returns a value (it really should, at least for
Don't context switch and retry alloc_region; file systems and some
parts of the kernel aren't expecting the context switch, and besides
the previous change makes this tactic less likely to be helpful.
Don't allocate *all* of the memory to the basepage, leave some for
the kernel and other programs.
Add a check for broken pipes when a program is trying to write
Block job control signals during a vfork instead of ignoring
them; this will result in the "right" thing happening after
the exec (since the blocked signals will then be unblocked).
Eeek! Fixed a very serious bug in the garbage collection
routines ("i" was used where "j" should have been in a loop:
result: things could be garbage collected that shouldn't
changed the return value from "dfree" to more accurately indicate
the free memory in the system, and to also provide information
about the smallest unit of allocable memory (currently a longword)
instead of passing fcookies to file systems, pass pointers to
them; this should slightly improve efficiency, and greatly
improve portability (otherwise, compilers used to make
installable file systems would have to have the same structure
passing/return conventions as the one that compiled the kernel)
new system call, Srenice(), to change priority of a different
change Fbiosdev() system call to take a pid argument
add per-file descriptor flags for things like "close on exec"
file.h, mem.c, *fs.c:
new file open mode, O_EXEC, for the kernel to use in Pexec
new file from AKP to implement a simple and fast message based
IPC; the new system call is Pmsg. Also note that the syscall number
of Pmsg is 0x125, which used to be used by Fbiosdev; Fbiosdev has
been moved to 0x126.
applied Steve Henson's patches to improve path2cookie's handling of
MAX_OPEN should be 32, not 20!
Ignore "close on exec" flag for the standard handles (for some
reason, bash manages to set these for 0,1,2; this is probably a bug
in the port of bash, but on the other hand it's unlikely that
anyone would really want to close the standard handles when doing
an exec, anyway)
Fixed RAW mode reads on terminals so that they're no longer
terminated by '\r' or '\n' (and so that pty slaves aren't forced
to read just 1 character at a time). Thanks to AKP for catching
Cleaned up the Dpathconf() return values to better reflect
reality, and made the code a little easier to understand.
Adjust bcostat() parameters so that V:\MIDI and V:\KBD call
the right (wrong) device (BIOS devices 3 and 4 are mixed
up for Bcostat).
Made sure that Malloc(0L) always returns a NULL pointer.
Made Fclose() of handles 0, 1, 2, and 3 restore the default
mappings. (Apparently TOS _does_ do this, after all.)
AHDI 3.1 added a new parameter to Rwabs; we now pass that
Make canceltimeout() free the memory used by the time out
descriptor. (another Fselect bug)
Removed ABORT and ALARM from list of signals that are reported
by the kernel.
Moved checkalarms() to do_wakeup_things() so that short time outs
will be properly recognized; this fixes a nasty bug in Fselect.
Make writes of 1024 or fewer bytes atomic. Also, increase pipe
buffer size to 4096.
Make O_EXCL and O_TRUNC bits useful.
Fully implement file sharing modes for tosfs and pipefs. A new
routine (denyaccess) is provided in filesys.c for checking
file open modes and determining conflicts (if any).
If a process writes on a broken pipe while ignoring SIGPIPE,
the write now returns -1. (Thanks, Stephen)
Applied bammi's patches to PATCHLEVEL 5 to fix some typos.
Applied AKP's debugging output patches, to allow TRACE and
DEBUG output to go to serial ports as well as the printer.
NEW SYSTEM CALL: Fbiosdev() to control redirection of BIOS
Added binput and boutput arrays to allow for per-process redirection
of BIOS device input and output to GEMDOS file handles.
Changed "mdi" to "midi".
WARNING: this change could (I suppose) break existing code.
Added a umalloc() function to allocate memory in user space,
and modified the various sfirst routines to use this to
allocate space for patterns instead of kmalloc.
Added an FS_CASESENSITIVE flag to control conversion of file
names to upper case for TOS domain processes.
Made sfirst/snext functions take an extra argument, the length
of the file name field in the DTA buffer (so that we can provide
Xsfirst/Xsnext functions that can work with longer names)
Fixed exec_region so that the close-on-exec flag works.
Made path2cookie take the name of the place to store the last
component of the path name as an argument (instead of always
storing it in the global variable temp1).
Added code for O_NDELAY on bios devices.
Cleaned up garbage collection a bit -- I hope this fixes the
problems with running out of indices.
Returned the special parsing code for CON:, AUX:, etc.
OOPS! The flock structure was missing an element (l_whence). It
WARNING: This change may break existing code.
Made kmalloc take a long parameter, just in case installable
file systems need lots of memory.
file.h, atarierr.h, pipefs.c:
Made file modes compatible with _FLK specification. Also
added the ELOCKED and ENSLOCK errors to atarierr.h, and made
pipefs.c use ELOCKED instead of EACCDN.
WARNING: this *will* break existing programs. In particular, mgr
no longer works :-( because O_NDELAY has changed. (this was
Added Flock() system call.
Made the initial user stack pointer low enough so that syscall.s
won't run into the end of memory if the user makes a system call
right away and doesn't push many parameters (the code in syscall
always tries to copy a large chunk of the caller's stack).
Made vfork'd processes ignore job control signals (thanks to
Stephen for pointing out how some shells rely on BSD's similar
dosfile.c, file.h, *fs.c, bios.c:
Changed f_select to use the new timeout mechanism, and provided
routines in device drivers to wake up selecting processes.
New queue, SELECT_Q, for processes doing "select", to match above
Changed t_alarm to use the new timeout mechanism.
Added a new "timeout" mechanism, so that processes can specify
an action to be taken when a counter expires.
Cleaned up TRACE and DEBUG output
Set current directory based on the TOS current directory
when MiNT is starting up.
Added AKP's "trace" mode patch
Replaced strcmp() for . and .. with direct comparisons, again
Improved search performance a bit (indicies are now allocated
at the beginning of the list, instead of at the end)
Introduced PATCHLEVEL for alpha and beta test versions
Made kmalloc() try the kernel memory region first for small
regions, to cut down fragmentation of the user's memory space
Made the system stacks bigger, to compensate for the bigger
contexts now that there's FPU support
Fixed bug with Pexec mode 6 (thanks again, AKP)
Changed FD0 to STDIN, FD1 to STDOUT, etc.
WARNING: this change could break existing code
'/' is no longer a directory separator for MiNT domain processes
(few were using it, and it simplifies things to be able to
assume '\' is the only such separator).
WARNING: this change could break existing code
all over the place:
Changed the way directories/files are stored. We now have
"file cookies" for directories, instead of strings. We
also now have two directories per drive per process
(a root and current).
Removed from the main compile, and MINIX_FS symbol was also
removed -- this will be a loadable file system someday
(soon, I hope).
Added Alex Kiernan's patches to support compilation under
Lattice C v5
Added Alex Kiernan's FPU co-processor patches. WARNING: this
changes the layout of the proc structure in memory, and so
breaks "ps" and similar programs.
Changed sleep() to take the wait condition as an argument; this
means that fewer things need to know the internals of the
Added AKP's T_TOSTOP flag changes
Changed the 8K buffer in do_change to a static variable; our
stacks aren't *that* big!
Fixed a typo that was causing serious problems with the bus
error and other exception codes on the TT (thanks for
catching this, Allan).
Corrected the GEMDOS termination vector code (the system stack
was being corrupted if the user's code returned). Thanks to
Julian Reschke for catching this error.
fix ^C and ^Y to send the signals to the whole process group,
and also to make sure processes don't read these keys if
they're turned into signals
fix exception handlers to be more careful about the distinction
between being in or out of the kernel
intr.s, syscall.s, main.c:
make sure interrupts are off before changing any vectors
fixed the annoying problems with CTRL-ALT-Fx sometimes leaving
keys in the buffer
forced p_sigreturn() with no signal pending to unwind the
*whole* signal stack, in case there were multiple signals
pending at the time the user did a longjmp() (or whatever
prompted the Psigreturn())
p_wait3 now supports the WUNTRACED bit; if this isn't set,
processes stopped due to job control are *not* returned
removed dLibs kludge -- some programs rely on p_parent being
non-zero to tell them that they're not accessories
cleaned up job control stuff to be more Unix like
added a new memory map for the kernel -- this should ease
the problems with programs grabbing all of available memory
incorporated Allan's bugfixes; alternative RAM should work now
signal.c, main.c, intr.s:
integrated signals with normal exceptions, so that e.g.
a bus error raises SIGBUS. This improves the survivability
of the kernel, so that a bus error resulting from a bad
system call parameter won't kill MiNT, just the offending
kludge to let low priority processes run every so often, even
in the presence of a high priority process that is ready to run
ENMFIL is -49, not -47 -- so much for Abacus' docs :-)
changes to allow read/write from process space
changed lots of function parameter types to avoid promotion and
prototype problems with 32 bit code
changed IOREC to IOREC_T to avoid name conflicts with some osbind.h
made mouse driver change the line A mouse position variables, so MGR
will work with bigscrn and similar large screen emulators
new version from Stephen, now supports floppies and other removable
mem.c, dosmem.c, dos.c:
added code to support new TT TOS calls Mxalloc and Maddalt, plus
program flags for loading/mallocing in alternate memory
changed so that bios handles 0 and 1 can be redirected just like
handle 2 (via the new file handles -3 and -2 respectively; AUX:
and PRN: now refer to these files, and RS232 and CENTR to the
Dsetdrv() fixed to return an error indication when one happens
fixed Super() bug (thanks Stephen)
incorporated changes to handle 1K sector sizes
new file, courtesy of Stephen N. Henson (email@example.com)
this is still "under construction"; see minixfs.doc for more details
CTRL-ALT-UNDO now raises SIGQUIT, for the benefit of people with
foreign ROMs (some have trouble with ^\)
changed pathname resolution code so that multiple slashes in a file
name have the same effect as single slashes. POSIX mandates this,
and some Unix programs expect it, too
changed do_vfork() code so that the text segment of processes is
*not* saved in a fork() if the process has separate text, data, and
bss segments; this saves a fair bit of memory
changed the process initialization code to better deal with job
control; also changed handle 2 to be AUX: (as under TOS) rather
added CTRL-ALT-F5 (show memory usage) and CTRL-ALT-F6
make explicit the fact the individual file names are limited to
change FILENAME_MAX to PATH_MAX
fixed up comments and debugging/trace info for load_region
NEW SYSTEM CALL: Psigpending() returns the set of signals that
have been sent to the process, but not yet delivered.
NEW SYSTEM CALLS:
Sysconf(n) returns information about the global limits of the
currently running version of MiNT
Dpathconf(name, n) returns information about the file system that
the file "name" is located on
allow CTRL-ALT-C, CTRL-ALT-\, and CTRL-ALT-Z to force a SIGINT,
SIGQUIT, or SIGTSTP, respectively, even if the terminal is in raw
call zero() instead of bzero()
changes to make MiNT TT compatible. Thanks to Allan Pratt for this!
biosfs.c, tosfs.c, pipefs.c, procfs.c:
fsfirst/fsnext return all upper case in TOS domain now, but
lower case (or mixed) in MiNT domain; this is to try to wean
programmers off of the habit of assuming everything is upper case
(and converting accordingly)
made mouse compatible with TOS ALT-cursor keys (the Y direction was
IPL 7 before reboot (thanks, Allan)
made version numbering a bit easier (big deal)
AARGH! The cookie jar stuff was plain wrong (the last cookie should
have the total number of slots, not just the ones that are free).
pass current environment along to init.prg, instead of forcing an
corrected killpg() bug (wasn't checking signals, so the current
process didn't get the signal until later)
made sure that all sizes would always be rounded to the nearest
longword. Just in case they aren't, Malloc(-1L) rounds down to the
next smallest longword.
lots of places:
memory handling was overhauled completely; kmalloc now allocates
memory from the same space as do m_alloc and p_exec, so there is
no artificial constraint on the number of processes
added Talarm() and Pause() system calls
bios.c, tty.c, pipefs.c:
added real tty structures that programs can manipulate
added some sanity checks for things like stack overflow
revamped signal handling so that Psigreturn() no longer needs an
made Pexec'ing processes immune to SIGINT, SIGHUP, and SIGTSTP
fixed the Psigreturn race condition bug
biosfs.c, pipefs.c, filesys.c, util.c:
added case-insensitive string comparison routine, and modified the
file systems to use it
changed return values of status calls from 1 to -1, to be TOS
added new calls to get resource usage, and set resource limits
added new call, f_select
changed so stopped processes always have a return code of 0177
added a fake "third button" on the mouse (you get it by holding down
a shift key and a mouse button)
made mouse_read return at least 1 byte
bios.c, proc.c, biosfs.c:
added code to check for CTRL-ALT-key combinations on every
process switch; thus, debugging, rebooting, etc. do not require
waiting for a read from the keyboard. Also, ^C sends a SIGINT
immediately, and ^Z (SIGTSTP) and ^\ (SIGQUIT) take effect
right away, too.
CTRL-ALT-DEL supported for TOS < 1.4
First publically released version (made available for FTP as a beta test)