[PATCH 01/20] score: Delete unused CORE_RWLock_Attributes

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Apr 19 13:12:29 UTC 2016


---
 cpukit/posix/src/prwlockinit.c                    | 10 +---------
 cpukit/score/include/rtems/score/corerwlock.h     | 14 --------------
 cpukit/score/include/rtems/score/corerwlockimpl.h | 16 +---------------
 cpukit/score/src/corerwlock.c                     |  8 +-------
 4 files changed, 3 insertions(+), 45 deletions(-)

diff --git a/cpukit/posix/src/prwlockinit.c b/cpukit/posix/src/prwlockinit.c
index 7cf781f..afb7056 100644
--- a/cpukit/posix/src/prwlockinit.c
+++ b/cpukit/posix/src/prwlockinit.c
@@ -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,
diff --git a/cpukit/score/include/rtems/score/corerwlock.h b/cpukit/score/include/rtems/score/corerwlock.h
index f211339..89c18c6 100644
--- a/cpukit/score/include/rtems/score/corerwlock.h
+++ b/cpukit/score/include/rtems/score/corerwlock.h
@@ -51,16 +51,6 @@ typedef enum {
 }   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;
diff --git a/cpukit/score/include/rtems/score/corerwlockimpl.h b/cpukit/score/include/rtems/score/corerwlockimpl.h
index b9803c4..a8e890f 100644
--- a/cpukit/score/include/rtems/score/corerwlockimpl.h
+++ b/cpukit/score/include/rtems/score/corerwlockimpl.h
@@ -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
diff --git a/cpukit/score/src/corerwlock.c b/cpukit/score/src/corerwlock.c
index 23bb5e2..eae6258 100644
--- a/cpukit/score/src/corerwlock.c
+++ b/cpukit/score/src/corerwlock.c
@@ -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;
 
-- 
1.8.4.5



More information about the devel mailing list