RTEMS 6.3
Loading...
Searching...
No Matches
src Directory Reference

Files

 
__assert.c
 Evaluate Assertion.
 
__getpid.c
 Get Process Id.
 
__gettod.c
 Get the Date and Time.
 
__times.c
 Get Process Times.
 
__usrenv.c
 RTEMS File System Location Support.
 
_calloc_r.c
 Allocate Space for Array in Memory.
 
_free_r.c
 Allocate and Free Dynamic Memory.
 
_realloc_r.c
 _realloc_r Implementation
 
_rename_r.c
 Rename a File.
 
access.c
 access() - POSIX 1003.1b 5.6.3 - File Accessibility
 
assoclocalbyname.c
 RTEMS Associate Local by Name.
 
assoclocalbyremote.c
 RTEMS Associate Local by Remote.
 
assoclocalbyremotebitfield.c
 RTEMS Associate Local by Remote Bitfield.
 
assocnamebad.c
 RTEMS Associate Bad Name.
 
assocnamebylocal.c
 RTEMS Associate Name by Local.
 
assocnamebylocalbitfield.c
 RTEMS Associate Name by Local Bitfield.
 
assocnamebyremote.c
 RTEMS Associate Name by Remote.
 
assocnamebyremotebitfield.c
 RTEMS Associate Name by Remote Bitfield.
 
assocptrbylocal.c
 RTEMS Associate Pointer by Local.
 
assocptrbyname.c
 RTEMS Associate Pointer by Name.
 
assocptrbyremote.c
 RTEMS Associate Pointer by Remote.
 
assocremotebylocal.c
 RTEMS Associate Remote by Local.
 
assocremotebylocalbitfield.c
 RTEMS Assoc Routines.
 
assocremotebyname.c
 RTEMS Associate Remote by Name.
 
base_fs.c
 Base File System Initialization.
 
cachealignedalloc.c
 RTEMS Cache Aligned Malloc.
 
cachecoherentalloc.c
 
calloc.c
 Allocate Space for Array in Memory.
 
cfgetispeed.c
 Baud Rate Functions.
 
cfgetospeed.c
 Baud Rate Functions.
 
cfsetispeed.c
 Baud Rate Functions.
 
cfsetospeed.c
 Baud Rate Functions.
 
chdir.c
 POSIX 1003.1b - 5.2.1 - Change Current Working Directory.
 
chmod.c
 Change File Modes.
 
chown.c
 Change Owner and Group of a File.
 
chroot.c
 Change Root Directory.
 
clonenode.c
 Clones a Node.
 
close.c
 POSIX 1003.1b 6.3.1 - Close a File.
 
consolesimple.h
 
ctermid.c
 Generate Terminal Pathname.
 
dup.c
 POSIX 1003.1b 6.2.1 Duplicate an Open File Descriptor.
 
dup2.c
 Duplicate an Open File Descriptor.
 
error.c
 
fchdir.c
 Change Directory.
 
fchmod.c
 Change File Modes.
 
fchown.c
 Change Owner and Group of a File.
 
fcntl.c
 POSIX 1003.1b 6.5.2 - File Control.
 
fdatasync.c
 POSIX 1003.1b 6.6.2 - Synchronize the Data of a File.
 
flockfile.c
 Lock File for Stdio.
 
fpathconf.c
 Configurable Pathname Varables.
 
free.c
 calloc()
 
freenode.c
 Releases all Resources of a Location.
 
fsync.c
 Synchronize the State of a File.
 
ftruncate.c
 Truncate a File to the Specified Length.
 
funlockfile.c
 Unlock File for Stdio.
 
futimens.c
 Set file access and modification times based on file descriptor in nanoseconds.
 
gcovfork.c
 This source file contains functions required by GCC if code and branch coverage instrumentation (gcov) is enabled.
 
getchark.c
 This source file contains the implementation of getchark().
 
getdents.c
 Get Directory Entries.
 
getegid.c
 Get Real User, Effective User, Ral Group, and Effective Group IDs.
 
geteuid.c
 Get Real User, Effective User, Ral Group, and Effective Group IDs.
 
getgid.c
 Get Real User, Effective User, Ral Group, and Effective Group IDs.
 
getgrent.c
 User Database Access Routines.
 
getgrnam.c
 User Database Access Routines.
 
getgroups.c
 Get Supplementary IDs.
 
getlogin.c
 Get User Name.
 
getpagesize.c
 Get System Page Size.
 
getpgrp.c
 Get process group IDs.
 
getpid.c
 Process and Parent Process IDs.
 
getppid.c
 Get Process and Parent Process IDs.
 
getpwent.c
 User Database Access Routines.
 
getuid.c
 Get Real User, Effective User, Ral Group, and Effective Group IDs.
 
ioctl.c
 ioctl() system call
 
isatty_r.c
 Test for a Terminal Device.
 
issetugid.c
 Dummy Version of BSD Routine.
 
kill_noposix.c
 Kill No POSIX.
 
libio.c
 File Descriptor Routines.
 
libio_exit.c
 
libio_init.c
 RTEMS LibIO Initialization.
 
libiozeroiops.c
 This source file provides rtems_libio_iops and rtems_libio_number_iops for a zero file descriptor application configuration.
 
lseek.c
 lseek() - POSIX 1003.1b 6.5.3 - Reposition Read/Write File Offset
 
lstat.c
 Get File Status.
 
malloc.c
 RTEMS Malloc Family Implementation.
 
malloc_deferred.c
 Malloc Deferred Support.
 
malloc_dirtier.c
 Dirty Memory Function.
 
malloc_p.h
 This header file provides interfaces used by the memory allocator implementation.
 
malloc_walk.c
 Malloc Walk.
 
mallocfreespace.c
 RTEMS Malloc Get Free Information.
 
mallocgetheapptr.c
 RTEMS Malloc Get Heap Pointer.
 
mallocheap.c
 This source file provides the C Program Heap control along with the system initialization handler.
 
mallocinfo.c
 RTEMS Malloc Get Status Information.
 
mallocsetheapptr.c
 RTEMS Malloc Set Heap Pointer.
 
mkdir.c
 Make a Directory.
 
mkfifo.c
 Make a FIFO Special File.
 
mknod.c
 Create a Special or Ordinary File.
 
mount-mktgt.c
 mount_and_make_target_path() implementation.
 
mount.c
 Mounts a File System.
 
newlibc_reent.c
 Newlib Support.
 
open.c
 Open a File.
 
open_dev_console.c
 open_dev_console - open /dev/console
 
pathconf.c
 Configurable Pathname Varables.
 
posix_memalign.c
 
print_fprintf.c
 RTEMS Print Support.
 
print_printf.c
 RTEMS Print Support.
 
printf_plugin.c
 RTEMS Plugin Printf.
 
printk.c
 This source file contains the implementation of printk().
 
printk_plugin.c
 This source file contains the implementation of rtems_printk_printer() and rtems_print_printer_printk().
 
privateenv.c
 Instantiate a Private User Environment.
 
putk.c
 This source file contains the implementation of putk().
 
pwdgrp.c
 User Database Access Routines.
 
pwdgrp.h
 
read.c
 Read From a File.
 
readv.c
 Read a Vector.
 
realloc.c
 Reallocate Memory Block.
 
rmdir.c
 Remove a Directory.
 
rtems_heap_extend.c
 rtems_heap_extend() implementation.
 
rtems_heap_extend_via_sbrk.c
 RTEMS Extend Heap via Sbrk.
 
rtems_heap_greedy.c
 Greedy Allocate that Empties the Heap.
 
rtems_heap_sbrk_greedy.c
 Greedy Allocate that Empties the sbrk system call.
 
rtems_memalign.c
 RTEMS Variation on Aligned Memory Allocation.
 
rtems_mkdir.c
 rtems_mkdir() implementation.
 
rtems_put_char.c
 This source file contains the implementation of rtems_put_char().
 
rtems_putc.c
 This source file contains the implementation of rtems_putc().
 
rtemscalloc.c
 This source file contains the implementation of rtems_calloc().
 
setegid.c
 Get Real User, Effective User, Ral Group, and Effective Group IDs.
 
seteuid.c
 Set Effective User Id.
 
setgid.c
 POSIX sets user and group ids.
 
setpgid.c
 Set Process Group ID for Job Control.
 
setsid.c
 Create Session and Set Process Group ID.
 
stat.c
 Get File Status.
 
sup_fs_check_permissions.c
 RTEMS File System Permissions Check Support.
 
sup_fs_deviceio.c
 RTEMS DeviceIO Support.
 
sup_fs_eval_path.c
 RTEMS File Sysyem Path Eval Support.
 
sup_fs_eval_path_generic.c
 RTEMS File System Eval Generic Path.
 
sup_fs_exist_in_same_instance.c
 Checks that the Locations Exist in the Same File System Instance.
 
sup_fs_location.c
 RTEMS File System Location Support.
 
sup_fs_mount_iterate.c
 Mount table entry visitor.
 
sup_fs_next_token.c
 RTEMS File System Eval Eat Delimiter Path.
 
sync.c
 This source file contains the implementation of sync().
 
tcdrain.c
 Line Control Functions.
 
tcflow.c
 Line Control Functions.
 
tcflush.c
 tcflush() - POSIX 1003.1b 7.2.2 - Line Control Functions
 
tcgetattr.c
 Get State.
 
tcgetpgrp.c
 Get Foreground Process Group ID.
 
tcsendbreak.c
 Line Control Functions.
 
tcsetattr.c
 Get and Set State.
 
tcsetpgrp.c
 Set Foreground Process Group ID.
 
termios.c
 
termios_baud2index.c
 Convert Bxxx Constant to Index.
 
termios_baud2num.c
 Convert Baud Part of Termios control flags to an integral Baud Value.
 
termios_baudtable.c
 RTEMS Termios Baud Table.
 
termios_num2baud.c
 Converts the Integral Baud to Termios Control Flag Representation.
 
termios_posix_isig_handler.c
 
termios_setinitialbaud.c
 Sets the Initial Baud in the Termios Context.
 
termiosinitialize.c
 This source file contains the implementation of rtems_termios_device_lock_acquire_default() and rtems_termios_device_lock_release_default().
 
truncate.c
 Truncate a File to the Specified Length.
 
umask.c
 Set File Creation Mask.
 
unmount.c
 Unmount a File System.
 
utime.c
 Set file access and modification times in seconds.
 
utimensat.c
 Set file access and modification times in nanoseconds.
 
utimes.c
 Set file access and modification times in milliseconds.
 
utsname.c
 Get System Name.
 
vprintk.c
 This source file contains the implementation of vprintk().
 
write.c
 Write to a File.
 
write_r.c
 POSIX 1003.1b 6.4.2 - Write to a File.
 
writev.c
 writev() - POSIX 1003.1 - Write a Vector

Detailed Description

Overview of newlib support (newlib is from CYGNUS) Each task can have its own libc state including: open stdio files strtok multi precision arithmetic state etc.

This is implemented by a reentrancy data structure for each task.

When a task is "started" (in RTEMS sense) the reentrancy structure is allocated.

When task is switched to, the value of global variable _impure_ptr is changed to the value of the new tasks reentrancy structure.

When a task is deleted atexit() processing (for that task) happens task's stdio buffers are flushed

When exit(3) is called calling task's atexit processing done global libc state atexit processing done (this will include any atexit routines installed by drivers) executive is shutdown causes a context switch back to bsp land

NOTE: libc extension are installed by bsp_libc_init() iff we are using clock interrupts. This hack is necessary to allow the tmtests to avoid timing the extensions.

Cases

This is a list of cases to consider when implementing a file system:

+ Given a tree of this form:
a ----- b
/
c

Where a and b are directories and c is a link to directory b. Consider this sequence:

  • rmdir a/b
  • mknod c/b/x
  • unlink c

TODO

  • newlib 1.8.0 has the wrong prototype for at least read() and write().
  • There should be a "eat it" stub for all system calls which are available to make filling out an operations table easier.
    See device_lseek() for an example of where this would be nice.
  • Fix strerror() so it prints all error numbers.
  • Check the node allocation coment in the fchdir call.
  • Add an interface somewhere for this call.