Changeset bab16de2 in rtems for cpukit/sapi


Ignore:
Timestamp:
02/07/14 08:53:47 (10 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
e11d928
Parents:
97cf623d
git-author:
Sebastian Huber <sebastian.huber@…> (02/07/14 08:53:47)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/12/14 08:18:00)
Message:

score: Change debug helper functions

Rename rtems_internal_error_description() to
rtems_internal_error_text(). Rename rtems_fatal_source_description() to
rtems_fatal_source_text(). Rename rtems_status_code_description() to
rtems_status_text(). Remove previous implementation of
rtems_status_text().

Location:
cpukit/sapi
Files:
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/Makefile.am

    r97cf623d rbab16de2  
    3030    src/rtemsapi.c src/extensiondata.c src/getversionstring.c \
    3131    src/chainappendnotify.c src/chaingetnotify.c src/chaingetwait.c \
    32     src/chainprependnotify.c src/rbheap.c src/interrdesc.c \
    33     src/fatal2.c src/fatalsrcdesc.c
     32    src/chainprependnotify.c src/rbheap.c src/interrtext.c \
     33    src/fatal2.c src/fatalsrctext.c
    3434libsapi_a_SOURCES += src/chainsmp.c
    3535libsapi_a_CPPFLAGS = $(AM_CPPFLAGS)
  • cpukit/sapi/include/rtems/fatal.h

    r97cf623d rbab16de2  
    8787
    8888/**
    89  * @brief Returns a description for a fatal source.
     89 * @brief Returns a text for a fatal source.
     90 *
     91 * The text for each fatal source is the enumerator constant.
    9092 *
    9193 * @param[in] source is the fatal source.
    9294 *
    93  * @retval description The fatal source description.
    94  * @retval ? The passed fatal source is invalid.
     95 * @retval text The fatal source text.
     96 * @retval "?" The passed fatal source is invalid.
    9597 */
    96 const char *rtems_fatal_source_description( rtems_fatal_source source );
     98const char *rtems_fatal_source_text( rtems_fatal_source source );
    9799
    98100/**
    99  * @brief Returns a description for an internal error code.
     101 * @brief Returns a text for an internal error code.
     102 *
     103 * The text for each internal error code is the enumerator constant.
    100104 *
    101105 * @param[in] error is the error code.
    102106 *
    103  * @retval description The error code description.
    104  * @retval ? The passed error code is invalid.
     107 * @retval text The error code text.
     108 * @retval "?" The passed error code is invalid.
    105109 */
    106 const char *rtems_internal_error_description( rtems_fatal_code error );
     110const char *rtems_internal_error_text( rtems_fatal_code error );
    107111
    108112/** @} */
  • cpukit/sapi/src/fatalsrctext.c

    r97cf623d rbab16de2  
    22 * @file
    33 *
    4  * @brief Implementation of rtems_fatal_source_description()
     4 * @brief Implementation of rtems_fatal_source_text()
    55 *
    66 * @ingroup ClassicFatal
     
    88
    99/*
    10  * Copyright (c) 2013 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2013-2014 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
    13  *  Obere Lagerstr. 30
     13 *  Dornierstr. 4
    1414 *  82178 Puchheim
    1515 *  Germany
     
    2727#include <rtems/fatal.h>
    2828
    29 static const char *const fatal_source_desc [] = {
     29static const char *const fatal_source_text[] = {
    3030  "INTERNAL_ERROR_CORE",
    3131  "INTERNAL_ERROR_RTEMS_API",
     
    4141};
    4242
    43 const char *rtems_fatal_source_description( rtems_fatal_source source )
     43const char *rtems_fatal_source_text( rtems_fatal_source source )
    4444{
    4545  size_t i = source;
    46   const char *desc = "?";
     46  const char *text = "?";
    4747
    48   if ( i < RTEMS_ARRAY_SIZE( fatal_source_desc ) ) {
    49     desc = fatal_source_desc [i];
     48  if ( i < RTEMS_ARRAY_SIZE( fatal_source_text ) ) {
     49    text = fatal_source_text[ i ];
    5050  }
    5151
    52   return desc;
     52  return text;
    5353}
  • cpukit/sapi/src/interrtext.c

    r97cf623d rbab16de2  
    22 * @file
    33 *
    4  * @brief Returns a description for an internal error code.
     4 * @brief Returns a text for an internal error code.
    55 *
    66 * @ingroup ClassicFatal
     
    88
    99/*
    10  * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2012-2014 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
    13  *  Obere Lagerstr. 30
     13 *  Dornierstr. 4
    1414 *  82178 Puchheim
    1515 *  Germany
     
    2727#include <rtems/fatal.h>
    2828
    29 static const char *const internal_error_desc [] = {
     29static const char *const internal_error_text[] = {
    3030  "INTERNAL_ERROR_NO_CONFIGURATION_TABLE",
    3131  "INTERNAL_ERROR_NO_CPU_TABLE",
     
    5555};
    5656
    57 const char *rtems_internal_error_description( rtems_fatal_code error )
     57const char *rtems_internal_error_text( rtems_fatal_code error )
    5858{
    5959  size_t i = error;
    60   const char *desc = "?";
     60  const char *text = "?";
    6161
    62   if ( i < RTEMS_ARRAY_SIZE( internal_error_desc ) ) {
    63     desc = internal_error_desc [i];
     62  if ( i < RTEMS_ARRAY_SIZE( internal_error_text ) ) {
     63    text = internal_error_text[ i ];
    6464  }
    6565
    66   return desc;
     66  return text;
    6767}
Note: See TracChangeset for help on using the changeset viewer.