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()); |