diff --git a/include_core/omrporterror.h b/include_core/omrporterror.h index feeeee5ba06..c5e8fb0ad34 100644 --- a/include_core/omrporterror.h +++ b/include_core/omrporterror.h @@ -67,6 +67,7 @@ #define OMRPORT_ERROR_INVALID_HANDLE (OMRPORT_ERROR_BASE-17) #define OMRPORT_ERROR_NOT_SUPPORTED_ON_THIS_PLATFORM (OMRPORT_ERROR_BASE-18) #define OMRPORT_ERROR_INVALID_ARGUMENTS (OMRPORT_ERROR_BASE-19) +#define OMRPORT_ERROR_INSUFFICIENT_DATA (OMRPORT_ERROR_BASE-20) /** @} */ /** diff --git a/port/common/omrsysinfo.c b/port/common/omrsysinfo.c index 02e1beda9c1..82c47d5a19c 100644 --- a/port/common/omrsysinfo.c +++ b/port/common/omrsysinfo.c @@ -652,7 +652,7 @@ omrsysinfo_get_CPU_utilization(struct OMRPortLibrary *portLibrary, struct J9Sysi * * @return * - 0 on success - * - \arg OMRPORT_ERROR_OPFAILED on the first two invocations of this API + * - \arg OMRPORT_ERROR_INSUFFICIENT_DATA on the first two invocations of this API * - \arg OMRPORT_ERROR_OPFAILED if less than 10ns have passed since the second call to this API * - negative portable error code on other failures */ diff --git a/port/unix/omrsysinfo.c b/port/unix/omrsysinfo.c index 2fa15bd651f..5b0832320a4 100644 --- a/port/unix/omrsysinfo.c +++ b/port/unix/omrsysinfo.c @@ -4642,7 +4642,7 @@ omrsysinfo_get_CPU_load(struct OMRPortLibrary *portLibrary, double *cpuLoad) if (oldestCPUTime->timestamp == 0) { *oldestCPUTime = currentCPUTime; *latestCPUTime = currentCPUTime; - return OMRPORT_ERROR_OPFAILED; + return OMRPORT_ERROR_INSUFFICIENT_DATA; } /* Calculate using the most recent value in the history */ @@ -4674,7 +4674,7 @@ omrsysinfo_get_CPU_load(struct OMRPortLibrary *portLibrary, double *cpuLoad) if (oldestCPUTime->timestamp == 0) { *oldestCPUTime = currentCPUTime; *latestCPUTime = currentCPUTime; - return OMRPORT_ERROR_OPFAILED; + return OMRPORT_ERROR_INSUFFICIENT_DATA; } /* Calculate using the most recent value in the history */ diff --git a/port/win32/omrsysinfo.c b/port/win32/omrsysinfo.c index fd81f8730f9..baf108f15ed 100644 --- a/port/win32/omrsysinfo.c +++ b/port/win32/omrsysinfo.c @@ -1271,7 +1271,7 @@ omrsysinfo_get_CPU_load(struct OMRPortLibrary *portLibrary, double *cpuLoad) if (oldestCPUTime->timestamp == 0) { *oldestCPUTime = currentCPUTime; *latestCPUTime = currentCPUTime; - return OMRPORT_ERROR_OPFAILED; + return OMRPORT_ERROR_INSUFFICIENT_DATA; } /* Calculate using the most recent value in the history */