[PATCH 05/20] score: Close barrier object before flush

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Apr 19 13:12:33 UTC 2016


This prevents use of the object after the flush on uni-processor
configurations.
---
 cpukit/rtems/src/barrierdelete.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/rtems/src/barrierdelete.c b/cpukit/rtems/src/barrierdelete.c
index 7dab0c0..5d87e63 100644
--- a/cpukit/rtems/src/barrierdelete.c
+++ b/cpukit/rtems/src/barrierdelete.c
@@ -33,8 +33,8 @@ rtems_status_code rtems_barrier_delete(
   switch ( location ) {
 
     case OBJECTS_LOCAL:
-      _CORE_barrier_Flush( &the_barrier->Barrier, NULL, 0 );
       _Objects_Close( &_Barrier_Information, &the_barrier->Object );
+      _CORE_barrier_Flush( &the_barrier->Barrier, NULL, 0 );
       _Objects_Put( &the_barrier->Object );
       _Barrier_Free( the_barrier );
       _Objects_Allocator_unlock();
-- 
1.8.4.5




More information about the devel mailing list