RTEMS: Standard C Library Support

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Modules | Files | Data Structures | Macros | Functions
Standard C Library Support
Internal

RTEMS Specific Support for the Standard C Library. More...

## Modules
| Error And Panic Support
| Defines and externs for rtems error reporting.
| Gxx Wrappers Support
| RTEMS Threads Compatibility Routines for Libgcc2.
| Malloc Support
| RTEMS extensions to the Malloc Family.
| RTEMS Termios Device Support
| RTEMS Termios Device Support Internal Data Structures.

## Files
file | __assert.c
| Evaluate Assertion.
file | __getpid.c
| Get Process Id.
file | __gettod.c
| Get the Date and Time.
file | __times.c
| Get Process Times.
file | _calloc_r.c
| Allocate Space for Array in Memory.
file | _free_r.c
| Allocate and Free Dynamic Memory.
file | _realloc_r.c
| _realloc_r Implementation
file | _rename_r.c
| Rename a File.
file | access.c
| access() - POSIX 1003.1b 5.6.3 - File Accessibility
file | calloc.c
| Allocate Space for Array in Memory.
file | chmod.c
| Change File Modes.
file | chown.c
| Change Owner and Group of a File.
file | chroot.c
| Change Root Directory.
file | close.c
| POSIX 1003.1b 6.3.1 - Close a File.
file | ctermid.c
| Generate Terminal Pathname.
file | dup.c
| POSIX 1003.1b 6.2.1 Duplicate an Open File Descriptor.
file | dup2.c
| Duplicate an Open File Descriptor.
file | fchdir.c
| Change Directory.
file | fchmod.c
| Change File Modes.
file | fchown.c
| Change Owner and Group of a File.
file | fcntl.c
| POSIX 1003.1b 6.5.2 - File Control.
file | fdatasync.c
| POSIX 1003.1b 6.6.2 - Synchronize the Data of a File.
file | fpathconf.c
| Configurable Pathname Varables.
file | free.c
| calloc()
file | fsync.c
| Synchronize the State of a File.
file | ftruncate.c
| Truncate a File to the Specified Length.
file | funlockfile.c
| Unlock File for Stdio.
file | getchark.c
| Get Character from Stdin.
file | getdents.c
| Get Directory Entries.
file | getegid.c
| Get Real User, Effective User, Ral Group, and Effective Group IDs.
file | geteuid.c
| Get Real User, Effective User, Ral Group, and Effective Group IDs.
file | getgid.c
| Get Real User, Effective User, Ral Group, and Effective Group IDs.
file | getgrent.c
| User Database Access Routines.
file | getgrnam.c
| User Database Access Routines.
file | getgroups.c
| Get Supplementary IDs.
file | getlogin.c
| Get User Name.
file | getpagesize.c
| Get System Page Size.
file | getpid.c
| Process and Parent Process IDs.
file | getppid.c
| Get Process and Parent Process IDs.
file | getpwent.c
| User Database Access Routines.
file | getuid.c
| Get Real User, Effective User, Ral Group, and Effective Group IDs.
file | ioctl.c
| ioctl() system call
file | isatty_r.c
| Test for a Terminal Device.
file | issetugid.c
| Dummy Version of BSD Routine.
file | kill_noposix.c
| Kill No POSIX.
file | link.c
| Create a new link.
file | lstat.c
| Get File Status.
file | malloc.c
| RTEMS Malloc Family Implementation.
file | malloc_deferred.c
| Malloc Deferred Support.
file | malloc_walk.c
| Malloc Walk.
file | mallocfreespace.c
| RTEMS Malloc Get Free Information.
file | mallocgetheapptr.c
| RTEMS Malloc Get Heap Pointer.
file | mallocinfo.c
| RTEMS Malloc Get Status Information.
file | mallocsetheapptr.c
| RTEMS Malloc Set Heap Pointer.
file | mkdir.c
| Make a Directory.
file | mkfifo.c
| Make a FIFO Special File.
file | mknod.c
| Create a Special or Ordinary File.
file | newlibc_reent.c
| Newlib Support.
file | open.c
| Open a File.
file | pathconf.c
| Configurable Pathname Varables.
file | posix_memalign.c
file | print_fprintf.c
| RTEMS Print Support.
file | print_printf.c
| RTEMS Print Support.
file | printf_plugin.c
| RTEMS Plugin Printf.
file | printk.c
| Kernel Printf Function.
file | printk_plugin.c
| Plugin Printk.
file | putk.c
| Write Character to Stream.
file | pwdgrp.c
| User Database Access Routines.
file | read.c
| Read From a File.
file | readlink.c
| Read Value of a Symbolic Link.
file | readv.c
| Read a Vector.
file | realloc.c
| Reallocate Memory Block.
file | rmdir.c
| Remove a Directory.
file | rtems_heap_extend.c
| rtems_heap_extend() implementation.
file | rtems_putc.c
| RTEMS Output a Character.
file | setegid.c
| Get Real User, Effective User, Ral Group, and Effective Group IDs.
file | seteuid.c
| Set Effective User Id.
file | setpgid.c
| Set Process Group ID for Job Control.
file | setsid.c
| Create Session and Set Process Group ID.
file | stat.c
| Get File Status.
file | symlink.c
| Make a Symbolic Link to a File.
file | sync.c
| This source file contains the implementation of sync().
file | tcgetpgrp.c
| Get Foreground Process Group ID.
file | tcsetattr.c
| Get and Set State.
file | tcsetpgrp.c
| Set Foreground Process Group ID.
file | truncate.c
| Truncate a File to the Specified Length.
file | umask.c
| Set File Creation Mask.
file | unlink.c
| Remove an Existing Link.
file | unmount.c
| Unmount a File System.
file | utime.c
| Set File Access and Modification Times.
file | utimes.c
| Change File Last Access and Modification Times.
file | vprintk.c
| Print Formatted Output.
file | write.c
| Write to a File.
file | write_r.c
| POSIX 1003.1b 6.4.2 - Write to a File.

## Data Structures
struct | rtems_resource_rtems_api
struct | rtems_resource_posix_api
struct | rtems_resource_snapshot

## Macros
#define | RTEMS_NEWLIB_EXTENSION

## Functions
void | malloc_dump (void)
bool | malloc_walk (int source, bool printf_enabled)
| Malloc walk.
void | malloc_set_heap_pointer (Heap_Control *new_heap)
| Set malloc heap pointer.
Heap_Control * | malloc_get_heap_pointer (void)
| Get malloc heap pointer.
size_t | malloc_free_space (void)
| Get free malloc information.
int | malloc_info (Heap_Information_block *the_info)
| Get malloc status information.
bool | newlib_create_hook (rtems_tcb *current_task, rtems_tcb *creating_task)
void | newlib_terminate_hook (rtems_tcb *current_task)
void | rtems_resource_snapshot_take (rtems_resource_snapshot *snapshot)
| Tasks a snapshot of the resource usage of the system.
bool | rtems_resource_snapshot_equal (const rtems_resource_snapshot *a, const rtems_resource_snapshot *b)
| Compares two resource snapshots for equality.
bool | rtems_resource_snapshot_check (const rtems_resource_snapshot *snapshot)
| Takes a new resource snapshot and checks that it is equal to the given resource snapshot.

## Detailed Description

RTEMS Specific Support for the Standard C Library.

## Macro Definition Documentation

## ◆ RTEMS_NEWLIB_EXTENSION

#define RTEMS_NEWLIB_EXTENSION

Value:
{ \
newlib_create_hook, /* rtems_task_create */ \
0, /* rtems_task_start */ \
0, /* rtems_task_restart */ \
0, /* rtems_task_delete */ \
0, /* task_switch */ \
0, /* task_begin */ \
0, /* task_exitted */ \
0, /* fatal */ \
newlib_terminate_hook /* thread terminate */ \
}

## Function Documentation

## ◆ malloc_free_space()

size_t malloc_free_space | ( | void |  | ) |

Get free malloc information.

Find amount of free heap remaining

## ◆ malloc_get_heap_pointer()

Heap_Control * malloc_get_heap_pointer | ( | void |  | ) |

Get malloc heap pointer.

This routine is primarily used for debugging.

## ◆ malloc_info()

int malloc_info | ( | Heap_Information_block * | the_info | ) |

Get malloc status information.

Find amount of free heap remaining.

## ◆ malloc_set_heap_pointer()

void malloc_set_heap_pointer | ( | Heap_Control * | new_heap | ) |

Set malloc heap pointer.

This routine is primarily used for debugging.

## ◆ rtems_resource_snapshot_check()

bool rtems_resource_snapshot_check | ( | const rtems_resource_snapshot * | snapshot | ) |

Takes a new resource snapshot and checks that it is equal to the given resource snapshot.

Parameters

  [in] | snapshot | The resource snapshot used for comparison with the new resource snapshot.

Return values

  true | The resource snapshots are equal.
  false | Otherwise.

See also
  rtems_resource_snapshot_take().

## ◆ rtems_resource_snapshot_equal()

bool rtems_resource_snapshot_equal | ( | const rtems_resource_snapshot * | a,
|  | const rtems_resource_snapshot * | b
| ) |  |

Compares two resource snapshots for equality.

Parameters

  [in] | a | One resource snapshot.
  [in] | b | Another resource snapshot.

Return values

  true | The resource snapshots are equal.
  false | Otherwise.

See also
  rtems_resource_snapshot_take().

## ◆ rtems_resource_snapshot_take()

void rtems_resource_snapshot_take | ( | rtems_resource_snapshot * | snapshot | ) |

Tasks a snapshot of the resource usage of the system.

Parameters

  [out] | snapshot | The snapshot of used resources.

See also
  rtems_resource_snapshot_equal() and rtems_resource_snapshot_check().

#include <assert.h>
#include <rtems/libcsupport.h>
void example(void)
{
rtems_resource_snapshot before;
test_setup();
rtems_resource_snapshot_take(&before);
test();
assert(rtems_resource_snapshot_check(&before));
test_cleanup();
}
assert.h
Information for the Assert Handler.
rtems_resource_snapshot_check
bool rtems_resource_snapshot_check(const rtems_resource_snapshot *snapshot)
Takes a new resource snapshot and checks that it is equal to the given resource snapshot.
Definition: resource_snapshot.c:143
rtems_resource_snapshot_take
void rtems_resource_snapshot_take(rtems_resource_snapshot *snapshot)
Tasks a snapshot of the resource usage of the system.
Definition: resource_snapshot.c:100
libcsupport.h
Standard C Library Support.
rtems_resource_snapshot
Definition: libcsupport.h:122