hotspot/src/os/linux/vm/os_linux.cpp
changeset 25503 9f471b837330
parent 25477 7dad9f95fd31
child 25946 1572c9f03fb9
equal deleted inserted replaced
25502:92dc8bd62c69 25503:9f471b837330
  1551 void os::die() {
  1551 void os::die() {
  1552   // _exit() on LinuxThreads only kills current thread
  1552   // _exit() on LinuxThreads only kills current thread
  1553   ::abort();
  1553   ::abort();
  1554 }
  1554 }
  1555 
  1555 
  1556 // unused on linux for now.
       
  1557 void os::set_error_file(const char *logfile) {}
       
  1558 
       
  1559 
  1556 
  1560 // This method is a copy of JDK's sysGetLastErrorString
  1557 // This method is a copy of JDK's sysGetLastErrorString
  1561 // from src/solaris/hpi/src/system_md.c
  1558 // from src/solaris/hpi/src/system_md.c
  1562 
  1559 
  1563 size_t os::lasterror(char *buf, size_t len) {
  1560 size_t os::lasterror(char *buf, size_t len) {
  2343           return;
  2340           return;
  2344 
  2341 
  2345         // determine if this is a legacy image or modules image
  2342         // determine if this is a legacy image or modules image
  2346         // modules image doesn't have "jre" subdirectory
  2343         // modules image doesn't have "jre" subdirectory
  2347         len = strlen(buf);
  2344         len = strlen(buf);
       
  2345         assert(len < buflen, "Ran out of buffer room");
  2348         jrelib_p = buf + len;
  2346         jrelib_p = buf + len;
  2349         snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch);
  2347         snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch);
  2350         if (0 != access(buf, F_OK)) {
  2348         if (0 != access(buf, F_OK)) {
  2351           snprintf(jrelib_p, buflen-len, "/lib/%s", cpu_arch);
  2349           snprintf(jrelib_p, buflen-len, "/lib/%s", cpu_arch);
  2352         }
  2350         }
  2363         }
  2361         }
  2364       }
  2362       }
  2365     }
  2363     }
  2366   }
  2364   }
  2367 
  2365 
  2368   strcpy(saved_jvm_path, buf);
  2366   strncpy(saved_jvm_path, buf, MAXPATHLEN);
  2369 }
  2367 }
  2370 
  2368 
  2371 void os::print_jni_name_prefix_on(outputStream* st, int args_size) {
  2369 void os::print_jni_name_prefix_on(outputStream* st, int args_size) {
  2372   // no prefix required, not even "_"
  2370   // no prefix required, not even "_"
  2373 }
  2371 }