src/share/vm/runtime/threadLocalStorage.cpp

changeset 8187
3ad3f93fe3d2
parent 4299
f34d701e952e
child 8604
04d83ba48607
equal deleted inserted replaced
8186:59eb74ac51f2 8187:3ad3f93fe3d2
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
36 #endif 36 #endif
37 #ifdef TARGET_OS_FAMILY_bsd 37 #ifdef TARGET_OS_FAMILY_bsd
38 # include "os_bsd.inline.hpp" 38 # include "os_bsd.inline.hpp"
39 #endif 39 #endif
40 40
41 // Solaris no longer has this kind of ThreadLocalStorage implementation.
42 // This will be removed from all platforms in the near future.
43
44 #ifndef SOLARIS
45
41 // static member initialization 46 // static member initialization
42 int ThreadLocalStorage::_thread_index = -1; 47 int ThreadLocalStorage::_thread_index = -1;
43 48
44 Thread* ThreadLocalStorage::get_thread_slow() { 49 Thread* ThreadLocalStorage::get_thread_slow() {
45 return (Thread*) os::thread_local_storage_at(ThreadLocalStorage::thread_index()); 50 return (Thread*) os::thread_local_storage_at(ThreadLocalStorage::thread_index());
63 } 68 }
64 69
65 bool ThreadLocalStorage::is_initialized() { 70 bool ThreadLocalStorage::is_initialized() {
66 return (thread_index() != -1); 71 return (thread_index() != -1);
67 } 72 }
73
74 #endif // SOLARIS

mercurial