Changes in src/libcfa/concurrency/invoke.h [17af7d1:348006f]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/invoke.h
r17af7d1 r348006f 28 28 #define unlikely(x) __builtin_expect(!!(x), 0) 29 29 #define thread_local _Thread_local 30 #define SCHEDULER_CAPACITY 10 30 31 31 32 struct spinlock { … … 59 60 60 61 struct coStack_t { 61 unsigned int size; 62 void *storage; 63 void *limit; 64 void *base; 65 void *context; 66 void *top; 67 bool userStack; // whether or not the user allocated the stack62 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; 68 69 }; 69 70 … … 71 72 72 73 struct coroutine_desc { 73 struct coStack_t stack; // stack information of the coroutine74 const char *name; 75 int errno_; 76 enum coroutine_state state; 77 struct coroutine_desc *starter; // first coroutine to resume this one78 struct coroutine_desc *last; // last coroutine to resume this one74 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 79 80 }; 80 81 81 82 struct thread_desc { 82 struct coroutine_desc c or;// coroutine body used to store context83 struct coroutine_desc c; // coroutine body used to store context 83 84 struct signal_once terminated; // indicate if execuation state is not halted 84 struct thread_desc * next; // instrusive link field for threads85 struct thread_desc * next; // instrusive link field for threads 85 86 }; 86 87
Note: See TracChangeset
for help on using the changeset viewer.