[rtems commit] posix: Fix for RTEMS_DEBUG

Sebastian Huber sebh at rtems.org
Wed Aug 3 11:57:54 UTC 2016


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Aug  3 13:40:26 2016 +0200

posix: Fix for RTEMS_DEBUG

---

 cpukit/posix/src/pthreadequal.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/cpukit/posix/src/pthreadequal.c b/cpukit/posix/src/pthreadequal.c
index 54b15d2..3c315bf 100644
--- a/cpukit/posix/src/pthreadequal.c
+++ b/cpukit/posix/src/pthreadequal.c
@@ -47,8 +47,14 @@ int pthread_equal(
 
   thread_1 = _Thread_Get( t1, &lock_context_1 );
   thread_2 = _Thread_Get( t2, &lock_context_2 );
-  _ISR_lock_ISR_enable( &lock_context_2 );
-  _ISR_lock_ISR_enable( &lock_context_1 );
+
+  if ( thread_2 != NULL ) {
+    _ISR_lock_ISR_enable( &lock_context_2 );
+  }
+
+  if ( thread_1 != NULL ) {
+    _ISR_lock_ISR_enable( &lock_context_1 );
+  }
 
   return thread_1 != NULL && thread_1 == thread_2;
 #endif



More information about the vc mailing list