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