[rtems commit] score: Delete MP support for RW locks

Sebastian Huber sebh at rtems.org
Wed Apr 6 08:32:11 UTC 2016


Module:    rtems
Branch:    master
Commit:    6ca60e5dc94654504dc4c9974733afd0f58d86e3
Changeset: http://git.rtems.org/rtems/commit/?id=6ca60e5dc94654504dc4c9974733afd0f58d86e3

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Apr  1 15:10:08 2016 +0200

score: Delete MP support for RW locks

MP support was not implemented.

---

 cpukit/posix/src/prwlockrdlock.c                  |  4 +--
 cpukit/posix/src/prwlocktimedrdlock.c             |  4 +--
 cpukit/posix/src/prwlocktimedwrlock.c             |  4 +--
 cpukit/posix/src/prwlocktryrdlock.c               |  4 +--
 cpukit/posix/src/prwlocktrywrlock.c               |  4 +--
 cpukit/posix/src/prwlockwrlock.c                  |  4 +--
 cpukit/score/include/rtems/score/corerwlockimpl.h | 35 ++++++-----------------
 cpukit/score/src/corerwlockobtainread.c           | 10 +++----
 cpukit/score/src/corerwlockobtainwrite.c          |  4 +--
 9 files changed, 19 insertions(+), 54 deletions(-)

diff --git a/cpukit/posix/src/prwlockrdlock.c b/cpukit/posix/src/prwlockrdlock.c
index 168a34a..c6bf5fc 100644
--- a/cpukit/posix/src/prwlockrdlock.c
+++ b/cpukit/posix/src/prwlockrdlock.c
@@ -50,10 +50,8 @@ int pthread_rwlock_rdlock(
       _CORE_RWLock_Obtain_for_reading(
         &the_rwlock->RWLock,
         executing,
-        *rwlock,
         true,                 /* we are willing to wait forever */
-        0,
-        NULL
+        0
       );
 
       _Objects_Put( &the_rwlock->Object );
diff --git a/cpukit/posix/src/prwlocktimedrdlock.c b/cpukit/posix/src/prwlocktimedrdlock.c
index 20f6682..b94fe1b 100644
--- a/cpukit/posix/src/prwlocktimedrdlock.c
+++ b/cpukit/posix/src/prwlocktimedrdlock.c
@@ -76,10 +76,8 @@ int pthread_rwlock_timedrdlock(
       _CORE_RWLock_Obtain_for_reading(
         &the_rwlock->RWLock,
         executing,
-        *rwlock,
         do_wait,
-        ticks,
-        NULL
+        ticks
       );
 
       _Objects_Put( &the_rwlock->Object );
diff --git a/cpukit/posix/src/prwlocktimedwrlock.c b/cpukit/posix/src/prwlocktimedwrlock.c
index f387dc3..42a8068 100644
--- a/cpukit/posix/src/prwlocktimedwrlock.c
+++ b/cpukit/posix/src/prwlocktimedwrlock.c
@@ -78,10 +78,8 @@ int pthread_rwlock_timedwrlock(
       _CORE_RWLock_Obtain_for_writing(
         &the_rwlock->RWLock,
         executing,
-        *rwlock,
         do_wait,
-        ticks,
-        NULL
+        ticks
       );
 
       _Objects_Put( &the_rwlock->Object );
diff --git a/cpukit/posix/src/prwlocktryrdlock.c b/cpukit/posix/src/prwlocktryrdlock.c
index 6a70de5..72413e4 100644
--- a/cpukit/posix/src/prwlocktryrdlock.c
+++ b/cpukit/posix/src/prwlocktryrdlock.c
@@ -54,10 +54,8 @@ int pthread_rwlock_tryrdlock(
       _CORE_RWLock_Obtain_for_reading(
         &the_rwlock->RWLock,
         executing,
-        *rwlock,
         false,                  /* do not wait for the rwlock */
-        0,
-        NULL
+        0
       );
 
 
diff --git a/cpukit/posix/src/prwlocktrywrlock.c b/cpukit/posix/src/prwlocktrywrlock.c
index 7afd41a..23f7d80 100644
--- a/cpukit/posix/src/prwlocktrywrlock.c
+++ b/cpukit/posix/src/prwlocktrywrlock.c
@@ -54,10 +54,8 @@ int pthread_rwlock_trywrlock(
       _CORE_RWLock_Obtain_for_writing(
         &the_rwlock->RWLock,
         executing,
-        *rwlock,
         false,                 /* we are not willing to wait */
-        0,
-        NULL
+        0
       );
 
       _Objects_Put( &the_rwlock->Object );
diff --git a/cpukit/posix/src/prwlockwrlock.c b/cpukit/posix/src/prwlockwrlock.c
index 1905460..49bc114 100644
--- a/cpukit/posix/src/prwlockwrlock.c
+++ b/cpukit/posix/src/prwlockwrlock.c
@@ -58,10 +58,8 @@ int pthread_rwlock_wrlock(
       _CORE_RWLock_Obtain_for_writing(
         &the_rwlock->RWLock,
         executing,
-        *rwlock,
         true,          /* do not timeout -- wait forever */
-        0,
-        NULL
+        0
       );
 
       _Objects_Put( &the_rwlock->Object );
diff --git a/cpukit/score/include/rtems/score/corerwlockimpl.h b/cpukit/score/include/rtems/score/corerwlockimpl.h
index e41c699..6d563a5 100644
--- a/cpukit/score/include/rtems/score/corerwlockimpl.h
+++ b/cpukit/score/include/rtems/score/corerwlockimpl.h
@@ -36,15 +36,6 @@ extern "C" {
 #define CORE_RWLOCK_TQ_OPERATIONS &_Thread_queue_Operations_FIFO
 
 /**
- *  The following type defines the callout which the API provides
- *  to support global/multiprocessor operations on RWLocks.
- */
-typedef void ( *CORE_RWLock_API_mp_support_callout )(
-                 Thread_Control *,
-                 Objects_Id
-             );
-
-/**
  *  Core RWLock handler return statuses.
  */
 typedef enum {
@@ -103,23 +94,18 @@ RTEMS_INLINE_ROUTINE void _CORE_RWLock_Destroy(
  *  This routine attempts to obtain the RWLock for read access.
  *
  *  @param[in] the_rwlock is the RWLock to wait for
- *  @param[in] id is the id of the object being waited upon
  *  @param[in] wait is true if the calling thread is willing to wait
  *  @param[in] timeout is the number of ticks the calling thread is willing
  *         to wait if @a wait is true.
- *  @param[in] api_rwlock_mp_support is the routine to invoke if the
- *         thread unblocked is remote
  *
  * @note Status is returned via the thread control block.
  */
 
 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
+  CORE_RWLock_Control *the_rwlock,
+  Thread_Control      *executing,
+  bool                 wait,
+  Watchdog_Interval    timeout
 );
 
 /**
@@ -128,22 +114,17 @@ void _CORE_RWLock_Obtain_for_reading(
  *  This routine attempts to obtain the RWLock for write exclusive access.
  *
  *  @param[in] the_rwlock is the RWLock to wait for
- *  @param[in] id is the id of the object being waited upon
  *  @param[in] wait is true if the calling thread is willing to wait
  *  @param[in] timeout is the number of ticks the calling thread is willing
  *         to wait if @a wait is true.
- *  @param[in] api_rwlock_mp_support is the routine to invoke if the
- *         thread unblocked is remote
  *
  * @note Status is returned via the thread control block.
  */
 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
+  CORE_RWLock_Control *the_rwlock,
+  Thread_Control      *executing,
+  bool                 wait,
+  Watchdog_Interval    timeout
 );
 
 /**
diff --git a/cpukit/score/src/corerwlockobtainread.c b/cpukit/score/src/corerwlockobtainread.c
index 4676dd7..71cdf26 100644
--- a/cpukit/score/src/corerwlockobtainread.c
+++ b/cpukit/score/src/corerwlockobtainread.c
@@ -24,12 +24,10 @@
 #include <rtems/score/watchdog.h>
 
 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
+  CORE_RWLock_Control *the_rwlock,
+  Thread_Control      *executing,
+  bool                 wait,
+  Watchdog_Interval    timeout
 )
 {
   ISR_lock_Context lock_context;
diff --git a/cpukit/score/src/corerwlockobtainwrite.c b/cpukit/score/src/corerwlockobtainwrite.c
index 0441650..3ae1826 100644
--- a/cpukit/score/src/corerwlockobtainwrite.c
+++ b/cpukit/score/src/corerwlockobtainwrite.c
@@ -26,10 +26,8 @@
 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
+  Watchdog_Interval                    timeout
 )
 {
   ISR_lock_Context lock_context;




More information about the vc mailing list