Index: src/platform-solaris.cc |
diff --git a/src/platform-solaris.cc b/src/platform-solaris.cc |
index 4b0094fb22fe6cc2e8df3c5b9c9fc112f858adb4..3c4df665f0cfe2748191fc83e8f511e95d61bfd4 100644 |
--- a/src/platform-solaris.cc |
+++ b/src/platform-solaris.cc |
@@ -38,7 +38,6 @@ |
#include <ucontext.h> // walkstack(), getcontext() |
#include <dlfcn.h> // dladdr |
#include <pthread.h> |
-#include <sched.h> // for sched_yield |
#include <semaphore.h> |
#include <time.h> |
#include <sys/time.h> // gettimeofday(), timeradd() |
@@ -539,46 +538,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { |
} |
-void Thread::YieldCPU() { |
- sched_yield(); |
-} |
- |
- |
-class SolarisMutex : public Mutex { |
- public: |
- SolarisMutex() { |
- pthread_mutexattr_t attr; |
- pthread_mutexattr_init(&attr); |
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); |
- pthread_mutex_init(&mutex_, &attr); |
- } |
- |
- ~SolarisMutex() { pthread_mutex_destroy(&mutex_); } |
- |
- int Lock() { return pthread_mutex_lock(&mutex_); } |
- |
- int Unlock() { return pthread_mutex_unlock(&mutex_); } |
- |
- virtual bool TryLock() { |
- int result = pthread_mutex_trylock(&mutex_); |
- // Return false if the lock is busy and locking failed. |
- if (result == EBUSY) { |
- return false; |
- } |
- ASSERT(result == 0); // Verify no other errors. |
- return true; |
- } |
- |
- private: |
- pthread_mutex_t mutex_; |
-}; |
- |
- |
-Mutex* OS::CreateMutex() { |
- return new SolarisMutex(); |
-} |
- |
- |
class SolarisSemaphore : public Semaphore { |
public: |
explicit SolarisSemaphore(int count) { sem_init(&sem_, 0, count); } |