Ports/OpenJDK: Use new global variables at /sys/kernel/ directory
This commit is contained in:
parent
c8a7a3e43f
commit
6c37f04e88
Notes:
sideshowbarker
2024-07-17 05:06:38 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/6c37f04e88 Pull-request: https://github.com/SerenityOS/serenity/pull/15593 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/kleinesfilmroellchen ✅
1 changed files with 2 additions and 2 deletions
|
@ -111,7 +111,7 @@ index 0000000000000000000000000000000000000000..cc0c08cb85a682d66a00f6b48ad2871f
|
|||
+
|
||||
+extern "C" {
|
||||
+void os_initNative(JNIEnv *env, jclass clazz) {
|
||||
+ proc_all = MUST(Core::File::open("/proc/all", Core::OpenMode::ReadOnly));
|
||||
+ proc_all = MUST(Core::File::open("/sys/kernel/processes", Core::OpenMode::ReadOnly));
|
||||
+}
|
||||
+
|
||||
+jint os_getChildren(JNIEnv *env, jlong jpid, jlongArray jarray,
|
||||
|
@ -141,7 +141,7 @@ index 0000000000000000000000000000000000000000..cc0c08cb85a682d66a00f6b48ad2871f
|
|||
+ *total += thread.time_user + thread.time_kernel;
|
||||
+ }
|
||||
+
|
||||
+ *start = 0; // FIXME: When did thread start? not reported in /proc/all
|
||||
+ *start = 0; // FIXME: When did thread start? not reported in /sys/kernel/processes
|
||||
+
|
||||
+ return proc.ppid;
|
||||
+}
|
||||
|
|
Loading…
Add table
Reference in a new issue