source: rtems/cpukit/posix/src/mqueuetranslatereturncode.c @ a0e6c73

4.115
Last change on this file since a0e6c73 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2 *  POSIX Message Queue Error Translation
3 *
4 *  COPYRIGHT (c) 1989-2007.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 */
11
12#if HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <pthread.h>
17#include <errno.h>
18
19#include <rtems/system.h>
20#include <rtems/score/coremsg.h>
21#include <rtems/posix/mqueue.h>
22
23/*
24 *  _POSIX_Message_queue_Translate_core_message_queue_return_code
25 *
26 *  Input parameters:
27 *    the_message_queue_status - message_queue status code to translate
28 *
29 *  Output parameters:
30 *    status code - translated POSIX status code
31 *
32 */
33
34static
35 int _POSIX_Message_queue_Return_codes[CORE_MESSAGE_QUEUE_STATUS_LAST + 1] = {
36  0,                     /* CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL */
37  EMSGSIZE,              /* CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE */
38  EAGAIN,                /* CORE_MESSAGE_QUEUE_STATUS_TOO_MANY */
39  ENOMEM,                /* CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED */
40  EAGAIN,                /* CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT */
41  EBADF,                 /* CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED */
42  ETIMEDOUT,             /* CORE_MESSAGE_QUEUE_STATUS_TIMEOUT */
43  ENOSYS                 /* CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT */
44};
45
46
47int _POSIX_Message_queue_Translate_core_message_queue_return_code(
48  uint32_t   the_message_queue_status
49)
50{
51  /*
52   *  Internal consistency check for bad status from SuperCore
53   */
54  #if defined(RTEMS_DEBUG)
55    if ( the_message_queue_status > CORE_MESSAGE_QUEUE_STATUS_LAST )
56      return EINVAL;
57  #endif
58  return _POSIX_Message_queue_Return_codes[the_message_queue_status];
59}
Note: See TracBrowser for help on using the repository browser.