8134538: Duplicate implementations of os::lasterror

Method os::lasterror was moved to os_posix.cpp

Reviewed-by: hseigel, kbarrett, coleenp
This commit is contained in:
Patricio Chilano Mateo 2018-07-03 15:08:01 -04:00 committed by Coleen Phillimore
parent c0ebf80159
commit 209071d135
5 changed files with 13 additions and 66 deletions

View file

@ -1419,23 +1419,6 @@ void os::die() {
::abort();
}
// This method is a copy of JDK's sysGetLastErrorString
// from src/solaris/hpi/src/system_md.c
size_t os::lasterror(char *buf, size_t len) {
if (errno == 0) return 0;
const char *s = os::strerror(errno);
size_t n = ::strlen(s);
if (n >= len) {
n = len - 1;
}
::strncpy(buf, s, n);
buf[n] = '\0';
return n;
}
// thread_id is kernel thread id (similar to Solaris LWP id)
intx os::current_thread_id() { return os::Linux::gettid(); }
int os::current_process_id() {