1
1

Merge pull request #1470 from hjelmn/fifo_fix

opal/fifo: use atomics to set fifo head in opal_fifo_push
Этот коммит содержится в:
Nathan Hjelm 2016-03-17 22:30:31 -06:00
родитель 361f931967 dc000213ea
Коммит c749d7d977

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

@ -12,7 +12,7 @@
* All rights reserved.
* Copyright (c) 2007 Voltaire All rights reserved.
* Copyright (c) 2010 IBM Corporation. All rights reserved.
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
* reseved.
* $COPYRIGHT$
*
@ -101,7 +101,8 @@ static inline opal_list_item_t *opal_fifo_push_atomic (opal_fifo_t *fifo,
if (&fifo->opal_fifo_ghost == tail.data.item) {
/* update the head */
fifo->opal_fifo_head.data.item = item;
opal_counted_pointer_t head = {.value = fifo->opal_fifo_head.value};
opal_update_counted_pointer (&fifo->opal_fifo_head, head, item);
} else {
/* update previous item */
tail.data.item->opal_list_next = item;