home *** CD-ROM | disk | FTP | other *** search
-
- *NOTE*: to compile the library you will need the header files in mntinc24.zoo
-
- ============================================================================
-
- Here is mintlib, a library for gcc, Sozobon, Pure C, and Lattice C which
- produces programs usable under either MiNT or TOS (of course, some features,
- e.g. pipe(), are only available under MiNT). This version has been reasonably
- well tested under both TOS and MiNT, and with 16 and 32 bit integers, but no
- doubt bugs remain. Please report any that you find.
-
- The main library has the GNU C version of the library, plus the common
- files. See the lattice, purec, and sozobon directories for compiler
- specific information.
-
- The Lattice C support is probably a bit rough around the edges (I may
- very well have messed up some of the patches, and I don't have Lattice to
- test it). Similarly, I can't test the Sozobon and Pure C support myself.
-
- There are no docs ("Use the Source, Luke"), but most of the library should
- be pretty self-explanatory. If you know ANSI C and/or Posix, then most
- of the functions should be pretty clear to you.
-
- MiNT specific features are active when the external variable __mint is
- non-zero; this variable is set automatically by the startup code in main.c.
-
- Some things to watch out for:
-
- (1) MiNT has a blocking fork(), i.e. the parent waits for the child to
- relinquish its address space rather than continuing in parallel.
- (Do NOT rely on this, though, since it will be corrected in a future
- version of MiNT!)
- (2) Using the spawn functions instead of fork/exec means that your programs
- will work under TOS as well as under MiNT. vfork() also works under
- TOS now, so vfork/exec is another viable alternative.
- (3) The longjmp() code has a call to Psigreturn() embedded in it; this means
- that most signal handlers will work without changes, but in some very
- bizarre circumstances this could cause a problem (if the sig handler
- longjmps *within* itself, and then returns, for example).
- (4) Under TOS, all terminal reads are assumed to come from the console
- (5) You'll note that there is only minimal support for UNIXMODE;
- this is because MiNT 0.9 supports symlinks in the kernel.
- (6) A function call, tfork(), is provided to start a new thread of
- execution in the same address space. The declaration is
- int tfork( int (*func)(), long arg ).
- A new process is started, which executes concurrently with the parent
- process and in the same address space (but a different stack).
- The child begins at the address in func, with the stack set up as though
- the call (*func)(arg) was made (in fact, this call *is* made!).
- The child will exit when func returns, with the exit status being the
- return code of func. The parent continues to execute concurrently;
- in the parent, the value returned from tfork() is the process id of the
- child.
- (7) The library is not set up to handle multiple threads of execution in the
- same address space, so you'll have to provide semaphores for critical
- library calls (e.g. malloc) yourself if you have multiple threads.
-
- The library is based on the gcc library that Jwahar Bammi and I put together.
- Lots of people have contributed to it, including (but not limited to):
-
- Adrian Ashley, Jwahar Bammi, Scott Bigham, Kai-Uwe Bloem, Howard Chu,
- John R. Dunning, Doug Gwyn, Dave Gymer, Michael Hohmuth, Alan Hourihane,
- Alex Kiernan, Ulf Moeller, Allan Pratt, Arnold D. Robbins, Edgar Roeder,
- Rich Salz, Dale Schumacher, Eric Smith, Henry Spencer, and Stephen Usher.
-
- I've hacked on things quite a bit, so if they're broken don't blame the
- original authors, blame me.
-
- Eric R. Smith
- eric.smith@uwo.ca
-