- File:
-
- 1 edited
-
libcfa/src/concurrency/coroutine.cfa (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
r290553a rc960331 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 26 22:06:09202013 // Update Count : 2 112 // Last Modified On : Fri Oct 23 23:05:24 2020 13 // Update Count : 22 14 14 // 15 15 … … 24 24 #include <unistd.h> 25 25 #include <sys/mman.h> // mprotect 26 extern "C" {27 // use this define to make unwind.h play nice, definitely a hack28 #define HIDE_EXPORTS29 26 #include <unwind.h> 30 #undef HIDE_EXPORTS31 }32 27 33 28 #include "kernel_private.hfa" 29 #include "exception.hfa" 34 30 35 31 #define __CFA_INVOKE_PRIVATE__ … … 49 45 FORALL_DATA_INSTANCE(CoroutineCancelled, (dtype coroutine_t), (coroutine_t)) 50 46 51 struct __cfaehm_node {52 struct _Unwind_Exception unwind_exception;53 struct __cfaehm_node * next;54 int handler_index;55 };56 57 47 forall(dtype T) 58 48 void mark_exception(CoroutineCancelled(T) *) {} … … 60 50 forall(dtype T) 61 51 void copy(CoroutineCancelled(T) * dst, CoroutineCancelled(T) * src) { 52 dst->virtual_table = src->virtual_table; 62 53 dst->the_coroutine = src->the_coroutine; 63 54 dst->the_exception = src->the_exception; … … 74 65 verify( desc->cancellation ); 75 66 desc->state = Cancelled; 76 exception_t * except = (exception_t *)(1 + (__cfaehm_node *)desc->cancellation);67 exception_t * except = __cfaehm_cancellation_exception( desc->cancellation ); 77 68 78 69 // TODO: Remove explitate vtable set once trac#186 is fixed. … … 217 208 size = libFloor(create_size - stack_data_size - diff, libAlign()); 218 209 } // if 219 assertf( size >= MinStackSize, "Stack size %zd provides less than minimum of % d bytes for a stack.", size, MinStackSize );210 assertf( size >= MinStackSize, "Stack size %zd provides less than minimum of %zd bytes for a stack.", size, MinStackSize ); 220 211 221 212 this->storage = (__stack_t *)((intptr_t)storage + size);
Note:
See TracChangeset
for help on using the changeset viewer.