Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/invoke.h

    r09d4b22 r8c50aed  
    9292        };
    9393
    94         enum coroutine_state { Halted, Start, Inactive, Active, Primed };
     94        enum coroutine_state { Halted, Start, Primed, Inactive, Active, Rerun };
     95        enum __Preemption_Reason { __NO_PREEMPTION, __ALARM_PREEMPTION, __POLL_PREEMPTION, __MANUAL_PREEMPTION };
    9596
    9697        struct coroutine_desc {
     
    164165
    165166                // current execution status for coroutine
    166                 enum coroutine_state state;
     167                volatile int state;
     168                enum __Preemption_Reason preempted;
    167169
    168170                //SKULLDUGGERY errno is not save in the thread data structure because returnToKernel appears to be the only function to require saving and restoring it
     
    198200        #ifdef __cforall
    199201        extern "Cforall" {
    200                 static inline thread_desc *& get_next( thread_desc & this ) {
     202                static inline thread_desc *& get_next( thread_desc & this ) __attribute__((const)) {
    201203                        return this.next;
    202204                }
    203205
    204                 static inline [thread_desc *&, thread_desc *& ] __get( thread_desc & this ) {
     206                static inline [thread_desc *&, thread_desc *& ] __get( thread_desc & this ) /*__attribute__((const))*/ {
    205207                        return this.node.[next, prev];
    206208                }
     
    218220                }
    219221
    220                 static inline bool ?==?( const __monitor_group_t & lhs, const __monitor_group_t & rhs ) {
     222                static inline bool ?==?( const __monitor_group_t & lhs, const __monitor_group_t & rhs ) __attribute__((const)) {
    221223                        if( (lhs.data != 0) != (rhs.data != 0) ) return false;
    222224                        if( lhs.size != rhs.size ) return false;
Note: See TracChangeset for help on using the changeset viewer.