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