RTEMS CPU Kit with SuperCore  4.11.2
corerwlockimpl.h
Go to the documentation of this file.
1 
10 /*
11  * COPYRIGHT (c) 1989-2008.
12  * On-Line Applications Research Corporation (OAR).
13  *
14  * The license and distribution terms for this file may be
15  * found in the file LICENSE in this distribution or at
16  * http://www.rtems.org/license/LICENSE.
17  */
18 
19 #ifndef _RTEMS_SCORE_CORERWLOCKIMPL_H
20 #define _RTEMS_SCORE_CORERWLOCKIMPL_H
21 
22 #include <rtems/score/corerwlock.h>
23 #include <rtems/score/thread.h>
25 #include <rtems/score/watchdog.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
43  );
44 
48 typedef enum {
61 
64 #define CORE_RWLOCK_STATUS_LAST CORE_RWLOCK_TIMEOUT
65 
70 #define CORE_RWLOCK_THREAD_WAITING_FOR_READ 0
71 
76 #define CORE_RWLOCK_THREAD_WAITING_FOR_WRITE 1
77 
87  CORE_RWLock_Control *the_rwlock,
88  CORE_RWLock_Attributes *the_rwlock_attributes
89 );
90 
91 RTEMS_INLINE_ROUTINE void _CORE_RWLock_Destroy(
92  CORE_RWLock_Control *the_rwlock
93 )
94 {
95  _Thread_queue_Destroy( &the_rwlock->Wait_queue );
96 }
97 
115  CORE_RWLock_Control *the_rwlock,
116  Thread_Control *executing,
117  Objects_Id id,
118  bool wait,
119  Watchdog_Interval timeout,
120  CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
121 );
122 
139  CORE_RWLock_Control *the_rwlock,
140  Thread_Control *executing,
141  Objects_Id id,
142  bool wait,
143  Watchdog_Interval timeout,
144  CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
145 );
146 
157 CORE_RWLock_Status _CORE_RWLock_Release(
158  CORE_RWLock_Control *the_rwlock,
159  Thread_Control *executing
160 );
161 
171 #define _CORE_RWLock_Flush( _the_rwlock, _remote_extract_callout, _status) \
172  _Thread_queue_Flush( \
173  &((_the_rwlock)->Wait_queue), \
174  (_remote_extract_callout), \
175  (_status) \
176  )
177 
184  CORE_RWLock_Attributes *the_attributes
185 )
186 {
187  the_attributes->XXX = 0;
188 }
189 
192 #ifdef __cplusplus
193 }
194 #endif
195 
196 #endif
197 /* end of include file */
void _CORE_RWLock_Obtain_for_writing(CORE_RWLock_Control *the_rwlock, Thread_Control *executing, Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support)
Obtain RWLock for writing.
Definition: corerwlockobtainwrite.c:26
The following defines the control block used to manage each RWLock.
Definition: corerwlock.h:67
Thread_queue_Control Wait_queue
This field is the Waiting Queue used to manage the set of tasks which are blocked waiting for the RWL...
Definition: corerwlock.h:71
This status indicates that the calling task was willing to block but the operation was unable to comp...
Definition: corerwlockimpl.h:59
This status indicates that the thread was blocked waiting for an.
Definition: corerwlockimpl.h:52
This status indicates that the operation completed successfully.
Definition: corerwlockimpl.h:50
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
int XXX
This field indicates XXX.
Definition: corerwlock.h:60
void _CORE_RWLock_Initialize(CORE_RWLock_Control *the_rwlock, CORE_RWLock_Attributes *the_rwlock_attributes)
Initialize a RWlock.
Definition: corerwlock.c:24
Constants and Structures Associated with Watchdog Timers.
CORE_RWLock_Status _CORE_RWLock_Release(CORE_RWLock_Control *the_rwlock, Thread_Control *executing)
Release the RWLock.
Definition: corerwlockrelease.c:27
Constants and Structures Related with the Thread Control Block.
The following defines the control block used to manage the attributes of each RWLock.
Definition: corerwlock.h:57
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
void _CORE_RWLock_Obtain_for_reading(CORE_RWLock_Control *the_rwlock, Thread_Control *executing, Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support)
Obtain RWLock for reading.
Definition: corerwlockobtainread.c:26
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(CORE_RWLock_Attributes *the_attributes)
This method is used to initialize core rwlock attributes.
Definition: corerwlockimpl.h:183
void(* CORE_RWLock_API_mp_support_callout)(Thread_Control *, Objects_Id)
The following type defines the callout which the API provides to support global/multiprocessor operat...
Definition: corerwlockimpl.h:40
Constants and Structures Associated with the Manipulation of Objects.
CORE_RWLock_Status
Core RWLock handler return statuses.
Definition: corerwlockimpl.h:48
uint32_t Watchdog_Interval
Type is used to specify the length of intervals.
Definition: watchdog.h:47
This status indicates that the rwlock was not immediately available.
Definition: corerwlockimpl.h:54
Constants and Structures Associated with the RWLock Handler.
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122