1
1

opal/class/opal_lifo: use a standard syntax to initialize a local variable

opal_lifo.h is now included from C++, and g++ does not seem to accept C99 initializer.
Этот коммит содержится в:
Gilles Gouaillardet 2016-03-23 09:46:46 +09:00
родитель 8ff1d09907
Коммит 4b91237464

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

@ -68,7 +68,9 @@ typedef union opal_counted_pointer_t opal_counted_pointer_t;
static inline bool opal_update_counted_pointer (volatile opal_counted_pointer_t *addr, opal_counted_pointer_t old,
opal_list_item_t *item)
{
opal_counted_pointer_t new_p = {.data = {.item = item, .counter = old.data.counter + 1}};
opal_counted_pointer_t new_p;
new_p.data.item = item;
new_p.data.counter = old.data.counter + 1;
return opal_atomic_cmpset_128 (&addr->value, old.value, new_p.value);
}