src/thread/windows/SDL_systhread.c
changeset 7854 6d79888998f5
parent 7828 1451063c8ecd
child 7978 70ac84e49797
equal deleted inserted replaced
7853:4861edda71d1 7854:6d79888998f5
   143         return SDL_SetError("Not enough resources to create thread");
   143         return SDL_SetError("Not enough resources to create thread");
   144     }
   144     }
   145     return 0;
   145     return 0;
   146 }
   146 }
   147 
   147 
       
   148 #if 0  /* !!! FIXME: revisit this later. See https://bugzilla.libsdl.org/show_bug.cgi?id=2089 */
   148 #ifdef _MSC_VER
   149 #ifdef _MSC_VER
   149 #pragma warning(disable : 4733)
   150 #pragma warning(disable : 4733)
   150 #pragma pack(push,8)
   151 #pragma pack(push,8)
   151 typedef struct tagTHREADNAME_INFO
   152 typedef struct tagTHREADNAME_INFO
   152 {
   153 {
   161 ignore_exception(void *a, void *b, void *c, void *d)
   162 ignore_exception(void *a, void *b, void *c, void *d)
   162 {
   163 {
   163     return ExceptionContinueExecution;
   164     return ExceptionContinueExecution;
   164 }
   165 }
   165 #endif
   166 #endif
       
   167 #endif
   166 
   168 
   167 void
   169 void
   168 SDL_SYS_SetupThread(const char *name)
   170 SDL_SYS_SetupThread(const char *name)
   169 {
   171 {
   170     if (name != NULL) {
   172     if (name != NULL) {
       
   173         #if 0 /* !!! FIXME: revisit this later. See https://bugzilla.libsdl.org/show_bug.cgi?id=2089 */
   171         #if (defined(_MSC_VER) && defined(_M_IX86))
   174         #if (defined(_MSC_VER) && defined(_M_IX86))
   172         /* This magic tells the debugger to name a thread if it's listening.
   175         /* This magic tells the debugger to name a thread if it's listening.
   173             The inline asm sets up SEH (__try/__except) without C runtime
   176             The inline asm sets up SEH (__try/__except) without C runtime
   174             support. See Microsoft Systems Journal, January 1997:
   177             support. See Microsoft Systems Journal, January 1997:
   175             http://www.microsoft.com/msj/0197/exception/exception.aspx */
   178             http://www.microsoft.com/msj/0197/exception/exception.aspx */
   194             mov eax,[esp]
   197             mov eax,[esp]
   195             mov fs:[0], eax
   198             mov fs:[0], eax
   196             add esp, 8
   199             add esp, 8
   197         }
   200         }
   198         #endif
   201         #endif
       
   202         #endif
   199     }
   203     }
   200 }
   204 }
   201 
   205 
   202 SDL_threadID
   206 SDL_threadID
   203 SDL_ThreadID(void)
   207 SDL_ThreadID(void)