|
RTEMS CPU Kit with SuperCore
4.10.99.0
|
00001 00024 /* COPYRIGHT (c) 1989-2008. 00025 * On-Line Applications Research Corporation (OAR). 00026 * 00027 * The license and distribution terms for this file may be 00028 * found in the file LICENSE in this distribution or at 00029 * http://www.rtems.com/license/LICENSE. 00030 */ 00031 00032 #ifndef _RTEMS_RTEMS_SEM_H 00033 #define _RTEMS_RTEMS_SEM_H 00034 00046 #ifndef RTEMS_SEM_EXTERN 00047 #define RTEMS_SEM_EXTERN extern 00048 #endif 00049 00050 #ifdef __cplusplus 00051 extern "C" { 00052 #endif 00053 00054 #include <rtems/rtems/types.h> 00055 #include <rtems/rtems/options.h> 00056 #include <rtems/rtems/support.h> 00057 #include <rtems/rtems/tasks.h> 00058 #include <rtems/rtems/attr.h> 00059 #include <rtems/score/coremutex.h> 00060 #include <rtems/score/object.h> 00061 #include <rtems/score/coresem.h> 00062 00076 typedef struct { 00078 Objects_Control Object; 00079 00085 rtems_attribute attribute_set; 00086 00096 union { 00101 CORE_mutex_Control mutex; 00102 00107 CORE_semaphore_Control semaphore; 00108 } Core_control; 00109 } Semaphore_Control; 00110 00115 RTEMS_SEM_EXTERN Objects_Information _Semaphore_Information; 00116 00122 void _Semaphore_Manager_initialization(void); 00123 00135 rtems_status_code rtems_semaphore_create( 00136 rtems_name name, 00137 uint32_t count, 00138 rtems_attribute attribute_set, 00139 rtems_task_priority priority_ceiling, 00140 rtems_id *id 00141 ); 00142 00161 rtems_status_code rtems_semaphore_ident( 00162 rtems_name name, 00163 uint32_t node, 00164 rtems_id *id 00165 ); 00166 00179 rtems_status_code rtems_semaphore_delete( 00180 rtems_id id 00181 ); 00182 00202 rtems_status_code rtems_semaphore_obtain( 00203 rtems_id id, 00204 rtems_option option_set, 00205 rtems_interval timeout 00206 ); 00207 00219 rtems_status_code rtems_semaphore_release( 00220 rtems_id id 00221 ); 00222 00237 rtems_status_code rtems_semaphore_flush( 00238 rtems_id id 00239 ); 00240 00249 bool _Semaphore_Seize( 00250 Semaphore_Control *the_semaphore, 00251 uint32_t option_set 00252 ); 00253 00264 rtems_status_code _Semaphore_Translate_core_mutex_return_code ( 00265 uint32_t the_mutex_status 00266 ); 00267 00278 rtems_status_code _Semaphore_Translate_core_semaphore_return_code ( 00279 uint32_t the_mutex_status 00280 ); 00281 00282 #ifndef __RTEMS_APPLICATION__ 00283 #include <rtems/rtems/sem.inl> 00284 #endif 00285 #if defined(RTEMS_MULTIPROCESSING) 00286 #include <rtems/rtems/semmp.h> 00287 #endif 00288 00289 #ifdef __cplusplus 00290 } 00291 #endif 00292 00295 #endif 00296 /* end of include file */
1.7.5