mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8049367: Modular Run-Time Images
Co-authored-by: Alan Bateman <alan.bateman@oracle.com> Co-authored-by: Alex Buckley <alex.buckley@oracle.com> Co-authored-by: Bradford Wetmore <bradford.wetmore@oracle.com> Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com> Co-authored-by: James Laskey <james.laskey@oracle.com> Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com> Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com> Co-authored-by: Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com> Co-authored-by: Mandy Chung <mandy.chung@oracle.com> Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com> Co-authored-by: Paul Sandoz <paul.sandoz@oracle.com> Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com> Reviewed-by: chegar, dfuchs, ihse, joehw, mullan, psandoz, wetmore
This commit is contained in:
parent
785151164a
commit
393a39afe3
19 changed files with 944 additions and 146 deletions
|
@ -353,7 +353,6 @@ void os::init_system_properties_values() {
|
|||
// Base path of extensions installed on the system.
|
||||
#define SYS_EXT_DIR "/usr/java/packages"
|
||||
#define EXTENSIONS_DIR "/lib/ext"
|
||||
#define ENDORSED_DIR "/lib/endorsed"
|
||||
|
||||
#ifndef __APPLE__
|
||||
|
||||
|
@ -361,9 +360,8 @@ void os::init_system_properties_values() {
|
|||
// Note that the space for the colon and the trailing null are provided
|
||||
// by the nulls included by the sizeof operator.
|
||||
const size_t bufsize =
|
||||
MAX3((size_t)MAXPATHLEN, // For dll_dir & friends.
|
||||
(size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + sizeof(SYS_EXT_DIR) + sizeof(EXTENSIONS_DIR), // extensions dir
|
||||
(size_t)MAXPATHLEN + sizeof(ENDORSED_DIR)); // endorsed dir
|
||||
MAX2((size_t)MAXPATHLEN, // For dll_dir & friends.
|
||||
(size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + sizeof(SYS_EXT_DIR) + sizeof(EXTENSIONS_DIR)); // extensions dir
|
||||
char *buf = (char *)NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
|
||||
|
||||
// sysclasspath, java_home, dll_dir
|
||||
|
@ -425,10 +423,6 @@ void os::init_system_properties_values() {
|
|||
sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home());
|
||||
Arguments::set_ext_dirs(buf);
|
||||
|
||||
// Endorsed standards default directory.
|
||||
sprintf(buf, "%s" ENDORSED_DIR, Arguments::get_java_home());
|
||||
Arguments::set_endorsed_dirs(buf);
|
||||
|
||||
FREE_C_HEAP_ARRAY(char, buf, mtInternal);
|
||||
|
||||
#else // __APPLE__
|
||||
|
@ -445,9 +439,8 @@ void os::init_system_properties_values() {
|
|||
// Note that the space for the colon and the trailing null are provided
|
||||
// by the nulls included by the sizeof operator.
|
||||
const size_t bufsize =
|
||||
MAX3((size_t)MAXPATHLEN, // for dll_dir & friends.
|
||||
(size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + system_ext_size, // extensions dir
|
||||
(size_t)MAXPATHLEN + sizeof(ENDORSED_DIR)); // endorsed dir
|
||||
MAX2((size_t)MAXPATHLEN, // for dll_dir & friends.
|
||||
(size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + system_ext_size); // extensions dir
|
||||
char *buf = (char *)NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
|
||||
|
||||
// sysclasspath, java_home, dll_dir
|
||||
|
@ -525,10 +518,6 @@ void os::init_system_properties_values() {
|
|||
user_home_dir, Arguments::get_java_home());
|
||||
Arguments::set_ext_dirs(buf);
|
||||
|
||||
// Endorsed standards default directory.
|
||||
sprintf(buf, "%s" ENDORSED_DIR, Arguments::get_java_home());
|
||||
Arguments::set_endorsed_dirs(buf);
|
||||
|
||||
FREE_C_HEAP_ARRAY(char, buf, mtInternal);
|
||||
|
||||
#undef SYS_EXTENSIONS_DIR
|
||||
|
@ -538,7 +527,6 @@ void os::init_system_properties_values() {
|
|||
|
||||
#undef SYS_EXT_DIR
|
||||
#undef EXTENSIONS_DIR
|
||||
#undef ENDORSED_DIR
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -2576,6 +2564,10 @@ size_t os::read(int fd, void *buf, unsigned int nBytes) {
|
|||
RESTARTABLE_RETURN_INT(::read(fd, buf, nBytes));
|
||||
}
|
||||
|
||||
size_t os::read_at(int fd, void *buf, unsigned int nBytes, jlong offset) {
|
||||
RESTARTABLE_RETURN_INT(::pread(fd, buf, nBytes, offset));
|
||||
}
|
||||
|
||||
void os::naked_short_sleep(jlong ms) {
|
||||
struct timespec req;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue