#ifdef ZEND_WIN32
static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) /* {{{ */
{
+#ifdef ZTS
+ THREAD_T thread_id = (THREAD_T)wParam;
+#endif
+
switch (message) {
case WM_DESTROY:
PostQuitMessage(0);
#endif
SetTimer(timeout_window, wParam, lParam*1000, NULL);
#ifdef ZTS
- tsrm_ls = ts_resource_ex(0, &wParam);
+ tsrm_ls = ts_resource_ex(0, &thread_id);
if (!tsrm_ls) {
/* shouldn't normally happen */
break;
#ifdef ZTS
void ***tsrm_ls;
- tsrm_ls = ts_resource_ex(0, &wParam);
+ tsrm_ls = ts_resource_ex(0, &thread_id);
if (!tsrm_ls) {
/* Thread died before receiving its timeout? */
break;