RTEMS  5.0.0
Functions
rtl-error.c File Reference

RTEMS Run-Time Linker Error. More...

#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <rtems/rtl/rtl.h>
#include "rtl-error.h"

Functions

void rtems_rtl_set_error (int error, const char *format,...)
 
int rtems_rtl_get_error (char *message, size_t max_message)
 

Detailed Description

RTEMS Run-Time Linker Error.

Function Documentation

◆ rtems_rtl_get_error()

int rtems_rtl_get_error ( char *  message,
size_t  max_message 
)

Get the last error message clearing it. This operation locks the run time linker and therefore keeps the RTL thread safe but this call is not thread safe is multiple threads are loading object files at the same time. This call is provided to map to 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_rtl_set_error()

void rtems_rtl_set_error ( int  error,
const char *  format,
  ... 
)

Sets the error.

Assumes the RTL has been locked.

Parameters
errorThe errno error number.
formatThe error format string.
...The variable arguments that depend on the format string.