Commit Graph

27 Commits

Author SHA1 Message Date
Jennifer Averett
77c81fd2a1 Removed an uninitialized variable. 1999-03-29 18:24:34 +00:00
Joel Sherrill
23c4bbf58a Use proper include for libio.h. 1999-03-16 01:41:16 +00:00
Joel Sherrill
3195d9c0a5 Added code to translate internal libio flags to POSIX style flags. 1999-03-08 21:39:16 +00:00
Joel Sherrill
3ef87981eb Added F_GETFL support so the fdopen() implementation in newlib 1.8.1
would work.  At the same time, the initial implementation of F_SETFL
was added.  A support routine was added to convert internal libio
flags back to the POSIX style.  Eventually the internal representation
should be eliminated in the interest of simplicity and code reduction.
This problem was reported by Jake Janovetz <janovetz@tempest.ece.uiuc.edu>.
1999-03-06 18:09:15 +00:00
Joel Sherrill
73f6236bc0 Patch from Eric Norum <eric@skatter.usask.ca> to eliminate external
IO handlers scheme that was implemented originally just to support
sockets.  The file system IO switch is more general and works fine.
1999-03-01 22:40:08 +00:00
Joel Sherrill
cca44008d8 Merged Eric Norum's select patch that was based on 4.0 and resolved
all conflicts.
1998-12-10 23:31:54 +00:00
Joel Sherrill
07a3253de2 Added base version of file system infrastructure. This includes a major
overhaul of the RTEMS system call interface.  This base file system is
the "In-Memory File System" aka IMFS.

The design and implementation was done by the following people:

  + Joel Sherrill (joel@OARcorp.com)
  + Jennifer Averett (jennifer@OARcorp.com)
  + Steve "Mr Mount" Salitasc (salitasc@OARcorp.com)
  + Kerwin Wade (wade@OARcorp.com)

PROBLEMS
========
  + It is VERY likely that merging this will break the UNIX port.  This
    can/will be fixed.

  + There is likely some reentrancy/mutual exclusion needed.

  + Eventually, there should be a "mini-IMFS" description table to
    eliminate links, symlinks, etc to save memory.  All you need to
    have "classic RTEMS" functionality is technically directories
    and device IO.  All the rest could be left out to save memory.
1998-11-23 19:07:58 +00:00
Joel Sherrill
4955afcca5 rtems_libio_number_iops is now defined in confdefs.h so the maximum
file descriptors is user configurable.
1998-04-18 17:25:35 +00:00
Joel Sherrill
bd9c3d1e76 Numerous changes which in total greatly reduced the amount of source
code in each BSP's bspstart.c.  These changes were:

  + confdefs.h now knows libio's semaphore requirements
  + shared/main.c now copies Configuration to BSP_Configuration
  + shared/main.c fills in the Cpu_table with default values

This removed the need for rtems_libio_config() and the constant
BSP_LIBIO_MAX_FDS in every BSP.  Plus now the maximum number of open
files can now be set on the gcc command line.
1998-04-15 20:50:31 +00:00
Joel Sherrill
9646d5bea1 Patch from Eric Norum <eric@skatter.usask.ca>:
I've gone through and cleaned up the TFTP driver so that it fits
  into the libio system.  Here's the comment from the new driver:

  /*
   * Usage:
   *
   * To open `/bootfiles/image' on `hostname' for reading:
   *         fd = open ("/TFTP/hostname/bootfiles/image", O_RDONLY);
   *
   * The `hostname' can be a symbolic name or four
   * dot-separated decimal values.
   *
   * To open a file on the host which supplied the BOOTP
   * information just leave the `hostname' part empty:
   *         fd = open ("/TFTP//bootfiles/image", O_RDONLY);
   *
   */

  You can `fopen' TFTP files the same way:

                  fp = fopen (fullname, "r");
                  nread = fread (cbuf, sizeof cbuf[0], sizeof cbuf, fp);

  The diff's are included below.  I've also modified the TFTP demo
  program and the bootstrap PROM example.  They should be on my ftp
  site `soon'.

  The one thing I don't like is the way I had to do an end-run on the
  libio routines to get errno passed back from my driver to the
  application (since there are some errno codes that don't map to RTEMS
  status codes).  My approach was to set errno in the driver and have
  the driver routine return an RTEMS status code that I `know' isn't in
  the errno_assoc[] in libio.c.

  Perhaps there should be an RTEMS_TRANPARENT_ERRNO status code (or
  something similar) which driver routines could return to indicate
  that the driver routine has set errno and that the libio routines
  shouldn't attempt to map the returned status code to errno.

  Actually, I think the entire I/O system needs looking at -- as
  you've already mentioned.  The hacks I've dropped in to syscalls.c to
  make fstat work, for example, are *not* shining examples of good
  code......
1998-02-17 18:46:38 +00:00
Joel Sherrill
8f367d6baa Bug fix from Eric Norum:
After weeks of trying to figure why my RTEMS/KASQ server crashes now
    and then I found a nasty bug I introduced in adding multiple-driver
    support to libio.  The bug only affects `add-on' driver classes (like
    the networking code).  Old-style file descriptors were not affected.

    The bug cleared 32 bytes of memory (unspecified location) whenever a
    `close' of a socket was performed!  I was clearing an IOP I hadn't
    allocated -- and the pointer wasn't initiallized, either!
1997-09-19 18:31:05 +00:00
Joel Sherrill
7d352a49b7 Added RTEMS_IO_ERROR status code. 1997-08-28 13:59:41 +00:00
Joel Sherrill
3473f60548 Added error numbers and changed default error code from 0 to -1 for
error number mapping.
1997-08-27 20:33:49 +00:00
Joel Sherrill
78d87bd3f3 Fixed iop/memory leak bug reported by Dan Dickey. 1997-08-22 19:16:47 +00:00
Joel Sherrill
e2d7955973 Added ka9q tcpip stack and network driver for the gen68360. This effort
was done based on the 3.6.0 release and had to be autoconf'ed locally.
It is turned on is the bsp enables it and it is not explicitly disabled
via the configure option --disable-tcpip.   As many warnings as possible
were removed locally after the code was merged.  Only the gen68360
and mvme136 bsps were compiled this way.

The ka9q port and network driver were submitted by Eric Norum
(eric@skatter.USask.Ca).

The network demo programs are not included in the tree at this point.
1997-04-09 14:05:50 +00:00
Joel Sherrill
dcec5a4d60 Merged newlib's libgloss support for rtems into this directory. This
should simplify the build process.
1997-01-29 00:29:25 +00:00
Joel Sherrill
331d9e3b91 Added asserts for unhandled conditions which need to result in error
statuses being returned to gnat runtime in order for it to raise
use_errors.  This was needed to identify the places in gnat's runtime
which needed to be addressed.
1996-11-08 20:08:52 +00:00
Joel Sherrill
9e406d983a added ENOSYS support 1996-10-15 21:58:32 +00:00
Joel Sherrill
09b1f1ad2c patch from Tony Bennett on the ifdef for O_NDELAY 1996-06-06 17:57:39 +00:00
Joel Sherrill
e6d4b1d086 added initial posix configuration support 1996-05-28 13:13:34 +00:00
Joel Sherrill
8b2ecf8546 updates from Tony Bennett 1996-05-23 15:37:38 +00:00
Joel Sherrill
1f94ed6bfd Updates from Tony Bennett. 1996-04-22 16:50:17 +00:00
Joel Sherrill
c64e4ed482 updates from Tony Bennett for PA and UNIX ports 1996-01-15 21:50:28 +00:00
Joel Sherrill
5e9b32b439 posix support initially added 1995-09-26 19:27:15 +00:00
Joel Sherrill
3a4ae6c210 The word "RTEMS" almost completely removed from the core.
Configuration Table Template file added and all tests
modified to use this.  All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines.  Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized.  These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver.  Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.
1995-09-11 19:35:39 +00:00
Joel Sherrill
7f6a24abdd Added unused priority ceiling parameter to rtems_semaphore_create.
Rearranged code to created thread handler routines to initialize,
start, restart, and "close/delete" a thread.

Made internal threads their own object class.  This now uses the
thread support routines for starting and initializing a thread.

Insured deleted tasks are freed to the Inactive pool associated with the
correct Information block.

Added an RTEMS API specific data area to the thread control block.

Beginnings of removing the word "rtems" from the core.
1995-08-28 15:30:29 +00:00
Joel Sherrill
b06e68ef1f Numerous miscellaneous features incorporated from Tony Bennett
(tbennett@divnc.com) including the following major additions:

  + variable length messages
  + named devices
  + debug monitor
  + association tables/variables
1995-08-17 19:51:51 +00:00