avm svc: fully study and understand QEMU traces

Preparation for timer. Timer is almost working it seems, just need to
ACK the interrupt most likely: it is firing like mad that's all.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-07-30 00:00:01 +00:00
parent 8f73910dd1
commit 3b93a2d65a
5 changed files with 166 additions and 38 deletions

View File

@@ -14,16 +14,21 @@
#include <unistd.h>
int main(int argc, char **argv) {
unsigned long i, max;
unsigned long i, max, sleep_time;
if (argc > 1) {
max = strtoll(argv[1], NULL, 0);
} else {
max = 1;
}
if (argc > 2) {
sleep_time = strtoll(argv[2], NULL, 0);
} else {
sleep_time = 2;
}
i = 0;
while (i < max) {
printf("%lu\n", i);
i++;
sleep(1);
sleep(sleep_time);
}
}