Ignore:
Timestamp:
Jun 12, 2020, 5:01:21 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:
2649ff9
Parents:
cb196f2
Message:

Fixed park unpark to support park as first step of main()
Fixes #170?

File:
1 edited

Legend:

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

    rcb196f2 rff79d5e  
    9292        };
    9393
    94         enum coroutine_state { Halted, Start, Primed, Blocked, Ready, Active, Rerun };
     94        enum __Coroutine_State { Halted, Start, Primed, Blocked, Ready, Active };
    9595        enum __Preemption_Reason { __NO_PREEMPTION, __ALARM_PREEMPTION, __POLL_PREEMPTION, __MANUAL_PREEMPTION };
    9696
     
    106106
    107107                // current execution status for coroutine
    108                 enum coroutine_state state;
     108                enum __Coroutine_State state;
    109109
    110110                // first coroutine to resume this one
     
    175175
    176176                // current execution status for coroutine
    177                 volatile int state;
    178                 enum __Preemption_Reason preempted;
     177                volatile int ticket;
     178                enum __Coroutine_State state:8;
     179                enum __Preemption_Reason preempted:8;
    179180
    180181                //SKULLDUGGERY errno is not save in the thread data structure because returnToKernel appears to be the only function to require saving and restoring it
     
    210211                        // previous function to park/unpark the thread
    211212                        const char * park_caller;
    212                         enum coroutine_state park_result;
     213                        int park_result;
     214                        enum __Coroutine_State park_state;
    213215                        bool park_stale;
    214216                        const char * unpark_caller;
    215                         enum coroutine_state unpark_result;
     217                        int unpark_result;
     218                        enum __Coroutine_State unpark_state;
    216219                        bool unpark_stale;
    217220                #endif
Note: See TracChangeset for help on using the changeset viewer.