aboutsummaryrefslogtreecommitdiffstats
path: root/P2/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--P2/lib/utils.c4
-rw-r--r--P2/lib/utils.obin0 -> 18376 bytes
2 files changed, 4 insertions, 0 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c
index 8549d8e..eda26e9 100644
--- a/P2/lib/utils.c
+++ b/P2/lib/utils.c
@@ -119,6 +119,10 @@ void shuffle(int nMappers, int nReducers) {
printf("%ld\n", message.msgType);
msgsnd(id, &message, MSGSIZE, 0);
}
+ for (int i = 1; i <= nReducers; i++) {
+ struct msgBuffer END = {i, "END"};
+ msgsnd(id, &END, MSGSIZE, 0);
+ }
closedir(dir);
}
}
diff --git a/P2/lib/utils.o b/P2/lib/utils.o
new file mode 100644
index 0000000..349a294
--- /dev/null
+++ b/P2/lib/utils.o
Binary files differ