From 1261012439a27549e4b54f7278b409934c395a02 Mon Sep 17 00:00:00 2001 From: Remzi Arpaci-Dusseau Date: Mon, 10 Sep 2018 10:39:20 -0500 Subject: [PATCH] Small changes to code, added README --- threads-intro/README.md | 10 ++++++++++ threads-intro/t0.c | 7 ++++--- threads-intro/t1.c | 7 ++++--- 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 threads-intro/README.md diff --git a/threads-intro/README.md b/threads-intro/README.md new file mode 100644 index 0000000..4d01b35 --- /dev/null +++ b/threads-intro/README.md @@ -0,0 +1,10 @@ + +A simple set of programs that use threads: +- `t0.c` +- `t1.c` + +Each one depends on header files found in `../include` + +The Makefile is simplistic but will do. + + diff --git a/threads-intro/t0.c b/threads-intro/t0.c index 1d238a8..61c18ce 100644 --- a/threads-intro/t0.c +++ b/threads-intro/t0.c @@ -1,8 +1,9 @@ -#include "common.h" -#include "common_threads.h" -#include #include #include +#include + +#include "common.h" +#include "common_threads.h" void *mythread(void *arg) { printf("%s\n", (char *) arg); diff --git a/threads-intro/t1.c b/threads-intro/t1.c index 7dc2571..a334dfe 100644 --- a/threads-intro/t1.c +++ b/threads-intro/t1.c @@ -1,8 +1,9 @@ -#include "common.h" -#include "common_threads.h" -#include #include #include +#include + +#include "common.h" +#include "common_threads.h" int max; volatile int counter = 0; // shared global variable