From: root Date: Thu, 1 Oct 2015 18:10:41 +0000 (+0200) Subject: ex10ab done X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=0a9bb5ee5042bbd4181a2350a417c0478bea83af;p=des2015.git ex10ab done --- diff --git a/mart/ex10/Makefile b/mart/ex10/Makefile index ee6cbef..c931de6 100644 --- a/mart/ex10/Makefile +++ b/mart/ex10/Makefile @@ -3,9 +3,9 @@ LDFLAGS=$(shell xeno-config --xeno-ldflags)\ -lnative -lrtdk -Xlinker -rpath\ -Xlinker $(shell xeno-config --libdir) -BINARIES=ex10a ex10b ex10d +BINARIES=ex10a #ex10b ex10d all: $(BINARIES) clean: - $(RM) -v $(BINARIES) + $(RM) -v $(BINARIES) *.csv diff --git a/mart/ex10/ex10a b/mart/ex10/ex10a new file mode 100755 index 0000000..74c8dfb Binary files /dev/null and b/mart/ex10/ex10a differ diff --git a/mart/ex10/ex10a.c b/mart/ex10/ex10a.c index e69de29..c0781f7 100644 --- a/mart/ex10/ex10a.c +++ b/mart/ex10/ex10a.c @@ -0,0 +1,46 @@ +#include +#include +#include +#include + +#include +#include + +#include + +#define SAMPLES 10000 +RT_TASK task; + +RTIME times[SAMPLES]; + +void taskf(void *arg) +{ + RT_TASK *curtask; + rt_task_set_periodic(NULL, TM_NOW, 1e5); + + unsigned int i; + for(i = 0; i