summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-03 13:40:26 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-03 13:56:06 +0200
commit3b3552bf01f552c710d368c24bc16062558e8e8a (patch)
treee604189af30ede18c8ea92d03c8e5c8ec2f9f8a1
parentscore: Fix for RTEMS_DEBUG (diff)
downloadrtems-3b3552bf01f552c710d368c24bc16062558e8e8a.tar.bz2
posix: Fix for RTEMS_DEBUG
-rw-r--r--cpukit/posix/src/pthreadequal.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpukit/posix/src/pthreadequal.c b/cpukit/posix/src/pthreadequal.c
index 54b15d2e55..3c315bff47 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