score: Delete unused CORE_RWLock_Attributes

This commit is contained in:
Sebastian Huber
2016-04-21 07:29:37 +02:00
parent bdf6cc2a73
commit bbd6d27af8
4 changed files with 3 additions and 45 deletions
+1 -9
View File
@@ -97,7 +97,6 @@ int pthread_rwlock_init(
)
{
POSIX_RWLock_Control *the_rwlock;
CORE_RWLock_Attributes the_attributes;
pthread_rwlockattr_t default_attr;
const pthread_rwlockattr_t *the_attr;
@@ -131,13 +130,6 @@ int pthread_rwlock_init(
return EINVAL;
}
/*
* Convert from POSIX attributes to Core RWLock attributes
*
* NOTE: Currently there are no core rwlock attributes
*/
_CORE_RWLock_Initialize_attributes( &the_attributes );
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
@@ -145,7 +137,7 @@ int pthread_rwlock_init(
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
_CORE_RWLock_Initialize( &the_rwlock->RWLock );
_Objects_Open_u32(
&_POSIX_RWLock_Information,
@@ -50,16 +50,6 @@ typedef enum {
CORE_RWLOCK_LOCKED_FOR_WRITING
} CORE_RWLock_States;
/**
* The following defines the control block used to manage the
* attributes of each RWLock.
*/
typedef struct {
/** This field indicates XXX.
*/
int XXX;
} CORE_RWLock_Attributes;
/**
* The following defines the control block used to manage each
* RWLock.
@@ -69,10 +59,6 @@ typedef struct {
* which are blocked waiting for the RWLock to be released.
*/
Thread_queue_Control Wait_queue;
/** This element is the set of attributes which define this instance's
* behavior.
*/
CORE_RWLock_Attributes Attributes;
/** This element is the current state of the RWLock.
*/
CORE_RWLock_States current_state;
@@ -74,11 +74,9 @@ typedef enum {
* This routine initializes the RWLock based on the parameters passed.
*
* @param[in] the_rwlock is the RWLock to initialize
* @param[in] the_rwlock_attributes define the behavior of this instance
*/
void _CORE_RWLock_Initialize(
CORE_RWLock_Control *the_rwlock,
CORE_RWLock_Attributes *the_rwlock_attributes
CORE_RWLock_Control *the_rwlock
);
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Destroy(
@@ -142,18 +140,6 @@ CORE_RWLock_Status _CORE_RWLock_Release(
Thread_Control *executing
);
/**
* This method is used to initialize core rwlock attributes.
*
* @param[in] the_attributes pointer to the attributes to initialize.
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
}
/** @} */
#ifdef __cplusplus
+1 -7
View File
@@ -22,15 +22,9 @@
#include <rtems/score/threadqimpl.h>
void _CORE_RWLock_Initialize(
CORE_RWLock_Control *the_rwlock,
CORE_RWLock_Attributes *the_rwlock_attributes
CORE_RWLock_Control *the_rwlock
)
{
the_rwlock->Attributes = *the_rwlock_attributes;
/*
the_rwlock->number_of_waiting_threads = 0;
*/
the_rwlock->number_of_readers = 0;
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;