src/solaris/native/sun/management/MacosxOperatingSystem.c

Print this page

        

*** 21,39 **** * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! #include "com_sun_management_UnixOperatingSystem.h" #include <sys/time.h> #include <mach/mach.h> #include <mach/task_info.h> JNIEXPORT jdouble JNICALL ! Java_com_sun_management_UnixOperatingSystem_getSystemCpuLoad (JNIEnv *env, jobject dummy) { // This code is influenced by the darwin top source kern_return_t kr; --- 21,39 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! #include "sun_management_OperatingSystemImpl.h" #include <sys/time.h> #include <mach/mach.h> #include <mach/task_info.h> JNIEXPORT jdouble JNICALL ! Java_sun_management_OperatingSystemImpl_getSystemCpuLoad (JNIEnv *env, jobject dummy) { // This code is influenced by the darwin top source kern_return_t kr;
*** 81,91 **** #define TIME_VALUE_TO_MICROSECONDS(TV) \ ((TV).tv_sec * 1000 * 1000 + (TV).tv_usec) JNIEXPORT jdouble JNICALL ! Java_com_sun_management_UnixOperatingSystem_getProcessCpuLoad (JNIEnv *env, jobject dummy) { // This code is influenced by the darwin top source struct task_basic_info_64 task_info_data; --- 81,91 ---- #define TIME_VALUE_TO_MICROSECONDS(TV) \ ((TV).tv_sec * 1000 * 1000 + (TV).tv_usec) JNIEXPORT jdouble JNICALL ! Java_sun_management_OperatingSystemImpl_getProcessCpuLoad (JNIEnv *env, jobject dummy) { // This code is influenced by the darwin top source struct task_basic_info_64 task_info_data;