Force stack re-alignment for entry-points from phread_create with mingw & windows to fix SSE crashes in child threads

This commit is contained in:
Simon Robertshaw 2014-08-15 21:42:33 +01:00
parent 7e9c507e64
commit a629eb9bfc
5 changed files with 12 additions and 4 deletions

View File

@ -173,7 +173,15 @@
#define TPT_INLINE inline
#endif
#if
#define SDEUT
//#define REALHEAT
#if defined(WIN) && defined(__GNUC__)
#define TH_ENTRY_POINT __attribute__((force_align_arg_pointer))
#else
#define TH_ENTRY_POINT
#endif
#endif /* CONFIG_H */

View File

@ -141,7 +141,7 @@ void RequestBroker::RetrieveImage(std::string imageUrl, int width, int height, R
assureRunning();
}
void * RequestBroker::thumbnailQueueProcessHelper(void * ref)
TH_ENTRY_POINT void * RequestBroker::thumbnailQueueProcessHelper(void * ref)
{
((RequestBroker*)ref)->thumbnailQueueProcessTH();
return NULL;

View File

@ -29,7 +29,7 @@ bool SearchModel::GetShowTags()
return showTags;
}
void * SearchModel::updateSaveListTHelper(void * obj)
TH_ENTRY_POINT void * SearchModel::updateSaveListTHelper(void * obj)
{
return ((SearchModel *)obj)->updateSaveListT();
}

View File

@ -127,7 +127,7 @@ void Gravity::gravity_update_async()
}
}
void *Gravity::update_grav_async_helper(void * context)
TH_ENTRY_POINT void *Gravity::update_grav_async_helper(void * context)
{
((Gravity *)context)->update_grav_async();
return NULL;

View File

@ -122,7 +122,7 @@ void Task::after()
}
void * Task::doWork_helper(void * ref)
TH_ENTRY_POINT void * Task::doWork_helper(void * ref)
{
bool newSuccess = ((Task*)ref)->doWork();
pthread_mutex_lock(&((Task*)ref)->taskMutex);