/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "runtime/atomic.hpp"
#ifdef TARGET_OS_ARCH_solaris_x86
# include "atomic_solaris_x86.inline.hpp"
# include "orderAccess_solaris_x86.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_solaris_sparc
# include "atomic_solaris_sparc.inline.hpp"
# include "orderAccess_solaris_sparc.inline.hpp"
#endif
// System includes
#include <dlfcn.h>
#include <unistd.h>
#include <netdb.h>
#include <setjmp.h>
// File names are case-sensitive on windows only
}
return true;
}
int r = thr_main() ;
return r;
}
// On Solaris, reservations are made on a page by page basis, nothing to do.
}
// Bang the shadow pages if they need to be touched to be mapped.
}
}
}
dirent* p;
int status;
return NULL;
} else
return p;
#else // defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
#endif // defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
}
}
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// macros for interruptible io and system calls and system call restarting
do { \
_setup; \
_before; \
/* this is java interruptible io stuff */ \
} else { \
/* _cmd always expands to an assignment to _result */ \
} \
} \
} else { \
/* this is normal blocking io stuff */ \
_cmd; \
} \
_after; \
} while(false)
// Interruptible io support + restarting of interrupted system calls
#ifndef ASSERT
_INTERRUPTIBLE( JavaThread* _thread = (JavaThread*)ThreadLocalStorage::thread(),_result = _cmd, _result, _thread, _clear, , , UseVMInterruptibleIO); \
#else
// This adds an assertion that it is only called from thread_in_native
// The call overhead is skipped for performance in product mode
_INTERRUPTIBLE(JavaThread* _thread = os::Solaris::setup_interruptible_native(), _result = _cmd, _result, _thread, _clear, , os::Solaris::cleanup_interruptible_native(_thread), UseVMInterruptibleIO ); \
#endif
// Used for calls from _thread_in_vm, not from _thread_in_native
_INTERRUPTIBLE(JavaThread* _thread = os::Solaris::setup_interruptible(), _result = _cmd, _result, _thread, _clear, , os::Solaris::cleanup_interruptible(_thread), UseVMInterruptibleIO ); \
/* Use NORESTART when the system call cannot return EINTR, when something other
than a system call is being invoked, or when the caller must do EINTR
handling. */
#ifndef ASSERT
_INTERRUPTIBLE( JavaThread* _thread = (JavaThread*)ThreadLocalStorage::thread(),_result = _cmd, _result, _thread, _clear, , , UseVMInterruptibleIO)
#else
// This adds an assertion that it is only called from thread_in_native
// The call overhead is skipped for performance in product mode
_INTERRUPTIBLE(JavaThread* _thread = os::Solaris::setup_interruptible_native(), _result = _cmd, _result, _thread, _clear, , os::Solaris::cleanup_interruptible_native(_thread), UseVMInterruptibleIO )
#endif
// Don't attend to UseVMInterruptibleIO. Always allow interruption.
// Also assumes that it is called from the _thread_blocked state.
// Used by os_sleep().
_INTERRUPTIBLE(os::Solaris::setup_interruptible_already_blocked(_thread), _result = _cmd, _result, _thread, _clear, , , true )
int _result; \
do { \
return _result; \
} while(false)
int _result; \
do { \
return _result; \
} while(false)
int _result; \
return _result; \
} while(false)
/* Use the RESTARTABLE macros when interruptible io is not needed */
do { \
} while(false)
int _result; \
return _result; \
} while(false)
}
}
}
}
}
return ::gethostbyname(name);
}
}
}
#endif // OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP