Ignore:
File:
1 edited

Legend:

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

    r17af7d1 r348006f  
    2828      #define unlikely(x)    __builtin_expect(!!(x), 0)
    2929      #define thread_local _Thread_local
     30      #define SCHEDULER_CAPACITY 10
    3031
    3132      struct spinlock {
     
    5960
    6061      struct coStack_t {
    61             unsigned int size;                  // size of stack
    62             void *storage;                      // pointer to stack
    63             void *limit;                        // stack grows towards stack limit
    64             void *base;                         // base of stack
    65             void *context;                      // address of cfa_context_t
    66             void *top;                          // address of top of storage
    67             bool userStack;                     // whether or not the user allocated the stack
     62            unsigned int size;                // size of stack
     63            void *storage;                            // pointer to stack
     64            void *limit;                              // stack grows towards stack limit
     65            void *base;                               // base of stack
     66            void *context;                            // address of cfa_context_t
     67            void *top;                                // address of top of storage
     68            bool userStack;     
    6869      };
    6970
     
    7172
    7273      struct coroutine_desc {
    73             struct coStack_t stack;             // stack information of the coroutine
    74             const char *name;                   // textual name for coroutine/task, initialized by uC++ generated code
    75             int errno_;                         // copy of global UNIX variable errno
    76             enum coroutine_state state;         // current execution status for coroutine
    77             struct coroutine_desc *starter;     // first coroutine to resume this one
    78             struct coroutine_desc *last;              // last coroutine to resume this one
     74            struct coStack_t stack;
     75            const char *name;                         // textual name for coroutine/task, initialized by uC++ generated code
     76            int errno_;                               // copy of global UNIX variable errno
     77            enum coroutine_state state;       // current execution status for coroutine
     78            struct coroutine_desc *starter;           // first coroutine to resume this one
     79            struct coroutine_desc *last;                      // last coroutine to resume this one
    7980      };
    8081
    8182      struct thread_desc {
    82             struct coroutine_desc cor;            // coroutine body used to store context
     83            struct coroutine_desc c;                 // coroutine body used to store context
    8384            struct signal_once terminated;      // indicate if execuation state is not halted
    84             struct thread_desc * next;          // instrusive link field for threads
     85            struct thread_desc * next;               // instrusive link field for threads
    8586      };
    8687
Note: See TracChangeset for help on using the changeset viewer.