Ignore:
Timestamp:
Jul 22, 2020, 4:05:29 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
2e5fd8b6
Parents:
c0587193
Message:

Changed snzi to group consecutive queues together and removed spurious parent.Arrive()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/thierry_delisle_PhD/code/snzi.hpp

    rc0587193 r9304ca2  
    1414
    1515        void arrive(int idx) {
     16                idx >>= 2;
    1617                idx %= mask;
    1718                nodes[idx].arrive();
     
    1920
    2021        void depart(int idx) {
     22                idx >>= 2;
    2123                idx %= mask;
    2224                nodes[idx].depart();
     
    8284                                if( x.cnt == val_t::Half ) {
    8385                                        /* paranoid */ assert(parent);
    84                                         parent->arrive();
     86                                        if(undoArr == 2) {
     87                                                undoArr--;
     88                                        } else {
     89                                                parent->arrive();
     90                                        }
    8591                                        if( !value.cas(x, 1, x.ver) ) {
    8692                                                undoArr = undoArr + 1;
Note: See TracChangeset for help on using the changeset viewer.