1 | /* |
---|
2 | * Rate Monotonic 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.rtems.com/license/LICENSE. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #if HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <rtems/system.h> |
---|
20 | #include <rtems/rtems/status.h> |
---|
21 | #include <rtems/rtems/support.h> |
---|
22 | #include <rtems/score/isr.h> |
---|
23 | #include <rtems/score/object.h> |
---|
24 | #include <rtems/rtems/ratemon.h> |
---|
25 | #include <rtems/score/thread.h> |
---|
26 | |
---|
27 | /*PAGE |
---|
28 | * |
---|
29 | * rtems_rate_monotonic_ident |
---|
30 | * |
---|
31 | * This directive returns the system ID associated with |
---|
32 | * the rate monotonic period name. |
---|
33 | * |
---|
34 | * Input parameters: |
---|
35 | * name - user defined period name |
---|
36 | * id - pointer to period id |
---|
37 | * |
---|
38 | * Output parameters: |
---|
39 | * *id - region id |
---|
40 | * RTEMS_SUCCESSFUL - if successful |
---|
41 | * error code - if unsuccessful |
---|
42 | */ |
---|
43 | |
---|
44 | rtems_status_code rtems_rate_monotonic_ident( |
---|
45 | rtems_name name, |
---|
46 | Objects_Id *id |
---|
47 | ) |
---|
48 | { |
---|
49 | Objects_Name_or_id_lookup_errors status; |
---|
50 | |
---|
51 | status = _Objects_Name_to_id( |
---|
52 | &_Rate_monotonic_Information, |
---|
53 | (Objects_Name) name, |
---|
54 | OBJECTS_SEARCH_LOCAL_NODE, |
---|
55 | id |
---|
56 | ); |
---|
57 | |
---|
58 | return _Status_Object_name_errors_to_status[ status ]; |
---|
59 | } |
---|