Skip to content

Commit

Permalink
Merge pull request #674 from devreal/list-item-volatile-inc
Browse files Browse the repository at this point in the history
Suffix-increment is deprecated on volatile variables in C++
  • Loading branch information
therault authored Sep 17, 2024
2 parents 07f7238 + 57b7cde commit 1e09883
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions parsec/class/list_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ parsec_list_item_ring_chop( parsec_list_item_t* item )
item->list_prev->list_next = item->list_next;
item->list_next->list_prev = item->list_prev;
#if defined(PARSEC_DEBUG_PARANOID)
if(item->refcount) item->refcount--;
if(item->refcount) item->refcount = item->refcount-1;
item->list_prev = (parsec_list_item_t*)(void*)0xdeadbeefL;
item->list_next = (parsec_list_item_t*)(void*)0xdeadbeefL;
#endif
Expand Down Expand Up @@ -285,7 +285,7 @@ parsec_list_item_ring_push_sorted( parsec_list_item_t* ring,
#define PARSEC_ITEM_ATTACH(LIST, ITEM) \
do { \
parsec_list_item_t *_item_ = (ITEM); \
_item_->refcount++; \
_item_->refcount = _item_->refcount+1; \
assert( 1 == _item_->refcount ); \
_item_->belong_to = (LIST); \
} while(0)
Expand All @@ -309,7 +309,7 @@ parsec_list_item_ring_push_sorted( parsec_list_item_t* ring,
assert( _item->belong_to != (void*)_item ); \
_item->list_prev = (parsec_list_item_t*)(void*)0xdeadbeefL; \
_item->list_next = (parsec_list_item_t*)(void*)0xdeadbeefL; \
_item->refcount--; \
_item->refcount = _item->refcount-1; \
assert( 0 == _item->refcount ); \
} while (0)
#else
Expand Down

0 comments on commit 1e09883

Please sign in to comment.