summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/corebarrierwait.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-20 14:51:21 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-20 14:51:21 +0000
commitb2b77956dc3e2123b8aa25a1195014bea7e0ee10 (patch)
tree38fd9bcbefb441c9987a9104f624dfe93e872b14 /cpukit/score/src/corebarrierwait.c
parent2009-07-20 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-b2b77956dc3e2123b8aa25a1195014bea7e0ee10.tar.bz2
2009-07-20 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/src/corebarrierwait.c: Reverse order of tests to increase test coverage.
Diffstat (limited to 'cpukit/score/src/corebarrierwait.c')
-rw-r--r--cpukit/score/src/corebarrierwait.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/score/src/corebarrierwait.c b/cpukit/score/src/corebarrierwait.c
index 07e8fcdc88..9e71a8ac9a 100644
--- a/cpukit/score/src/corebarrierwait.c
+++ b/cpukit/score/src/corebarrierwait.c
@@ -59,9 +59,9 @@ void _CORE_barrier_Wait(
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
- if ( the_barrier->number_of_waiting_threads ==
- the_barrier->Attributes.maximum_count) {
- if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
+ if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
+ if ( the_barrier->number_of_waiting_threads ==
+ the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );