xref: /kvm-unit-tests/lib/getchar.c (revision 1aee42979ce3c5da79be9ea68ecef9b2e2ed6edf)
1 #include "libcflat.h"
2 #include "asm/barrier.h"
3 
getchar(void)4 int getchar(void)
5 {
6 	int c;
7 
8 	while ((c = __getchar()) == -1)
9 		cpu_relax();
10 	return c;
11 }
12