1
1

fixes trac:2355 - race in interaction between opal_atomic_lifo_push

and opal_atomic_lifo_pop. Adds memory barriers to remove the race
condition

This commit was SVN r23014.

The following Trac tickets were found above:
  Ticket 2355 --> https://svn.open-mpi.org/trac/ompi/ticket/2355
Этот коммит содержится в:
Christopher Yeoh 2010-04-21 00:00:14 +00:00
родитель 53ab6600e6
Коммит cab7982c7e

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2010 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -296,7 +297,6 @@ static inline int32_t opal_atomic_add_32(volatile int32_t* v, int inc)
" add %0, %2, %0 \n\t"
" stwcx. %0, 0, %3 \n\t"
" bne- 1b \n\t"
" mr %3, %0 \n\t"
: "=&r" (t), "=m" (*v)
: "r" (inc), "r" (v), "m" (*v)
: "cc");
@ -314,7 +314,6 @@ static inline int32_t opal_atomic_sub_32(volatile int32_t* v, int dec)
" subf %0,%2,%0 \n\t"
" stwcx. %0,0,%3 \n\t"
" bne- 1b \n\t"
" mr %3, %0 \n\t"
: "=&r" (t), "=m" (*v)
: "r" (dec), "r" (v), "m" (*v)
: "cc");