RTEMS CPU Kit with SuperCore  4.11.3
rwlockimpl.h
Go to the documentation of this file.
1 
10 /*
11  * COPYRIGHT (c) 1989-2011.
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_POSIX_RWLOCKIMPL_H
20 #define _RTEMS_POSIX_RWLOCKIMPL_H
21 
22 #include <rtems/posix/rwlock.h>
24 #include <rtems/score/objectimpl.h>
25 
26 #include <pthread.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
38 
46 
67  CORE_RWLock_Status the_RWLock_status
68 );
69 
77 {
78  return (POSIX_RWLock_Control *)
79  _Objects_Allocate( &_POSIX_RWLock_Information );
80 }
81 
89  POSIX_RWLock_Control *the_RWLock
90 )
91 {
92  _CORE_RWLock_Destroy( &the_RWLock->RWLock );
93  _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
94 }
95 
96 POSIX_RWLock_Control *_POSIX_RWLock_Get(
97  pthread_rwlock_t *rwlock,
98  Objects_Locations *location
99 );
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif
106 /* end of include file */
void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectfree.c:25
RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free(POSIX_RWLock_Control *the_RWLock)
Free a RWLock control block.
Definition: rwlockimpl.h:88
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:101
#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
void _POSIX_RWLock_Manager_initialization(void)
POSIX RWLock manager initialization.
Definition: prwlock.c:27
POSIX_EXTERN Objects_Information _POSIX_RWLock_Information
The following defines the information control block used to manage this class of objects.
Definition: rwlockimpl.h:37
POSIX Threads Private Support.
Inlined Routines Associated with the SuperCore RWLock.
This type defines the control block used to manage each RWLock.
Definition: rwlock.h:49
CORE_RWLock_Control RWLock
This is used to implement the RWLock.
Definition: rwlock.h:53
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control * _POSIX_RWLock_Allocate(void)
Allocate a RWLock control block.
Definition: rwlockimpl.h:76
CORE_RWLock_Status
Core RWLock handler return statuses.
Definition: corerwlockimpl.h:48
The following defines the structure for the information used to manage each class of objects...
Definition: objectimpl.h:136
Objects_Control Object
This is used to manage a RWLock as an object.
Definition: rwlock.h:51
Objects_Locations
This enumerated type lists the locations which may be returned by _Objects_Get.
Definition: objectimpl.h:117
int _POSIX_RWLock_Translate_core_RWLock_return_code(CORE_RWLock_Status the_RWLock_status)
POSIX translate core RWLock return code.
Definition: prwlocktranslatereturncode.c:35
Inlined Routines in the Object Handler.
Constants and Structures Associated with the POSIX RWLock Manager.
#define POSIX_EXTERN
The following ensures that all data is declared in the space of the initialization routine for either...
Definition: basedefs.h:123