From 0207c55825d8a45780ebc860578d5c89baf507f7 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 6 Jun 1996 15:36:18 +0000 Subject: Made the implementation of pthread_equal conditional on RTEMS_DEBUG. If RTEMS is built for debug, then every possible effort is made to validate the two ids. Otherwise, a simple comparison is performed. --- c/src/exec/posix/src/pthread.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'c/src/exec/posix/src/pthread.c') diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c index eae7f777a5..be39656e42 100644 --- a/c/src/exec/posix/src/pthread.c +++ b/c/src/exec/posix/src/pthread.c @@ -1084,6 +1084,15 @@ int pthread_equal( pthread_t t2 ) { + /* + * If the system is configured for debug, then we will do everything we + * can to insure that both ids are valid. Otherwise, we will do the + * cheapest possible thing to determine if they are equal. + */ + +#ifndef RTEMS_DEBUG + return _Objects_Are_ids_equal( t1, t2 ); +#else int status; Objects_Locations location; @@ -1124,6 +1133,7 @@ int pthread_equal( _Thread_Enable_dispatch(); return status; +#endif } /*PAGE -- cgit v1.2.3