Remove solaris support
authorGeoff Norton <grompf@gmail.com>
Sat, 14 Feb 2015 21:10:15 +0000 (13:10 -0800)
committerGeoff Norton <grompf@gmail.com>
Sat, 14 Feb 2015 21:50:00 +0000 (13:50 -0800)
src/pal/src/config.h.in
src/pal/src/file/file.cpp
src/pal/src/thread/process.cpp
src/pal/src/thread/thread.cpp
src/pal/src/thread/threadsusp.cpp

index 639c780..57af6b5 100644 (file)
@@ -43,7 +43,6 @@
 #cmakedefine01 HAVE_MACH_EXCEPTIONS
 #cmakedefine01 HAVE_VM_ALLOCATE
 #cmakedefine01 HAVE_VM_READ
-#cmakedefine01 HAVE_DIRECTIO
 #cmakedefine01 HAS_SYSV_SEMAPHORES
 #cmakedefine01 HAS_PTHREAD_MUTEXES
 #cmakedefine01 HAVE_TTRACE
 
 #define CHECK_TRACE_SPECIFIERS 0
 #define PROCFS_MEM_NAME ""
-#define DIRECTIO_DISABLED 0
 #define HAVE_GETHRTIME 0
 #define HAVE_LOWERCASE_ISO_NAME 0
 #define HAVE_READ_REAL_TIME 0
-#define HAVE_SOLARIS_THREADS 0
 #define HAVE_UNDERSCORE_ISO_NAME 0
 #define MALLOC_ZERO_RETURNS_NULL 0
 #define MKSTEMP64_IS_USED_INSTEAD_OF_MKSTEMP 0
index c6ce2f2..3327a56 100644 (file)
@@ -743,29 +743,6 @@ CorUnix::InternalCreateFile(
             palError = ERROR_INTERNAL_ERROR;
             goto done;
         }
-#elif HAVE_DIRECTIO
-#if !DIRECTIO_DISABLED
-        /* Use of directio is currently disabled on Solaris because
-           this feature doesn't seem to be stable enough on this platform:
-           - directio works on ufs and nfs file systems, but it fails on tmpfs;
-           - on nfs it is not possible to mmap a file if direct I/O is enabled on it;
-           - directio is a per-file persistent suggestion and there is no a real way 
-             to probe it, other than turning it on or off;
-           - the performance impact of blindly turning off directio for each mmap 
-             is roughly 15%;
-           - directio is documented on recent official docs (April 2003) to cause data 
-             corruption, system hangs, or panics when used concurrently with mmap 
-             on clusters.
-           As result on Solaris we currently ignore FILE_FLAG_NO_BUFFERING
-        */
-        if (directio(filed, DIRECTIO_ON) == -1)
-        {
-            ASSERT("Can't set DIRECTIO_ON; directio() failed. errno is %d (%s)\n",
-               errno, strerror(errno));
-            palError = ERROR_INTERNAL_ERROR;
-            goto done;
-        }
-#endif // !DIRECTIO_DISABLED
 #else
 #error Insufficient support for uncached I/O on this platform
 #endif
index 6a2ee9a..12899c0 100644 (file)
@@ -857,12 +857,7 @@ CorUnix::InternalCreateProcess(
         
 
     /* fork the new process */
-#if HAVE_SOLARIS_THREADS
-    /* On Solaris, we use fork1 so that only the calling thread (LWP) is duplicated */
-    processId = fork1();
-#else
     processId = fork();
-#endif
 
     if (processId == -1)
     {
@@ -1558,14 +1553,14 @@ PAL_GetCPUBusyTime(
     if (nCurrentTime > nLastRecordedCurrentTime)
     {
         nCpuTotalTime = (nCurrentTime - nLastRecordedCurrentTime);
-#if HAVE_SOLARIS_THREADS || HAVE_THREAD_SELF || HAVE__LWP_SELF || HAVE_VM_READ
+#if HAVE_THREAD_SELF || HAVE__LWP_SELF || HAVE_VM_READ
         // For systems that run multiple threads of a process on multiple processors,
         // the accumulated userTime and kernelTime of this process may exceed
         // the elapsed time. In this case, the cpuTotalTime needs to be adjusted
         // according to number of processors so that the cpu utilization
         // will not be greater than 100.
         nCpuTotalTime *= dwNumberOfProcessors;
-#endif // HAVE_SOLARIS_THREADS || HAVE_THREAD_SELF || HAVE__LWP_SELF || HAVE_VM_READ
+#endif // HAVE_THREAD_SELF || HAVE__LWP_SELF || HAVE_VM_READ
     }
 
     if (nUserTime >= nLastRecordedUserTime &&
index 0da49e3..50776e5 100644 (file)
@@ -650,11 +650,11 @@ CorUnix::InternalCreateThread(
         TRACE("using the system default thread stack size of %d\n", pthreadStackSize);
     }
 
-#if HAVE_SOLARIS_THREADS || HAVE_THREAD_SELF || HAVE__LWP_SELF
+#if HAVE_THREAD_SELF || HAVE__LWP_SELF
     /* Create new threads as "bound", so each pthread is permanently bound
        to an LWP.  Get/SetThreadContext() depend on this 1:1 mapping. */
     pthread_attr_setscope(&pthreadAttr, PTHREAD_SCOPE_SYSTEM);
-#endif // HAVE_SOLARIS_THREADS || HAVE_THREAD_SELF || HAVE__LWP_SELF
+#endif // HAVE_THREAD_SELF || HAVE__LWP_SELF
 
     //
     // We never call pthread_join, so create the new thread as detached
index 4b356ef..a7ec019 100644 (file)
@@ -35,8 +35,6 @@ Revision History:
 #if HAVE_PTHREAD_NP_H
 #include <pthread_np.h>
 #endif
-#elif HAVE_SOLARIS_THREADS
-#include <thread.h>
 #elif HAVE_MACH_THREADS
 #include <mach/thread_act.h>
 #include "sys/types.h"
@@ -1766,8 +1764,6 @@ CThreadSuspensionInfo::THREADHandleSuspendNative(CPalThread *pthrTarget)
     
 #if HAVE_PTHREAD_SUSPEND
     dwPthreadRet = pthread_suspend((pthread_t)pthrTarget->GetThreadId());
-#elif HAVE_SOLARIS_THREADS
-    dwPthreadRet = thr_suspend((thread_t)pthrTarget->GetThreadId());
 #elif HAVE_MACH_THREADS
     dwPthreadRet = thread_suspend(pthread_mach_thread_np((pthread_t)pthrTarget->GetThreadId()));
 #elif HAVE_PTHREAD_SUSPEND_NP
@@ -1844,8 +1840,6 @@ CThreadSuspensionInfo::THREADHandleResumeNative(CPalThread *pthrTarget)
     {
 #if HAVE_PTHREAD_CONTINUE
         dwPthreadRet = pthread_continue((pthread_t)pthrTarget->GetThreadId());
-#elif HAVE_SOLARIS_THREADS
-        dwPthreadRet = thr_continue((thread_t)pthrTarget->GetThreadId());
 #elif HAVE_MACH_THREADS
         dwPthreadRet = thread_resume(pthread_mach_thread_np((pthread_t)pthrTarget->GetThreadId()));
 #elif HAVE_PTHREAD_CONTINUE_NP