From a832616da0fb23dda676331172b40758183303ff Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Fri, 2 Oct 2015 13:43:22 +0200 Subject: [PATCH] now final --- mart/ex10/ex10d1.c | 6 +++--- mart/ex10/ex10d2.c | 2 +- mart/ex10/plots.m | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mart/ex10/ex10d1.c b/mart/ex10/ex10d1.c index 928b0b6..475b6fd 100644 --- a/mart/ex10/ex10d1.c +++ b/mart/ex10/ex10d1.c @@ -38,7 +38,7 @@ void taskf(void *arg) fprintf(file, "%u,%llu\n", i, times[i]); } fclose(file); - rt_printf("Done, you can press CRTL+C now\n"); + rt_printf("Done, you can press CRTL+C now\n"); } int main(int argc, char* argv[]) @@ -54,6 +54,6 @@ int main(int argc, char* argv[]) rt_task_create(&task, "task", 0, 50, 0); rt_task_start(&task, &taskf, 0); - pause(); - outb(inb(0x37A) & 0xEF, 0x37A); + pause(); + outb(inb(0x37A) & 0xEF, 0x37A); } diff --git a/mart/ex10/ex10d2.c b/mart/ex10/ex10d2.c index 0430588..d2e96fa 100644 --- a/mart/ex10/ex10d2.c +++ b/mart/ex10/ex10d2.c @@ -17,7 +17,7 @@ RT_TASK task; void taskf(void *arg) { RT_INTR intr; - rt_intr_create(&intr, "lpt1 handler", LPT1IRQ, I_PROPAGATE); + rt_intr_create(&intr, "lpt1 handler", LPT1IRQ, 0); while(1){ rt_intr_wait(&intr, TM_INFINITE); diff --git a/mart/ex10/plots.m b/mart/ex10/plots.m index 9f288c8..0fe0e71 100644 --- a/mart/ex10/plots.m +++ b/mart/ex10/plots.m @@ -18,8 +18,8 @@ plot(d, '.k'); title("Measurements on interrupt latency via LPT1"); xlabel("Measurement"); ylabel("Time (µs)"); -text(500, 23.5, sprintf("Min: %.3f µs", max(d))); -text(500, 23.3, sprintf("Mean: %.3f µs", mean(d))); -text(500, 23.1, sprintf("Std: %.3f µs", std(d))); -text(500, 22.9, sprintf("Max: %.3f µs", max(d))); +text(2000, 22.9, sprintf("Min: %.3f µs", max(d))); +text(2000, 22.7, sprintf("Mean: %.3f µs", mean(d))); +text(2000, 22.5, sprintf("Std: %.3f µs", std(d))); +text(2000, 21.3, sprintf("Max: %.3f µs", max(d))); print("-dsvg", "ex10d.svg"); -- 2.20.1