RTEMS
Modules | Files | Classes | Macros | Functions
Standard C Library Support

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

Modules

 Malloc Support
 RTEMS extensions to the Malloc Family.
 
 RTEMS Termios Device Support
 RTEMS Termios Device Support Internal Data Structures.
 

Files

file  malloc_deferred.c
 Malloc Deferred Support.
 
file  print_printf.c
 RTEMS Print Support.
 
file  printk.c
 Kernel Printf Function.
 
file  printk_plugin.c
 Plugin Printk.
 
file  rtems_putc.c
 RTEMS Output a Character.
 
file  vprintk.c
 Print Formatted Output.
 

Classes

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. More...
 
Heap_Controlmalloc_get_heap_pointer (void)
 Get malloc heap pointer. More...
 
size_t malloc_free_space (void)
 Get free malloc information. More...
 
int malloc_info (Heap_Information_block *the_info)
 Get malloc status information. More...
 
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. More...
 
bool rtems_resource_snapshot_equal (const rtems_resource_snapshot *a, const rtems_resource_snapshot *b)
 Compares two resource snapshots for equality. More...
 
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. More...
 

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 */ \
}

Definition at line 89 of file libcsupport.h.

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]snapshotThe resource snapshot used for comparison with the new resource snapshot.
Return values
trueThe resource snapshots are equal.
falseOtherwise.
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]aOne resource snapshot.
[in]bAnother resource snapshot.
Return values
trueThe resource snapshots are equal.
falseOtherwise.
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]snapshotThe snapshot of used resources.
See also
rtems_resource_snapshot_equal() and rtems_resource_snapshot_check().
#include <assert.h>
void example(void)
{
test_setup();
test();
test_cleanup();
}