Changeset 5715d43
- Timestamp:
- Aug 14, 2020, 1:29:03 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 762fbc1
- Parents:
- 4c925cd
- Files:
-
- 10 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
r4c925cd r5715d43 215 215 return cor; 216 216 } 217 218 struct $coroutine * __cfactx_cor_active(void) { 219 return active_coroutine(); 220 } 217 221 } 218 222 -
libcfa/src/concurrency/invoke.c
r4c925cd r5715d43 29 29 // Called from the kernel when starting a coroutine or task so must switch back to user mode. 30 30 31 extern struct $coroutine * __cfactx_cor_active(void); 31 32 extern struct $coroutine * __cfactx_cor_finish(void); 32 33 extern void __cfactx_cor_leave ( struct $coroutine * ); … … 35 36 extern void disable_interrupts() OPTIONAL_THREAD; 36 37 extern void enable_interrupts( __cfaabi_dbg_ctx_param ); 38 39 struct exception_context_t * this_exception_context() { 40 return &__get_stack( __cfactx_cor_active() )->exception_context; 41 } 37 42 38 43 void __cfactx_invoke_coroutine( -
libcfa/src/concurrency/invoke.h
r4c925cd r5715d43 98 98 } 99 99 100 struct exception_context_t * this_exception_context(); 101 100 102 // struct which calls the monitor is accepting 101 103 struct __waitfor_mask_t { -
libcfa/src/exception.c
r4c925cd r5715d43 59 59 60 60 61 // Temperary global exception context. Does not work with concurency.62 static struct exception_context_t shared_stack = {NULL, NULL};63 64 61 // Get the current exception context. 65 62 // There can be a single global until multithreading occurs, then each stack 66 // needs its own. It will have to be updated to handle that. 67 struct exception_context_t * this_exception_context() { 63 // needs its own. We get this from libcfathreads (no weak attribute). 64 __attribute__((weak)) struct exception_context_t * this_exception_context() { 65 static struct exception_context_t shared_stack = {NULL, NULL}; 68 66 return &shared_stack; 69 67 } -
tests/Makefile.am
r4c925cd r5715d43 163 163 $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@}) 164 164 165 # Exception Tests 166 # Test with libcfathread; it changes how storage works. 167 168 exceptions/%-threads : exceptions/%.cfa $(CFACCBIN) 169 $(CFACOMPILETEST) -include exceptions/with-threads.hfa -c -o $(abspath ${@}).o 170 $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@}) 171 165 172 #------------------------------------------------------------------------------ 166 173 # Other targets -
tests/exceptions/terminate.cfa
r4c925cd r5715d43 142 142 } 143 143 } 144 -
tests/linking/withthreads.cfa
r4c925cd r5715d43 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // nothreads.cfa --7 // withthreads.cfa -- 8 8 // 9 9 // Author : Thierry Delisle
Note: See TracChangeset
for help on using the changeset viewer.