From 85060d16f804b5514cedf647c568126e201f5a24 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Mon, 2 Nov 2020 08:11:32 -0600 Subject: Add a thing or twelve --- P2/lib/utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'P2/lib') diff --git a/P2/lib/utils.c b/P2/lib/utils.c index 960ab18..c30f7e3 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -46,6 +46,7 @@ void sendChunkData(char *inputFile, int nMappers) { Maybe copy message.msgText into a new array, do the backwards iteration, and then replace message.msgText with the temp array? Or something? */ + //fseek() // TODO! help @@ -54,11 +55,9 @@ void sendChunkData(char *inputFile, int nMappers) { // message.msgText // } - message.msgType = map++; + message.msgType = (map++ % nMappers) + 1 ; //THIS IS DEBUG, NOT ACTUALLY FUNCTIONAL (like at all) msgsnd(msgid, &message, map, 0); - if (map > nMappers) - map = 1; } for (int i = 1; i < nMappers; i++) { -- cgit v1.2.3