summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/mutextranslatereturncode.c
blob: 1cc0b5c98cfc98621b90c07a692b742516ece895 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
 *  @file
 *
 *  @brief POSIX Mutex Translate Core Mutex Return Code
 *  @ingroup POSIX_MUTEX
 */

/*
 *  COPYRIGHT (c) 1989-2008.
 *  On-Line Applications Research Corporation (OAR).
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.org/license/LICENSE.
 */

#if HAVE_CONFIG_H
#include "config.h"
#endif

#include <rtems/posix/muteximpl.h>

const int _POSIX_Mutex_Return_codes[CORE_MUTEX_STATUS_LAST + 1] = {
  0,                      /* CORE_MUTEX_STATUS_SUCCESSFUL */
  EBUSY,                  /* CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT */
  EDEADLK,                /* CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED */
  EPERM,                  /* CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE */
  EINVAL,                 /* CORE_MUTEX_WAS_DELETED */
  ETIMEDOUT,              /* CORE_MUTEX_TIMEOUT */
  EINVAL                  /* CORE_MUTEX_STATUS_CEILING_VIOLATED */
};