src/hotspot/os/solaris/os_solaris.cpp
changeset 50178 7b0291382aff
parent 50177 9806f23d5e5e
child 50184 1a4101ebec92
--- a/src/hotspot/os/solaris/os_solaris.cpp	Fri May 18 08:47:42 2018 -0400
+++ b/src/hotspot/os/solaris/os_solaris.cpp	Fri May 18 15:21:23 2018 +0200
@@ -291,6 +291,12 @@
                                      (julong)sysconf(_SC_PAGESIZE);
 }
 
+uint os::processor_id() {
+  const processorid_t id = ::getcpuid();
+  assert(id >= 0 && id < _processor_count, "Invalid processor id");
+  return (uint)id;
+}
+
 int os::active_processor_count() {
   // User has overridden the number of active processors
   if (ActiveProcessorCount > 0) {