SWDEV-301289 - Treewide macro rename

ATI_OS_WIN -> _WIN32
ATI_OS_LINUX -> __linux__

We should not rely on non-standard macros for platform detections.

Change-Id: If1d06e2e1187268df62a59609ea5496ab7eb709d


[ROCm/clr commit: c4aa6febe5]
这个提交包含在:
Vladislav Sytchenko
2021-08-30 14:04:35 -04:00
提交者 Jason Tang
父节点 79be42d8b7
当前提交 60cf342ae0
共修改 27 个文件,包含 92 行新增和 93 行删除
+10 -10
查看文件
@@ -20,22 +20,22 @@
#include "Timer.h"
#ifdef ATI_OS_WIN
#ifdef _WIN32
#include <windows.h>
#endif
#ifdef ATI_OS_LINUX
#ifdef __linux__
#include <sys/time.h>
#endif
CPerfCounter::CPerfCounter() : _clocks(0), _start(0) {
#ifdef ATI_OS_WIN
#ifdef _WIN32
QueryPerformanceFrequency((LARGE_INTEGER *)&_freq);
#endif
#ifdef ATI_OS_LINUX
#ifdef __linux__
_freq = 1000;
#endif
}
@@ -45,7 +45,7 @@ CPerfCounter::~CPerfCounter() {
}
void CPerfCounter::Start(void) {
#ifdef ATI_OS_WIN
#ifdef _WIN32
if (_start) {
MessageBox(NULL, "Bad Perf Counter Start", "Error", MB_OK);
@@ -54,7 +54,7 @@ void CPerfCounter::Start(void) {
QueryPerformanceCounter((LARGE_INTEGER *)&_start);
#endif
#ifdef ATI_OS_LINUX
#ifdef __linux__
struct timeval s;
gettimeofday(&s, 0);
@@ -66,7 +66,7 @@ void CPerfCounter::Start(void) {
void CPerfCounter::Stop(void) {
i64 n;
#ifdef ATI_OS_WIN
#ifdef _WIN32
if (!_start) {
MessageBox(NULL, "Bad Perf Counter Stop", "Error", MB_OK);
@@ -76,7 +76,7 @@ void CPerfCounter::Stop(void) {
QueryPerformanceCounter((LARGE_INTEGER *)&n);
#endif
#ifdef ATI_OS_LINUX
#ifdef __linux__
struct timeval s;
gettimeofday(&s, 0);
@@ -90,7 +90,7 @@ void CPerfCounter::Stop(void) {
}
void CPerfCounter::Reset(void) {
#ifdef ATI_OS_WIN
#ifdef _WIN32
if (_start) {
MessageBox(NULL, "Bad Perf Counter Reset", "Error", MB_OK);
exit(0);
@@ -100,7 +100,7 @@ void CPerfCounter::Reset(void) {
}
double CPerfCounter::GetElapsedTime(void) {
#ifdef ATI_OS_WIN
#ifdef _WIN32
if (_start) {
MessageBox(NULL, "Trying to get time while still running.", "Error", MB_OK);
exit(0);