source: rtems/cpukit/rtems/src/msgqtranslatereturncode.c @ f26145b

4.104.114.84.95
Last change on this file since f26145b was 1095ec1, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/18/05 at 09:03:45

Include config.h.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*
2 *  Message Queue Manager
3 *
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15#if HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <rtems/system.h>
20#include <rtems/score/sysstate.h>
21#include <rtems/score/chain.h>
22#include <rtems/score/isr.h>
23#include <rtems/score/coremsg.h>
24#include <rtems/score/object.h>
25#include <rtems/score/states.h>
26#include <rtems/score/thread.h>
27#include <rtems/score/wkspace.h>
28#if defined(RTEMS_MULTIPROCESSING)
29#include <rtems/score/mpci.h>
30#endif
31#include <rtems/rtems/status.h>
32#include <rtems/rtems/attr.h>
33#include <rtems/rtems/message.h>
34#include <rtems/rtems/options.h>
35#include <rtems/rtems/support.h>
36
37/*PAGE
38 *
39 *  _Message_queue_Translate_core_message_queue_return_code
40 *
41 *  Input parameters:
42 *    the_message_queue_status - message_queue status code to translate
43 *
44 *  Output parameters:
45 *    rtems status code - translated RTEMS status code
46 *
47 */
48
49rtems_status_code _Message_queue_Translate_core_return_code_[] = {
50  RTEMS_SUCCESSFUL,         /* CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL */
51  RTEMS_INVALID_SIZE,       /* CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE */
52  RTEMS_TOO_MANY,           /* CORE_MESSAGE_QUEUE_STATUS_TOO_MANY */
53  RTEMS_UNSATISFIED,        /* CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED */
54  RTEMS_UNSATISFIED,        /* CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT */
55  RTEMS_OBJECT_WAS_DELETED, /* CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED */
56  RTEMS_TIMEOUT             /* CORE_MESSAGE_QUEUE_STATUS_TIMEOUT */
57};
58
59rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
60  uint32_t   status
61)
62{
63#if defined(RTEMS_MULTIPROCESSING)
64  if ( status == THREAD_STATUS_PROXY_BLOCKING )
65    return RTEMS_PROXY_BLOCKING;
66  else
67#endif
68  if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT )
69    return RTEMS_INTERNAL_ERROR;
70  else
71    return _Message_queue_Translate_core_return_code_[status];
72}
Note: See TracBrowser for help on using the repository browser.