aboutsummaryrefslogtreecommitdiff
path: root/src/os/solaris/vm/thread_solaris.inline.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/solaris/vm/thread_solaris.inline.hpp')
-rw-r--r--src/os/solaris/vm/thread_solaris.inline.hpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/os/solaris/vm/thread_solaris.inline.hpp b/src/os/solaris/vm/thread_solaris.inline.hpp
index d7d6d378f..48c85aaf7 100644
--- a/src/os/solaris/vm/thread_solaris.inline.hpp
+++ b/src/os/solaris/vm/thread_solaris.inline.hpp
@@ -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->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