aboutsummaryrefslogtreecommitdiff
path: root/tests/simple_grid/test.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-09-25 21:00:16 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-09-25 21:00:16 +0300
commit6d0e7c5eba49efc171e63ff2631722a5c7f95460 (patch)
tree9159d22c6ee1ee2949dcf8455998405b031cb351 /tests/simple_grid/test.c
parentfecb86f6093c1e8aed6ab05c29c5af9d0cb93157 (diff)
downloadgran-6d0e7c5eba49efc171e63ff2631722a5c7f95460.tar.gz
gran-6d0e7c5eba49efc171e63ff2631722a5c7f95460.zip
technically speaking deadlock free, but starves
Diffstat (limited to 'tests/simple_grid/test.c')
-rw-r--r--tests/simple_grid/test.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/simple_grid/test.c b/tests/simple_grid/test.c
index 782062d..07f1123 100644
--- a/tests/simple_grid/test.c
+++ b/tests/simple_grid/test.c
@@ -1,14 +1,17 @@
#define X 64
#define Y 64
-void _start(unsigned char x, unsigned char y)
+void _start(unsigned short x, unsigned short y)
{
- volatile unsigned long *counter = (unsigned long *)4096;
- volatile char *uart = (char *)8192;
+ volatile unsigned long *counter = (unsigned long *)((1ULL << 48) | (1ULL << 32));
+ volatile char *uart = (char *)4096;
/* very hacky, not recommended but good enough for testing */
- if (x == 0 && y == 0)
+ if (x == 0 && y == 1) {
*counter = 0;
+ *uart = '0';
+ *uart = '\n';
+ }
else
while (*counter != ((x << 8) | y))
;