OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [rtems/] [src/] [msgqtranslatereturncode.c] - Blame information for rev 219

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
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: msgqtranslatereturncode.c,v 1.2 2001-09-27 11:59:19 chris Exp $
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
 
45
rtems_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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.