source: rtems/c/src/exec/rtems/src/msgqtranslatereturncode.c @ 08311cc3

4.104.114.84.95
Last change on this file since 08311cc3 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

  • 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.OARcorp.com/rtems/license.html.
11 *
12 *  $Id$
13 */
14
15#include <rtems/system.h>
16#include <rtems/score/sysstate.h>
17#include <rtems/score/chain.h>
18#include <rtems/score/isr.h>
19#include <rtems/score/coremsg.h>
20#include <rtems/score/object.h>
21#include <rtems/score/states.h>
22#include <rtems/score/thread.h>
23#include <rtems/score/wkspace.h>
24#if defined(RTEMS_MULTIPROCESSING)
25#include <rtems/score/mpci.h>
26#endif
27#include <rtems/rtems/status.h>
28#include <rtems/rtems/attr.h>
29#include <rtems/rtems/message.h>
30#include <rtems/rtems/options.h>
31#include <rtems/rtems/support.h>
32
33/*PAGE
34 *
35 *  _Message_queue_Translate_core_message_queue_return_code
36 *
37 *  Input parameters:
38 *    the_message_queue_status - message_queue status code to translate
39 *
40 *  Output parameters:
41 *    rtems status code - translated RTEMS status code
42 *
43 */
44 
45rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
46  unsigned32 the_message_queue_status
47)
48{
49  switch ( the_message_queue_status ) {
50    case  CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL:
51      return RTEMS_SUCCESSFUL;
52    case  CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE:
53      return RTEMS_INVALID_SIZE;
54    case  CORE_MESSAGE_QUEUE_STATUS_TOO_MANY:
55      return RTEMS_TOO_MANY;
56    case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED:
57      return RTEMS_UNSATISFIED;
58    case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT:
59      return RTEMS_UNSATISFIED;
60    case CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED:
61      return RTEMS_OBJECT_WAS_DELETED;
62    case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:
63      return RTEMS_TIMEOUT;
64    case THREAD_STATUS_PROXY_BLOCKING:
65      return RTEMS_PROXY_BLOCKING;
66  }
67  _Internal_error_Occurred(         /* XXX */
68    INTERNAL_ERROR_RTEMS_API,
69    TRUE,
70    the_message_queue_status
71  );
72  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
73}
Note: See TracBrowser for help on using the repository browser.