Changeset 0ef03fc in OpenModelica
- Timestamp:
- 2019-01-19T13:31:28+01:00 (5 years ago)
- Branches:
- Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
- Children:
- 683050ef
- Parents:
- 23d8d265
- git-author:
- Anatoly Trosinenko <anatoly.trosinenko@…> (01/19/19 13:31:28)
- git-committer:
- hudson <openmodelica@…> (01/19/19 13:31:28)
- Location:
- SimulationRuntime/c/meta
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
SimulationRuntime/c/meta/meta_modelica_data.h
rf5e1d77 r0ef03fc 249 249 #define MMC_ELSE() } else { threadData->mmc_jumper = old_jumper; 250 250 251 #define MMC_TRY_TOP() { threadData_t threadDataOnStack = {0}, *oldThreadData = (threadData_t*)pthread_getspecific(mmc_thread_data_key),*threadData = &threadDataOnStack; pthread_setspecific(mmc_thread_data_key,threadData); pthread_mutex_init(&threadData->parentMutex,NULL); mmc_init_stackoverflow (threadData); MMC_TRY_INTERNAL(mmc_jumper) threadData->mmc_stack_overflow_jumper = threadData->mmc_jumper; /* Let the default stack overflow handler be the top-level handler */252 253 #define MMC_TRY_TOP_SET(X) { threadData_t threadDataOnStack = *((threadData_t*)X), *oldThreadData = (threadData_t*)pthread_getspecific(mmc_thread_data_key),*threadData = &threadDataOnStack; pthread_setspecific(mmc_thread_data_key,threadData); pthread_mutex_init(&threadData->parentMutex,NULL); mmc_init_stackoverflow (threadData); MMC_TRY_INTERNAL(mmc_jumper) threadData->mmc_stack_overflow_jumper = threadData->mmc_jumper; /* Let the default stack overflow handler be the top-level handler */254 255 #define MMC_TRY_TOP_INTERNAL() { threadData_t *oldThreadData = (threadData_t*)pthread_getspecific(mmc_thread_data_key); pthread_setspecific(mmc_thread_data_key,threadData); pthread_mutex_init(&threadData->parentMutex,NULL); mmc_init_stackoverflow (threadData); MMC_TRY_INTERNAL(mmc_jumper) threadData->mmc_stack_overflow_jumper = threadData->mmc_jumper;251 #define MMC_TRY_TOP() { threadData_t threadDataOnStack = {0}, *oldThreadData = (threadData_t*)pthread_getspecific(mmc_thread_data_key),*threadData = &threadDataOnStack; pthread_setspecific(mmc_thread_data_key,threadData); pthread_mutex_init(&threadData->parentMutex,NULL); mmc_init_stackoverflow_fast(threadData, oldThreadData); MMC_TRY_INTERNAL(mmc_jumper) threadData->mmc_stack_overflow_jumper = threadData->mmc_jumper; /* Let the default stack overflow handler be the top-level handler */ 252 253 #define MMC_TRY_TOP_SET(X) { threadData_t threadDataOnStack = *((threadData_t*)X), *oldThreadData = (threadData_t*)pthread_getspecific(mmc_thread_data_key),*threadData = &threadDataOnStack; pthread_setspecific(mmc_thread_data_key,threadData); pthread_mutex_init(&threadData->parentMutex,NULL); mmc_init_stackoverflow_fast(threadData, oldThreadData); MMC_TRY_INTERNAL(mmc_jumper) threadData->mmc_stack_overflow_jumper = threadData->mmc_jumper; /* Let the default stack overflow handler be the top-level handler */ 254 255 #define MMC_TRY_TOP_INTERNAL() { threadData_t *oldThreadData = (threadData_t*)pthread_getspecific(mmc_thread_data_key); pthread_setspecific(mmc_thread_data_key,threadData); pthread_mutex_init(&threadData->parentMutex,NULL); mmc_init_stackoverflow_fast(threadData, oldThreadData); MMC_TRY_INTERNAL(mmc_jumper) threadData->mmc_stack_overflow_jumper = threadData->mmc_jumper; 256 256 #define MMC_CATCH_TOP(X) pthread_setspecific(mmc_thread_data_key,oldThreadData); } else {pthread_setspecific(mmc_thread_data_key,oldThreadData);X;}}} 257 257 -
SimulationRuntime/c/meta/meta_modelica_segv.h
r80e3d34f r0ef03fc 58 58 #endif 59 59 60 #if defined(linux) 61 static inline void mmc_init_stackoverflow_fast(threadData_t *threadData, threadData_t *oldThreadData) 62 { 63 if (oldThreadData) 64 threadData->stackBottom = oldThreadData->stackBottom; 65 else 66 mmc_init_stackoverflow(threadData); 67 } 68 #else 69 static inline void mmc_init_stackoverflow_fast(threadData_t *threadData, threadData_t *oldThreadData) 70 { 71 mmc_init_stackoverflow(threadData); 72 } 73 #endif 74 60 75 #ifndef __has_builtin 61 76 #define __has_builtin(x) 0 /* Compatibility with non-clang compilers */
Note: See TracChangeset
for help on using the changeset viewer.