diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-06-06 15:36:18 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-06-06 15:36:18 +0000 |
commit | 0207c55825d8a45780ebc860578d5c89baf507f7 (patch) | |
tree | d29969446365b6d1c485fda47d2bb82035f5a216 /c/src/exec/posix/src/pthread.c | |
parent | completed pthread_setschedparam. (diff) | |
download | rtems-0207c55825d8a45780ebc860578d5c89baf507f7.tar.bz2 |
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.
Diffstat (limited to 'c/src/exec/posix/src/pthread.c')
-rw-r--r-- | c/src/exec/posix/src/pthread.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 |