1 | /* |
---|
2 | * Semaphore Manager |
---|
3 | * |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-1997. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * Copyright assigned to U.S. Government, 1994. |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may in |
---|
10 | * the file LICENSE in this distribution or at |
---|
11 | * http://www.OARcorp.com/rtems/license.html. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #include <rtems/system.h> |
---|
17 | #include <rtems/rtems/status.h> |
---|
18 | #include <rtems/rtems/attr.h> |
---|
19 | #include <rtems/score/isr.h> |
---|
20 | #include <rtems/score/object.h> |
---|
21 | #include <rtems/rtems/options.h> |
---|
22 | #include <rtems/rtems/sem.h> |
---|
23 | #include <rtems/score/states.h> |
---|
24 | #include <rtems/score/thread.h> |
---|
25 | #include <rtems/score/threadq.h> |
---|
26 | #include <rtems/score/interr.h> |
---|
27 | |
---|
28 | void _Semaphore_Manager_initialization( |
---|
29 | unsigned32 maximum_semaphores |
---|
30 | ) |
---|
31 | { |
---|
32 | } |
---|
33 | |
---|
34 | rtems_status_code rtems_semaphore_create( |
---|
35 | rtems_name name, |
---|
36 | unsigned32 count, |
---|
37 | rtems_attribute attribute_set, |
---|
38 | rtems_task_priority priority_ceiling, |
---|
39 | Objects_Id *id |
---|
40 | ) |
---|
41 | { |
---|
42 | _Internal_error_Occurred( |
---|
43 | INTERNAL_ERROR_RTEMS_API, |
---|
44 | FALSE, |
---|
45 | RTEMS_NOT_CONFIGURED |
---|
46 | ); |
---|
47 | return RTEMS_NOT_CONFIGURED; |
---|
48 | } |
---|
49 | |
---|
50 | rtems_status_code rtems_semaphore_ident( |
---|
51 | rtems_name name, |
---|
52 | unsigned32 node, |
---|
53 | Objects_Id *id |
---|
54 | ) |
---|
55 | { |
---|
56 | _Internal_error_Occurred( |
---|
57 | INTERNAL_ERROR_RTEMS_API, |
---|
58 | FALSE, |
---|
59 | RTEMS_NOT_CONFIGURED |
---|
60 | ); |
---|
61 | return RTEMS_NOT_CONFIGURED; |
---|
62 | } |
---|
63 | |
---|
64 | rtems_status_code rtems_semaphore_delete( |
---|
65 | Objects_Id id |
---|
66 | ) |
---|
67 | { |
---|
68 | _Internal_error_Occurred( |
---|
69 | INTERNAL_ERROR_RTEMS_API, |
---|
70 | FALSE, |
---|
71 | RTEMS_NOT_CONFIGURED |
---|
72 | ); |
---|
73 | return RTEMS_NOT_CONFIGURED; |
---|
74 | } |
---|
75 | |
---|
76 | rtems_status_code rtems_semaphore_obtain( |
---|
77 | Objects_Id id, |
---|
78 | unsigned32 option_set, |
---|
79 | rtems_interval timeout |
---|
80 | ) |
---|
81 | { |
---|
82 | _Internal_error_Occurred( |
---|
83 | INTERNAL_ERROR_RTEMS_API, |
---|
84 | FALSE, |
---|
85 | RTEMS_NOT_CONFIGURED |
---|
86 | ); |
---|
87 | return RTEMS_NOT_CONFIGURED; |
---|
88 | } |
---|
89 | |
---|
90 | rtems_status_code rtems_semaphore_release( |
---|
91 | Objects_Id id |
---|
92 | ) |
---|
93 | { |
---|
94 | _Internal_error_Occurred( |
---|
95 | INTERNAL_ERROR_RTEMS_API, |
---|
96 | FALSE, |
---|
97 | RTEMS_NOT_CONFIGURED |
---|
98 | ); |
---|
99 | return RTEMS_NOT_CONFIGURED; |
---|
100 | } |
---|
101 | |
---|
102 | boolean _Semaphore_Seize( |
---|
103 | Semaphore_Control *the_semaphore, |
---|
104 | rtems_option option_set |
---|
105 | ) |
---|
106 | { |
---|
107 | _Internal_error_Occurred( |
---|
108 | INTERNAL_ERROR_RTEMS_API, |
---|
109 | FALSE, |
---|
110 | RTEMS_NOT_CONFIGURED |
---|
111 | ); |
---|
112 | _Thread_Executing->Wait.return_code = RTEMS_UNSATISFIED; |
---|
113 | return TRUE; |
---|
114 | } |
---|