RTEMS  5.1
Typedefs | Functions
rap.h File Reference

RTEMS Application Loader. More...

#include <rtems.h>
#include <rtems/chain.h>

Go to the source code of this file.

Typedefs

typedef bool(* rtems_rap_iterator) (void *handle)
 

Functions

bool rtems_rap_load (const char *name, int mode, int argc, const char *argv[])
 
bool rtems_rap_unload (const char *name)
 
void * rtems_rap_find (const char *name)
 
bool rtems_rap_iterate (rtems_rap_iterator iterator)
 
const char * rtems_rap_name (void *handle)
 
void * rtems_rap_dl_handle (void *handle)
 
int rtems_rap_get_error (char *message, size_t max_message)
 

Detailed Description

RTEMS Application Loader.

This is the RTEMS Application loader for files in the RAP format.

Typedef Documentation

◆ rtems_rap_iterator

typedef bool(* rtems_rap_iterator) (void *handle)

The module iterator handle.

Function Documentation

◆ rtems_rap_dl_handle()

void* rtems_rap_dl_handle ( void *  handle)

Return the DL handle used to load the module given the RAP handle.

Parameters
handleThe module handle.
Returns
void* The DL handle returned by the dlopen call.

◆ rtems_rap_find()

void* rtems_rap_find ( const char *  name)

Find the application handle given a file name.

Parameters
nameThe name of the application file. It can be absolute or relative. Relative names can the basename with an extension.
Return values
NULLNo application file with that name found.
Returns
void* The application descriptor.

◆ rtems_rap_get_error()

int rtems_rap_get_error ( char *  message,
size_t  max_message 
)

Get the last error message clearing it. This call is not thread safe is multiple threads are loading object files at the same time. This call follows the model provided by the dlopen family of calls.

Parameters
messagePointer to a buffer to copy the message into.
max_messageThe maximum message that can be copied.
Returns
int The last error number.

◆ rtems_rap_iterate()

bool rtems_rap_iterate ( rtems_rap_iterator  iterator)

Run an iterator over the modules calling the iterator function.

Parameters
iteratorThe iterator function.
Return values
trueThe iterator function returned did not return false.
falseThe iterator function returned false..

◆ rtems_rap_load()

bool rtems_rap_load ( const char *  name,
int  mode,
int  argc,
const char *  argv[] 
)

Load an application.

Parameters
nameThe name of the application file.
Returns
bool True if the module loads else an error.

◆ rtems_rap_name()

const char* rtems_rap_name ( void *  handle)

Return the name of the module given a handle.

Parameters
handleThe module handle.
Returns
const char* The name of the module if the handle is valid else it is NULL.

◆ rtems_rap_unload()

bool rtems_rap_unload ( const char *  name)

Unload an application.

Parameters
objThe application descriptor.
Return values
trueThe application file has been unloaded.
falseThe application could not be unloaded.