diff src/os/solaris/vm/thread_solaris.inline.hpp @ 23660:b5f3a471e646

Merge.
author Doug Simon <doug.simon@oracle.com>
date Wed, 01 Jun 2016 00:11:44 +0200
parents ca3c6538bcec 3ad3f93fe3d2
children
line wrap: on
line diff
--- a/src/os/solaris/vm/thread_solaris.inline.hpp	Tue May 31 08:05:44 2016 +0200
+++ b/src/os/solaris/vm/thread_solaris.inline.hpp	Wed Jun 01 00:11:44 2016 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,19 +40,12 @@
 // For SPARC, to avoid excessive register window spill-fill faults,
 // we aggressively inline these routines.
 
-inline Thread* ThreadLocalStorage::thread()  {
-  // don't use specialized code if +UseMallocOnly -- may confuse Purify et al.
-  debug_only(if (UseMallocOnly) return get_thread_slow(););
+inline void ThreadLocalStorage::set_thread(Thread* thread) {
+  _thr_current = thread;
+}
 
-  uintptr_t raw = pd_raw_thread_id();
-  int ix = pd_cache_index(raw);
-  Thread* candidate = ThreadLocalStorage::_get_thread_cache[ix];
-  if (candidate != NULL && candidate->self_raw_id() == raw) {
-    // hit
-    return candidate;
-  } else {
-    return ThreadLocalStorage::get_thread_via_cache_slowly(raw, ix);
-  }
+inline Thread* ThreadLocalStorage::thread()  {
+  return _thr_current;
 }
 
 #endif // OS_SOLARIS_VM_THREAD_SOLARIS_INLINE_HPP