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[])
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);
}
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);
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");