summaryrefslogtreecommitdiff
path: root/TSRM/TSRM.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-09-02 15:03:19 +0000
committerAndi Gutmans <andi@php.net>2000-09-02 15:03:19 +0000
commit92cfa27ff0db9c85dda59507434660c52db4c970 (patch)
treed928b02dfba8aa19fce117d12e540c18578bf5da /TSRM/TSRM.c
parentf2b0015c9b9dba1eaf014fd6f7a31a057c9df7db (diff)
downloadphp-git-92cfa27ff0db9c85dda59507434660c52db4c970.tar.gz
- Use TSRM_WIN32
Diffstat (limited to 'TSRM/TSRM.c')
-rw-r--r--TSRM/TSRM.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index 04f746883f..b8b03cf7ae 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -310,7 +310,7 @@ void ts_free_id(ts_rsrc_id id)
/* Obtain the current thread id */
TSRM_API THREAD_T tsrm_thread_id(void)
{
-#ifdef WIN32
+#ifdef TSRM_WIN32
return GetCurrentThreadId();
#elif defined(GNUPTH)
return pth_self();
@@ -329,7 +329,7 @@ TSRM_API MUTEX_T tsrm_mutex_alloc( void )
{
MUTEX_T mutexp;
-#ifdef WIN32
+#ifdef TSRM_WIN32
mutexp = malloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(mutexp);
#elif defined(GNUPTH)
@@ -354,7 +354,7 @@ TSRM_API MUTEX_T tsrm_mutex_alloc( void )
TSRM_API void tsrm_mutex_free( MUTEX_T mutexp )
{
if (mutexp) {
-#ifdef WIN32
+#ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
#elif defined(GNUPTH)
free(mutexp);
@@ -379,7 +379,7 @@ TSRM_API int tsrm_mutex_lock( MUTEX_T mutexp )
#if 0
tsrm_debug("Mutex locked thread: %ld\n",tsrm_thread_id());
#endif
-#ifdef WIN32
+#ifdef TSRM_WIN32
EnterCriticalSection(mutexp);
return 1;
#elif defined(GNUPTH)
@@ -400,7 +400,7 @@ TSRM_API int tsrm_mutex_unlock( MUTEX_T mutexp )
#if 0
tsrm_debug("Mutex unlocked thread: %ld\n",tsrm_thread_id());
#endif
-#ifdef WIN32
+#ifdef TSRM_WIN32
LeaveCriticalSection(mutexp);
return 1;
#elif defined(GNUPTH)