Author: sebor
Date: Mon Sep 25 13:36:23 2006
New Revision: 449809
URL: http://svn.apache.org/viewvc?view=rev&rev=449809
Log:
2006-09-25 Martin Sebor <[EMAIL PROTECTED]>
* wthread.h: Allowed to be #included regardless of the platform
and renamed...
* thread.h: ...to this.
* THREAD_SAFE_ERRNO (thread.h): Included instead of wthread.h.
* THREAD_SAFE_EXCEPTIONS.cpp (thread.h): Same.
Added:
incubator/stdcxx/trunk/etc/config/src/thread.h
- copied, changed from r449774,
incubator/stdcxx/trunk/etc/config/src/wthread.h
Removed:
incubator/stdcxx/trunk/etc/config/src/wthread.h
Modified:
incubator/stdcxx/trunk/etc/config/src/THREAD_SAFE_ERRNO.cpp
incubator/stdcxx/trunk/etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp
Modified: incubator/stdcxx/trunk/etc/config/src/THREAD_SAFE_ERRNO.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/src/THREAD_SAFE_ERRNO.cpp?view=diff&rev=449809&r1=449808&r2=449809
==============================================================================
--- incubator/stdcxx/trunk/etc/config/src/THREAD_SAFE_ERRNO.cpp (original)
+++ incubator/stdcxx/trunk/etc/config/src/THREAD_SAFE_ERRNO.cpp Mon Sep 25
13:36:23 2006
@@ -1,16 +1,7 @@
// checking if errno is thread safe
#include <errno.h>
-
-#ifndef _WIN32
-
-#include <pthread.h>
-
-#else
-
-#include "wthread.h"
-
-#endif
+#include "thread.h"
void *errno_addr = 0;
Modified: incubator/stdcxx/trunk/etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp?view=diff&rev=449809&r1=449808&r2=449809
==============================================================================
--- incubator/stdcxx/trunk/etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp (original)
+++ incubator/stdcxx/trunk/etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp Mon Sep 25
13:36:23 2006
@@ -1,24 +1,6 @@
// checking if exceptions are thread safe
-#ifndef _WIN32
-
-#include <pthread.h>
-
-#if defined (__sun) && defined (__SVR4)
-// use the Solaris threads API in case this is Solaris 2.6
-// where the POSIX pthread_setconcurrency() API is missing
-# include <thread.h>
-# define set_concurrency(n) thr_setconcurrency (n)
-#else
-# define set_concurrency(n) pthread_setconcurrency (n)
-#endif // __sun && __SVR4
-
-#else
-
-#include "wthread.h"
-#define set_concurrency(n)
-
-#endif
+#include "thread.h"
extern "C" void* thread_proc (void *arg)
Copied: incubator/stdcxx/trunk/etc/config/src/thread.h (from r449774,
incubator/stdcxx/trunk/etc/config/src/wthread.h)
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/src/thread.h?view=diff&rev=449809&p1=incubator/stdcxx/trunk/etc/config/src/wthread.h&r1=449774&p2=incubator/stdcxx/trunk/etc/config/src/thread.h&r2=449809
==============================================================================
--- incubator/stdcxx/trunk/etc/config/src/wthread.h (original)
+++ incubator/stdcxx/trunk/etc/config/src/thread.h Mon Sep 25 13:36:23 2006
@@ -1,7 +1,11 @@
+#if defined (_WIN32)
+
// definitions of Win32 POSIX compatibility layer functions
#include <windows.h>
+extern "C" {
+
struct pthread_attr_t;
struct pthread_t
@@ -60,3 +64,19 @@
return result;
}
+
+} // extern "C"
+
+# define set_concurrency(ignore) 0
+#else // if !defined (_WIN32)
+# include <pthread.h>
+
+# if defined (__sun) && defined (__SVR4)
+ // use the Solaris threads API in case this is Solaris 2.6
+ // where the POSIX pthread_setconcurrency() API is missing
+# include <thread.h>
+# define set_concurrency(n) thr_setconcurrency (n)
+# else
+# define set_concurrency(n) pthread_setconcurrency (n)
+# endif // __sun && __SVR4
+#endif // _WIN32