kfdtest: Add a function to wait indefinitely until user input

This will facilitate the need of halting the execution during debugging.

Change-Id: I058c81bbc9f655bbc477b2b542d6b43aa423324c
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: da9a404ac3]
Esse commit está contido em:
Yong Zhao
2019-09-22 17:48:10 -04:00
commit de Yong Zhao
commit 4c3a63755c
2 arquivos alterados com 9 adições e 0 exclusões
@@ -30,6 +30,14 @@
#include "Dispatch.hpp"
#include "SDMAPacket.hpp"
void WaitUntilInput() {
char dummy;
printf("Press enter to continue: ");
do {
scanf("%c", &dummy);
} while (dummy != 10); // enter key's ascii value is 10
}
uint64_t RoundToPowerOf2(uint64_t val) {
int bytes = sizeof(uint64_t);