Ignore:
Timestamp:
Jan 7, 2021, 1:04:54 PM (17 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr
Children:
2fc9664b
Parents:
1f58c62
Message:

Added new future types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/locks.hfa

    r1f58c62 r70f8bcd2  
    283283                void ^?{}(future_t &) {}
    284284
     285                void reset(future_t & this) {
     286                        // needs to be in 0p or 1p
     287                        __atomic_exchange_n( &this.ptr, 0p, __ATOMIC_SEQ_CST);
     288                }
     289
    285290                // check if the future is available
    286291                bool available( future_t & this ) {
     
    348353                                while( this.ptr != 1p ) Pause();
    349354                        }
     355
     356                        free( &this );
    350357                        return;
    351358                }
Note: See TracChangeset for help on using the changeset viewer.