summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/libio_.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update company nameSebastian Huber2023-05-201-1/+1
| | | | | The embedded brains GmbH & Co. KG is the legal successor of embedded brains GmbH.
* libcsupport: Added futimens() and utimensat()Ryan Long2021-05-281-8/+86
| | | | | | | | | | Created futimens.c and utimensat.c to add support for the POSIX methods futimens() and utimensat(). utime() and utimes() are considered obsolote by POSIX, but RTEMS will continue to support them. Closes #4396
* libio: Robust file descriptor reference countingSebastian Huber2020-03-131-23/+1
| | | | | | | | | | | | There was a race conditon in the reference counting of file descriptors during a close() operation. After the call to the close handler, the rtems_libio_free() function cleared the flags to zero. However, at this point in time there may still exist some holders of the file descriptor. With RTEMS_DEBUG enabled this could lead to failed assertions in rtems_libio_iop_drop(). Change the code to use only atomic read-modify-write operations on the rtems_libio_iop::flags.
* libio: Constify some functionsSebastian Huber2020-03-091-4/+4
|
* libio: Add POSIX user environment pointer to TCBSebastian Huber2020-02-251-4/+0
| | | | | | | | | | The IO library used a POSIX key to store an optional POSIX user environment pointer. This pulled in the POSIX keys support in every application configuration. Add a user environment pointer to the thread control block (TCB) instead. Applications which do not need the POSIX user environment will just get an overhead of one pointer per thread. Close #3882.
* doxygen: Added some subgroups to IO LibraryAndreas Dachsberger2019-04-041-0/+2
| | | | | | Update #3706. Types and Mount, IO Internal, Kernel Print Support
* Remove make preinstallChris Johns2018-01-251-0/+1049
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
* 2002-11-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Ralf Corsepius2002-11-181-310/+0
| | | | * include/rtems/libio.h: Remove.
* 2001-12-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill2002-01-041-3/+0
| | | | | | | | | | | | | | | | * configure.ac: Use AS_IF instead of if/then/else. Add AC_DEFINE_UNQUOTED(RTEMS_UNIX) for RTEMS_CPU==unix. Add AC_DEFINE_UNQUOTED(RTEMS_UNIXLIB) for RTEMS_CPU==unix. Add include/Makefile to CONFIG_FILES. Add AC_ENABLE_MULITLIB. Remove wrapup/rtems, wrapup/itron, wrapup/posix. Remove */optman/Makefile from CONFIG_FILES. * Makefile.am: Add include to SUBDIRS. * rtems/Makefile.am: Remove optman from SUBDIRS. * sapi/Makefile.am: Remove optman from SUBDIRS. * include/Makefile.am: New file. * include/rtems/bspIo.h: Relocated from lib/include. * include/rtems/libio_.h: Relocated from lib/include.
* 2001-10-25 Jennifer Averett <jennifer@OARcorp.com>Joel Sherrill2001-10-251-2/+3
| | | | | | | * 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().
* 2001-08-17 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2001-08-171-0/+8
| | | | | | | | * include/rtems/libio_.h: Added ifdef to ensure that LOGIN_NAME_MAX is defined on GNU/Linux (RedHat 6.2 distribution). * libc/unixlibc.c: Added stubs for rtems_io_register_name() and rtems_io_lookup_name() so UNIX port would compile the IO manager sptest that registers /dev/null.
* 2000-05-24 Fernando Ruiz Casas <fernando.ruiz@ctv.es>Joel Sherrill2001-05-241-0/+18
| | | | | * include/rtems/libio_.h: Added login name, uid, gid, euid, and egid so they can be part of the private environment.
* 2001-04-20 Correo Fernando-ruiz <correo@fernando-ruiz.com>Joel Sherrill2001-04-201-0/+3
| | | | | | | | | | | | | | | | | * include/rtems/libio_.h, libc/chroot.c, libc/privateenv.c: Private environment and chroot() enhancements and fixes. Comments: + privateenv has been modified to let at chroot() to be more POSIX like Sergei Organov recommended. + A task owner lets that rtems_set_private_env() will be called twice or more times. + chroot() can be called without a previous rtems_set_private_env(); (transpanrently) + The second call of rtems_set_private_env() makes a internal chroot("/") into global imfs_root. + chroot() runs like chdir() without a previous chdir("/") with the global root. + The current directory can be in a wrong place like Linux and many other Unices.
* 2001-01-25 Fernando Ruiz <fernando.ruiz@ctv.es>Joel Sherrill2001-01-251-9/+20
| | | | | | | | | | * Alternate email is correo@fernando-ruiz.com * libc/privateenv.c: New file. * include/rtems/libio_.h, libc/Makefile.am, libc/base_fs.c, libc/unmount.c: Moved default umask, current working directory, root, and links followed count into a structure "user environment" that can then be treated as a unit. This enable giving unique copies of these to individual threads or collection of threads.
* 2000-11-01 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2000-11-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* 2000-09-28 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2000-09-281-2/+2
| | | | | | | | | | | | | | | * libc/libio.h (rtems_filesystem_file_handlers_r, rtems_filesystem_operations_table): Added _h to all structure fields to indicate they are "handlers". * libc/libio_.h, libc/chdir.c, libc/chmod.c, libc/chown.c, libc/close.c, libc/eval.c, libc/fchdir.c, libc/fchmod.c, libc/fcntl.c, libc/fdatasync.c, libc/fstat.c, libc/fsync.c, libc/ftruncate.c, libc/getdents.c, libc/imfs_eval.c, libc/imfs_unlink.c, libc/ioctl.c, libc/ioman.c, libc/link.c, libc/lseek.c, libc/mknod.c, libc/mount.c, libc/open.c, libc/read.c, libc/readlink.c, libc/rmdir.c, libc/stat.c, libc/symlink.c, libc/unlink.c, libc/unmount.c, libc/utime.c, libc/write.c: Modified to reflect above name change.
* Updated copyright notice.Joel Sherrill1999-11-171-2/+1
|
* Split null handlers table to own file and renamed.Joel Sherrill1999-10-121-1/+2
| | | | Renamed IMFS handler tables to include IMFS prefix.
* Added rtems_filesystem_freenode() macro and added calls at appropriateJoel Sherrill1999-10-121-0/+12
| | | | | places to make sure memory allocated for filesystem specifif nodes gets freed.
* Use proper include for libio.h.Joel Sherrill1999-03-161-4/+1
|
* Added F_GETFL support so the fdopen() implementation in newlib 1.8.1Joel Sherrill1999-03-061-0/+4
| | | | | | | | 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>.
* Patch from Eric Norum <eric@skatter.usask.ca> to eliminate externalJoel Sherrill1999-03-011-9/+0
| | | | | IO handlers scheme that was implemented originally just to support sockets. The file system IO switch is more general and works fine.
* More general fix based on bug report and patch from Ian Lance TaylorJoel Sherrill1999-01-201-1/+15
| | | | | | | | | | <ian@airs.com> to fix this problem: There is a small bug in __rtems_close in c/src/lib/libc/libio.c. It does not check whether the file descriptor it is passed is open. This can cause it to make a null dereference if it is passed a file descriptor which is in the valid range but which was not opened, or which was already closed.
* Merged Eric Norum's select patch that was based on 4.0 and resolvedJoel Sherrill1998-12-101-0/+1
| | | | all conflicts.
* Modifications for RTEMS_UNIX.Jennifer Averett1998-12-031-0/+5
|
* Added base version of file system infrastructure. This includes a majorJoel Sherrill1998-11-231-0/+248
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.