diff options
author | krakjoe <joe.watkins@live.co.uk> | 2014-11-25 08:37:02 +0000 |
---|---|---|
committer | krakjoe <joe.watkins@live.co.uk> | 2014-11-25 08:37:02 +0000 |
commit | e07feeaf8b91f16a89e9903b461042a0f6a63ac0 (patch) | |
tree | 4a94cd382fcffefff920f7733562e1860a66cc44 /Zend/zend_execute_API.c | |
parent | 9b6836ebd36eccc9e81ca51e2efe172e1d334f0b (diff) | |
parent | d4f42289ddde002cb4d3ed9d1a4f2219f68df48e (diff) | |
download | php-git-e07feeaf8b91f16a89e9903b461042a0f6a63ac0.tar.gz |
Merge branch 'master' of https://github.com/php/php-src
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 5edc65e93e..5b31f465ca 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -51,8 +51,8 @@ static WNDCLASS wc; static HWND timeout_window; static HANDLE timeout_thread_event; static HANDLE timeout_thread_handle; -static DWORD timeout_thread_id; -static int timeout_thread_initialized=0; +static unsigned timeout_thread_id; +static volatile long timeout_thread_initialized=0; #endif #if 0&&ZEND_DEBUG @@ -1166,6 +1166,10 @@ ZEND_API void zend_timeout(int dummy) /* {{{ */ #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); @@ -1180,7 +1184,7 @@ static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wPa #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; @@ -1197,7 +1201,7 @@ static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wPa #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; |