mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-16 01:40:31 +00:00
Merge
This commit is contained in:
commit
bbe7bbd73a
@ -653,8 +653,7 @@ static void *java_start(Thread *thread) {
|
||||
OSThread* osthread = thread->osthread();
|
||||
Monitor* sync = osthread->startThread_lock();
|
||||
|
||||
// thread_id is kernel thread id (similar to Solaris LWP id)
|
||||
osthread->set_thread_id(os::Linux::gettid());
|
||||
osthread->set_thread_id(os::current_thread_id());
|
||||
|
||||
if (UseNUMA) {
|
||||
int lgrp_id = os::numa_get_group_id();
|
||||
@ -1424,7 +1423,8 @@ size_t os::lasterror(char *buf, size_t len) {
|
||||
return n;
|
||||
}
|
||||
|
||||
intx os::current_thread_id() { return (intx)pthread_self(); }
|
||||
// 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() {
|
||||
return ::getpid();
|
||||
}
|
||||
|
||||
@ -314,9 +314,8 @@ public final class Utils {
|
||||
*/
|
||||
public static String fileAsString(String filename) throws IOException {
|
||||
Path filePath = Paths.get(filename);
|
||||
return Files.exists(filePath)
|
||||
? Files.lines(filePath).collect(Collectors.joining(NEW_LINE))
|
||||
: null;
|
||||
if (!Files.exists(filePath)) return null;
|
||||
return new String(Files.readAllBytes(filePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user