RTEMS CPU Kit with SuperCore  4.11.3
spinlockimpl.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_SPINLOCKIMPL_H
20 #define _RTEMS_POSIX_SPINLOCKIMPL_H
21 
22 #include <rtems/posix/spinlock.h>
24 #include <rtems/score/objectimpl.h>
25 
26 #include <pthread.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
38 
46 
58  CORE_spinlock_Status the_spinlock_status
59 );
60 
68 {
69  return (POSIX_Spinlock_Control *)
70  _Objects_Allocate( &_POSIX_Spinlock_Information );
71 }
72 
80  POSIX_Spinlock_Control *the_spinlock
81 )
82 {
83  _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object );
84 }
85 
98  pthread_spinlock_t *spinlock,
99  Objects_Locations *location
100 )
101 {
103  &_POSIX_Spinlock_Information,
104  (Objects_Id) *spinlock,
105  location
106  );
107 }
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif
114 /* end of include file */
void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectfree.c:25
CORE_spinlock_Status
Core Spinlock handler return statuses.
Definition: corespinlockimpl.h:37
Inlined Routines Associated with the SuperCore Spinlock.
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:101
int _POSIX_Spinlock_Translate_core_spinlock_return_code(CORE_spinlock_Status the_spinlock_status)
Translate core spinlock status code.
Definition: pspinlocktranslatereturncode.c:38
#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
POSIX Threads Private Support.
Objects_Control * _Objects_Get(Objects_Information *information, Objects_Id id, Objects_Locations *location)
Maps object ids to object control blocks.
Definition: objectget.c:23
This type defines the control block used to manage each spinlock.
Definition: spinlock.h:49
Objects_Control Object
This is used to manage a spinlock as an object.
Definition: spinlock.h:51
The following defines the structure for the information used to manage each class of objects...
Definition: objectimpl.h:136
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control * _POSIX_Spinlock_Get(pthread_spinlock_t *spinlock, Objects_Locations *location)
Get a spinlock control block.
Definition: spinlockimpl.h:97
void _POSIX_Spinlock_Manager_initialization(void)
POSIX spinlock manager initialization.
Definition: pspin.c:29
POSIX Spinlock Support.
RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free(POSIX_Spinlock_Control *the_spinlock)
Free a spinlock control block.
Definition: spinlockimpl.h:79
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control * _POSIX_Spinlock_Allocate(void)
Allocate a spinlock control block.
Definition: spinlockimpl.h:67
Objects_Locations
This enumerated type lists the locations which may be returned by _Objects_Get.
Definition: objectimpl.h:117
Inlined Routines in the Object Handler.
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
#define POSIX_EXTERN
The following ensures that all data is declared in the space of the initialization routine for either...
Definition: basedefs.h:123
POSIX_EXTERN Objects_Information _POSIX_Spinlock_Information
The following defines the information control block used to manage this class of objects.
Definition: spinlockimpl.h:37