5
Last change
on this file since e266d13 was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Translate SuperCore Barrier Status Code to RTEMS Status Code |
---|
5 | * @ingroup ClassicBarrier |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2007. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #if HAVE_CONFIG_H |
---|
18 | #include "config.h" |
---|
19 | #endif |
---|
20 | |
---|
21 | #include <rtems/system.h> |
---|
22 | #include <rtems/rtems/status.h> |
---|
23 | #include <rtems/rtems/support.h> |
---|
24 | #include <rtems/rtems/barrierimpl.h> |
---|
25 | |
---|
26 | rtems_status_code _Barrier_Translate_core_barrier_return_code_[] = { |
---|
27 | RTEMS_SUCCESSFUL, /* CORE_BARRIER_STATUS_SUCCESSFUL */ |
---|
28 | RTEMS_SUCCESSFUL, /* CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED */ |
---|
29 | RTEMS_OBJECT_WAS_DELETED, /* CORE_BARRIER_WAS_DELETED */ |
---|
30 | RTEMS_TIMEOUT /* CORE_BARRIER_TIMEOUT */ |
---|
31 | }; |
---|
32 | |
---|
33 | rtems_status_code _Barrier_Translate_core_barrier_return_code ( |
---|
34 | CORE_barrier_Status the_barrier_status |
---|
35 | ) |
---|
36 | { |
---|
37 | /* |
---|
38 | * Internal consistency check for bad status from SuperCore |
---|
39 | */ |
---|
40 | #if defined(RTEMS_DEBUG) |
---|
41 | if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) |
---|
42 | return RTEMS_INTERNAL_ERROR; |
---|
43 | #endif |
---|
44 | return _Barrier_Translate_core_barrier_return_code_[the_barrier_status]; |
---|
45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.