Permalink
Browse files

Force stack re-alignment for entry-points from phread_create with min…

…gw & windows to fix SSE crashes in child threads
  • Loading branch information...
simtr committed Aug 15, 2014
1 parent 7e9c507 commit a629eb9bfc569f2375e48067723480d3f5089137
@@ -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 */
@@ -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;
@@ -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();
}
@@ -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;
@@ -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);

0 comments on commit a629eb9

Please sign in to comment.