diff options
Diffstat (limited to 'riscv/riscv-probe/examples/hang')
| -rw-r--r-- | riscv/riscv-probe/examples/hang/hang.c | 23 | ||||
| -rw-r--r-- | riscv/riscv-probe/examples/hang/rules.mk | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/riscv/riscv-probe/examples/hang/hang.c b/riscv/riscv-probe/examples/hang/hang.c new file mode 100644 index 0000000..066ca9e --- /dev/null +++ b/riscv/riscv-probe/examples/hang/hang.c @@ -0,0 +1,23 @@ +#include <stdio.h> + +int main(int argc, char **argv) +{ + volatile int a; + int b, c, d, e, f, g, h, i, j, k, l, m; + printf("hang\n"); + for (;;) { + a = b; + b = c; + c = d; + d = e; + e = f; + f = g; + g = h; + h = i; + i = j; + j = k; + k = l; + l = m; + m = a; + } +} diff --git a/riscv/riscv-probe/examples/hang/rules.mk b/riscv/riscv-probe/examples/hang/rules.mk new file mode 100644 index 0000000..8a04005 --- /dev/null +++ b/riscv/riscv-probe/examples/hang/rules.mk @@ -0,0 +1 @@ +hang_objs = hang.o |
