mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user