Changeset 70f8bcd2


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

Added new future types

Location:
libcfa/src
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/Makefile.am

    r1f58c62 r70f8bcd2  
    9494        concurrency/clib/cfathread.h \
    9595        concurrency/invoke.h \
     96        concurrency/future.hfa \
    9697        concurrency/kernel/fwd.hfa
    9798
  • 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.