| Commit message (Collapse) | Author | Files | Lines |
|
Update #3136.
|
|
Check iop reference count in close() and return -1 with errno set to
EBUSY in case the file descriptor is still in use.
Update #3132.
|
|
Update #3132.
|
|
Close #3134.
|
|
The top-level IO library structures should contain no special-case data.
Update #2859.
|
|
Update #2859.
|
|
|
|
|
|
http://www.google-melange.com/gci/task/view/google/gci2012/7996208
|
|
Script does what is expected and tries to do it as
smartly as possible.
+ remove occurrences of two blank comment lines
next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
contain CVS Ids
+ If the processing left a blank line at the top of
a file, it was removed.
|
|
The per file descriptor semaphore (field of rtems_libio_t) is unused in
RTEMS. There is a considerable memory overhead due to that. A
semaphore needs roughly 124 bytes which is huge compared to the
approximately 72 bytes for the file descriptor structure itself. Device
drivers can create their own synchronization primitives in the open
handler on demand.
|
|
o A new data structure rtems_filesystem_global_location_t was
introduced to be used for
o the mount point location in the mount table entry,
o the file system root location in the mount table entry,
o the root directory location in the user environment, and
o the current directory location in the user environment.
During the path evaluation global start locations are obtained to
ensure that the current file system instance will be not unmounted in
the meantime.
o The user environment uses now reference counting and is protected
from concurrent access.
o The path evaluation process was completely rewritten and simplified.
The IMFS, RFS, NFS, and DOSFS use now a generic path evaluation
method. Recursive calls in the path evaluation have been replaced
with iteration to avoid stack overflows. Only the evaluation of
symbolic links is recursive. No dynamic memory allocations and
intermediate buffers are used in the high level path evaluation. No
global locks are held during the file system instance specific path
evaluation process.
o Recursive symbolic link evaluation is now limited by
RTEMS_FILESYSTEM_SYMLOOP_MAX. Applications can retrieve this value
via sysconf().
o The device file system (devFS) uses now no global variables and
allocation from the workspace. Node names are allocated from the
heap.
o The upper layer lseek() performs now some parameter checks.
o The upper layer ftruncate() performs now some parameter checks.
o unmask() is now restricted to the RWX flags and protected from
concurrent access.
o The fchmod_h and rmnod_h file system node handlers are now a file
system operation.
o The unlink_h operation has been removed. All nodes are now destroyed
with the rmnod_h operation.
o New lock_h, unlock_h, clonenod_h, and are_nodes_equal_h file system
operations.
o The path evaluation and file system operations are now protected by
per file system instance lock and unlock operations.
o Fix and test file descriptor duplicate in fcntl().
o New test fstests/fsnofs01.
|
|
* libcsupport/include/rtems/libio_.h, libcsupport/src/envlock.c,
libcsupport/src/libio.c: Added and use rtems_libio_lock() and
rtems_libio_unlock(). Cleaned up includes and declarations. Do not
use RTEMS_NO_PRIORITY for unused ceiling priority in
rtems_semaphore_create().
|
|
|
|
|
|
PR 1359/cpukit
* libcsupport/src/libio.c: rtems_libio_allocate:
rtems_libio_iop_freelist incorrectly zeroed on semaphore error. Now
checks error and does not modify anything until sure it has created
semaphore.
|
|
reduce size of data area.
IMFS: Fixed creation of symbolic links to avoid a compiler warning.
DOSFS: Use LibBlock instead of read() to read the boot record.
|
|
* libcsupport/src/assoc.c, libcsupport/src/libio.c,
libcsupport/src/write.c: Split files to shrink minimum.exe. Hopefully
this will not be deemed necessary to commit to the 4.7 branch.
* libcsupport/src/assoclocalbyname.c,
libcsupport/src/assoclocalbyremote.c,
libcsupport/src/assoclocalbyremotebitfield.c,
libcsupport/src/assocnamebylocal.c,
libcsupport/src/assocnamebylocalbitfield.c,
libcsupport/src/assocnamebyremote.c,
libcsupport/src/assocnamebyremotebitfield.c,
libcsupport/src/assocptrbylocal.c, libcsupport/src/assocptrbyname.c,
libcsupport/src/assocptrbyremote.c,
libcsupport/src/assocremotebylocal.c,
libcsupport/src/assocremotebylocalbitfield.c,
libcsupport/src/assocremotebyname.c, libcsupport/src/libio_init.c,
libcsupport/src/write_r.c: New files.
|
|
PR 886/filesystem
* libcsupport/src/libio.c: fcntl(fd,F_GETFL) fails to set O_NONBLOCK if
the descriptor is in non-blocking mode.
|
|
|
|
|
|
* libcsupport/include/chain.h, libcsupport/include/clockdrv.h,
libcsupport/include/ringbuf.h, libcsupport/include/spurious.h,
libcsupport/include/timerdrv.h, libcsupport/include/vmeintr.h,
libcsupport/include/motorola/mc68230.h,
libcsupport/include/rtems/assoc.h, libcsupport/include/rtems/libio.h,
libcsupport/include/rtems/libio_.h,
libcsupport/include/rtems/termiostypes.h,
libcsupport/include/zilog/z8036.h, libcsupport/include/zilog/z8530.h,
libcsupport/include/zilog/z8536.h, libcsupport/src/__gettod.c,
libcsupport/src/assoc.c, libcsupport/src/assocnamebad.c,
libcsupport/src/error.c, libcsupport/src/libio.c,
libcsupport/src/libio_sockets.c, libcsupport/src/malloc.c,
libcsupport/src/no_libc.c, libcsupport/src/termios.c,
libcsupport/src/termiosreserveresources.c: Convert to using c99
fixed-size types.
|
|
* include/chain.h, include/clockdrv.h, include/console.h,
include/iosupp.h, include/rtc.h, include/spurious.h,
include/timerdrv.h, include/vmeintr.h, include/motorola/mc68230.h,
include/rtems/libcsupport.h, include/rtems/libio.h,
include/rtems/libio_.h, include/rtems/termiostypes.h,
include/sys/termios.h, include/zilog/z8036.h, include/zilog/z8530.h,
include/zilog/z8536.h, src/__brk.c, src/__gettod.c, src/__sbrk.c,
src/__times.c, src/access.c, src/base_fs.c, src/cfgetispeed.c,
src/cfgetospeed.c, src/cfsetispeed.c, src/cfsetospeed.c, src/chdir.c,
src/chmod.c, src/chown.c, src/chroot.c, src/close.c, src/ctermid.c,
src/dup.c, src/dup2.c, src/eval.c, src/fchdir.c, src/fchmod.c,
src/fcntl.c, src/fdatasync.c, src/fpathconf.c,
src/fs_null_handlers.c, src/fstat.c, src/fsync.c, src/ftruncate.c,
src/getdents.c, src/getpwent.c, src/hosterr.c, src/ioctl.c,
src/isatty.c, src/libio.c, src/libio_sockets.c, src/link.c,
src/lseek.c, src/lstat.c, src/malloc.c, src/mallocfreespace.c,
src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mount.c, src/newlibc.c,
src/no_libc.c, src/no_posix.c, src/open.c, src/pathconf.c,
src/pipe.c, src/privateenv.c, src/read.c, src/readlink.c,
src/rewinddir.c, src/rmdir.c, src/seekdir.c, src/stat.c,
src/symlink.c, src/sync.c, src/tcdrain.c, src/tcflow.c,
src/tcflush.c, src/tcgetattr.c, src/tcgetprgrp.c, src/tcsendbreak.c,
src/tcsetattr.c, src/tcsetpgrp.c, src/telldir.c, src/termios.c,
src/termiosinitialize.c, src/truncate.c, src/umask.c, src/unixlibc.c,
src/unlink.c, src/unmount.c, src/utime.c, src/write.c: URL for
license changed.
|
|
* libc/libio.c: Cleanup of initialization per suggestion from
Eric Norum.
|
|
* libc/libio.c: Initialize more fields to NULL/0 during initialiation.
* include/rtems/libio_.h: Fix freenode macro so it works for sockets
which do not have the full set of filesystem operations and are
initialized via something other than open().
|
|
* libc/libio.c (rtems_libio_allocate): Make sure size and offset
fields are cleared on each file open. Before this field was cleared,
this resulted in the value from the last time that IOP was used
being still in place. Discovered by Andrew Bythell
<abythell@nortelnetworks.com>.
* libc/open.c: Remove redundant setting of iop->offset.
|
|
* configure.in: Add libc/config.h
* libc/Makefile.am: Add INCLUDES += -I. to pickup config.h
* libc/.cvsignore: Add config.h and stamp-h
* libc/*.c: Add config.h support.
|
|
* libc/libio.c: Special treatment of O_NDELAY for Cygwin.
|
|
* include/Makefile.am, include/rtems/libio_.h, libc/Makefile.am,
libc/assoc.c, libc/assocnamebad.c, libc/base_fs.c, libc/cfsetispeed.c,
libc/cfsetospeed.c, libc/chdir.c, libc/chmod.c, libc/chown.c,
libc/close.c, libc/closedir.c, libc/dup2.c, libc/error.c, libc/eval.c,
libc/fchdir.c, libc/fchmod.c, libc/fcntl.c, libc/fdatasync.c,
libc/fpathconf.c, libc/fstat.c, libc/fsync.c, libc/ftruncate.c,
libc/getdents.c, libc/ioctl.c, libc/libio.c, libc/libio_sockets.c,
libc/link.c, libc/lseek.c, libc/malloc.c, libc/mallocfreespace.c,
libc/mknod.c, libc/mount.c, libc/newlibc.c, libc/no_libc.c,
libc/open.c, libc/read.c, libc/readlink.c, libc/rmdir.c, libc/stat.c,
libc/symlink.c, libc/tcsetattr.c, libc/telldir.c, libc/ttyname.c,
libc/ttyname_r.c, libc/umask.c, libc/unlink.c, libc/unmount.c,
libc/utime.c, libc/write.c:
assoc.h, error.h, libio_.h, libio.h, and libcsupport.h moved
from libc to lib/include/rtems and now must be referenced as
<rtems/XXX.h>.
* include/rtems/Makefile.am, include/rtems/.cvsignore: New file.
* include/rtems/assoc.h, include/rtems/error.h,
include/rtems/libcsupport.h, include/rtems/libio.h,
include/rtems/libio_.h: New/moved files.
|
|
* libio.c: Added O_NONBLOCK to list of flags.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>.
|
|
IO handlers scheme that was implemented originally just to support
sockets. The file system IO switch is more general and works fine.
|
|
all conflicts.
|
|
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.
|
|
file descriptors is user configurable.
|
|
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.
|
|
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......
|
|
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!
|
|
|
|
error number mapping.
|
|
|
|
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.
|
|
should simplify the build process.
|
|
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.
|