source: rtems/cpukit/rtems/src/msgqtranslatereturncode.c @ 20f54e9

4.104.114.84.95
Last change on this file since 20f54e9 was 1e1b3e00, checked in by Joel Sherrill <joel.sherrill@…>, on 05/17/99 at 22:52:59

Split Message Manager into one routine per file.

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