Changeset 920a43e in rtems


Ignore:
Timestamp:
Feb 5, 2014, 4:00:09 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
224b888
Parents:
558cc8d
git-author:
Sebastian Huber <sebastian.huber@…> (02/05/14 16:00:09)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/06/14 07:47:02)
Message:

rtems: Add rtems_status_code_description()

Files:
1 added
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/Makefile.am

    r558cc8d r920a43e  
    256256
    257257librtems_a_SOURCES += src/status.c
     258librtems_a_SOURCES += src/statusdesc.c
    258259
    259260if HAS_MP
  • cpukit/rtems/include/rtems/rtems/status.h

    r558cc8d r920a43e  
    242242int rtems_status_code_to_errno(rtems_status_code sc);
    243243
     244/**
     245 * @brief Returns a description for a status code.
     246 *
     247 * @param[in] code The status code.
     248 *
     249 * @retval description The status code description.
     250 * @retval ? The passed status code is invalid.
     251 */
     252const char *rtems_status_code_description( rtems_status_code code );
     253
    244254/**@}*/
    245255
  • doc/user/Makefile.am

    r558cc8d r920a43e  
    99include $(top_srcdir)/main.am
    1010
    11 FILES = bsp.texi dirstat.texi example.texi glossary.texi preface.texi
     11FILES = bsp.texi example.texi glossary.texi preface.texi
    1212
    1313GENERATED_FILES = overview.texi concepts.texi datatypes.texi init.texi \
     
    1616    schedule.texi rtmon.texi barrier.texi bsp.texi userext.texi conf.texi \
    1717    mp.texi stackchk.texi cpuuse.texi object.texi chains.texi timespec.texi \
    18     cbs.texi
     18    cbs.texi dirstat.texi
    1919
    2020COMMON_FILES += $(top_srcdir)/common/cpright.texi
     
    194194            -n "Directive Status Codes" < $< > $@
    195195
     196dirstat.texi: dirstat.t
     197        $(BMENU2) -p "Constant Bandwidth Server Scheduler API CBS_GET_APPROVED_BUDGET - Get scheduler approved execution time" \
     198            -u "Top" \
     199            -n "Example Application" < $< > $@
     200
    196201EXTRA_DIST = bsp.t cbs.t clock.t chains.t concepts.t cpuuse.t datatypes.t conf.t \
    197202    dpmem.t event.t fatal.t init.t intr.t io.t mp.t msg.t overview.t \
    198203    part.t region.t rtmon.t sem.t schedule.t signal.t stackchk.t \
    199     task.t timer.t userext.t $(TXT_FILES) $(PNG_FILES) $(EPS_IMAGES) \
     204    task.t timer.t userext.t dirstat.t $(TXT_FILES) $(PNG_FILES) $(EPS_IMAGES) \
    200205    $(noinst_DATA)
    201206
  • doc/user/dirstat.t

    r558cc8d r920a43e  
    44@c  All rights reserved.
    55
    6 @node Directive Status Codes, Example Application, Constant Bandwidth Server Scheduler API CBS_GET_APPROVED_BUDGET - Get scheduler approved execution time, Top
    76@chapter Directive Status Codes
     7
     8@section Introduction
     9
    810@table @b
    911@item @code{@value{RPREFIX}SUCCESSFUL} - successful completion
     
    3638@end table
    3739
     40@section Directives
     41
     42@page
     43@subsection STATUS_CODE_DESCRIPTION - Returns a description for a status code
     44
     45@cindex fatal error
     46
     47@subheading CALLING SEQUENCE:
     48
     49@ifset is-C
     50@findex rtems_status_code_description
     51@example
     52const char *rtems_status_code_description(
     53  rtems_status_code code
     54);
     55@end example
     56@end ifset
     57
     58@subheading DIRECTIVE STATUS CODES
     59
     60The status code description or "?" in case the passed status code is invalid.
     61
     62@subheading DESCRIPTION:
     63
     64Returns a description for a status code.
  • doc/user/example.texi

    r558cc8d r920a43e  
    44@c  All rights reserved.
    55
    6 @node Example Application, Glossary, Directive Status Codes, Top
     6@node Example Application, Glossary, Directive Status Codes STATUS_CODE_DESCRIPTION - Returns a description for a status code, Top
    77@chapter Example Application
    88
  • testsuites/sptests/spinternalerror02/init.c

    r558cc8d r920a43e  
    11/*
    2  * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2012-2014 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
    5  *  Obere Lagerstr. 30
     5 *  Donierstr. 4
    66 *  82178 Puchheim
    77 *  Germany
     
    5353}
    5454
     55static void test_status_code_description(void)
     56{
     57  rtems_status_code code = 0;
     58  const char *desc = NULL;
     59  const char *desc_last;
     60
     61  do {
     62    desc_last = desc;
     63    desc = rtems_status_code_description( code );
     64    ++code;
     65    puts( desc );
     66  } while ( desc != desc_last );
     67
     68  rtems_test_assert( code - 3 == RTEMS_PROXY_BLOCKING );
     69}
     70
    5571static void Init(rtems_task_argument arg)
    5672{
     
    5975  test_internal_error_description();
    6076  test_fatal_source_description();
     77  test_status_code_description();
    6178
    6279  puts("*** END OF TEST SPINTERNALERROR 2 ***");
  • testsuites/sptests/spinternalerror02/spinternalerror02.scn

    r558cc8d r920a43e  
    4040?
    4141?
     42RTEMS_SUCCESSFUL
     43RTEMS_TASK_EXITTED
     44RTEMS_MP_NOT_CONFIGURED
     45RTEMS_INVALID_NAME
     46RTEMS_INVALID_ID
     47RTEMS_TOO_MANY
     48RTEMS_TIMEOUT
     49RTEMS_OBJECT_WAS_DELETED
     50RTEMS_INVALID_SIZE
     51RTEMS_INVALID_ADDRESS
     52RTEMS_INVALID_NUMBER
     53RTEMS_NOT_DEFINED
     54RTEMS_RESOURCE_IN_USE
     55RTEMS_UNSATISFIED
     56RTEMS_INCORRECT_STATE
     57RTEMS_ALREADY_SUSPENDED
     58RTEMS_ILLEGAL_ON_SELF
     59RTEMS_ILLEGAL_ON_REMOTE_OBJECT
     60RTEMS_CALLED_FROM_ISR
     61RTEMS_INVALID_PRIORITY
     62RTEMS_INVALID_CLOCK
     63RTEMS_INVALID_NODE
     64RTEMS_NOT_CONFIGURED
     65RTEMS_NOT_OWNER_OF_RESOURCE
     66RTEMS_NOT_IMPLEMENTED
     67RTEMS_INTERNAL_ERROR
     68RTEMS_NO_MEMORY
     69RTEMS_IO_ERROR
     70RTEMS_PROXY_BLOCKING
     71?
     72?
    4273*** END OF TEST SPINTERNALERROR 2 ***
Note: See TracChangeset for help on using the changeset viewer.