From: Geoff Norton Date: Sat, 14 Feb 2015 21:10:15 +0000 (-0800) Subject: Remove solaris support X-Git-Tag: accepted/tizen/base/20180629.140029~7093^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ce843a247a3034700ba010dd184b4bee2d08c0a;p=platform%2Fupstream%2Fcoreclr.git Remove solaris support --- diff --git a/src/pal/src/config.h.in b/src/pal/src/config.h.in index 639c780..57af6b5 100644 --- a/src/pal/src/config.h.in +++ b/src/pal/src/config.h.in @@ -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 @@ -126,11 +125,9 @@ #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 diff --git a/src/pal/src/file/file.cpp b/src/pal/src/file/file.cpp index c6ce2f2..3327a56 100644 --- a/src/pal/src/file/file.cpp +++ b/src/pal/src/file/file.cpp @@ -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 diff --git a/src/pal/src/thread/process.cpp b/src/pal/src/thread/process.cpp index 6a2ee9a..12899c0 100644 --- a/src/pal/src/thread/process.cpp +++ b/src/pal/src/thread/process.cpp @@ -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 && diff --git a/src/pal/src/thread/thread.cpp b/src/pal/src/thread/thread.cpp index 0da49e3..50776e5 100644 --- a/src/pal/src/thread/thread.cpp +++ b/src/pal/src/thread/thread.cpp @@ -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 diff --git a/src/pal/src/thread/threadsusp.cpp b/src/pal/src/thread/threadsusp.cpp index 4b356ef..a7ec019 100644 --- a/src/pal/src/thread/threadsusp.cpp +++ b/src/pal/src/thread/threadsusp.cpp @@ -35,8 +35,6 @@ Revision History: #if HAVE_PTHREAD_NP_H #include #endif -#elif HAVE_SOLARIS_THREADS -#include #elif HAVE_MACH_THREADS #include #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