4.104.114.95
Last change
on this file since ebe61382 was
8042961d,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/25/06 at 13:38:24
|
2006-09-25 Joel Sherrill <joel.sherrill@…>
- rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h,
rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/config.h,
rtems/inline/rtems/rtems/attr.inl, rtems/macros/rtems/rtems/attr.inl:
Add Classic API Barriers.
- rtems/include/rtems/rtems/barrier.h,
rtems/include/rtems/rtems/barriermp.h,
rtems/inline/rtems/rtems/barrier.inl,
rtems/macros/rtems/rtems/barrier.inl, rtems/src/barrier.c,
rtems/src/barriercreate.c, rtems/src/barrierdelete.c,
rtems/src/barrierident.c, rtems/src/barrierrelease.c,
rtems/src/barriertranslatereturncode.c, rtems/src/barrierwait.c:
New files.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * Barrier Manager Name to ID |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-2006. |
---|
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 | * $Id$ |
---|
12 | */ |
---|
13 | |
---|
14 | #if HAVE_CONFIG_H |
---|
15 | #include "config.h" |
---|
16 | #endif |
---|
17 | |
---|
18 | #include <rtems/system.h> |
---|
19 | #include <rtems/rtems/status.h> |
---|
20 | #include <rtems/rtems/support.h> |
---|
21 | #include <rtems/score/object.h> |
---|
22 | #include <rtems/rtems/options.h> |
---|
23 | #include <rtems/rtems/barrier.h> |
---|
24 | |
---|
25 | /* |
---|
26 | * rtems_barrier_ident |
---|
27 | * |
---|
28 | * This directive returns the system ID associated with |
---|
29 | * the barrier name. |
---|
30 | * |
---|
31 | * Input parameters: |
---|
32 | * name - user defined barrier name |
---|
33 | * id - pointer to barrier id |
---|
34 | * |
---|
35 | * Output parameters: |
---|
36 | * *id - barrier id |
---|
37 | * RTEMS_SUCCESSFUL - if successful |
---|
38 | * error code - if unsuccessful |
---|
39 | */ |
---|
40 | |
---|
41 | rtems_status_code rtems_barrier_ident( |
---|
42 | rtems_name name, |
---|
43 | rtems_id *id |
---|
44 | ) |
---|
45 | { |
---|
46 | Objects_Name_or_id_lookup_errors status; |
---|
47 | |
---|
48 | status = _Objects_Name_to_id( |
---|
49 | &_Barrier_Information, |
---|
50 | (Objects_Name) name, |
---|
51 | OBJECTS_SEARCH_LOCAL_NODE, |
---|
52 | id |
---|
53 | ); |
---|
54 | |
---|
55 | return _Status_Object_name_errors_to_status[ status ]; |
---|
56 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.