diff options
author | Matt Strapp <strap012@umn.edu> | 2020-10-26 07:56:58 -0500 |
---|---|---|
committer | Matt Strapp <strap012@umn.edu> | 2020-10-26 07:56:58 -0500 |
commit | 679eafefb096a7782bfd18a7283548607c9445cb (patch) | |
tree | 913373babffda44a043ff89b2beb97a64ed159cb /P2/lib | |
parent | Merge sendChunkData() with master (diff) | |
download | csci4061-679eafefb096a7782bfd18a7283548607c9445cb.tar csci4061-679eafefb096a7782bfd18a7283548607c9445cb.tar.gz csci4061-679eafefb096a7782bfd18a7283548607c9445cb.tar.bz2 csci4061-679eafefb096a7782bfd18a7283548607c9445cb.tar.lz csci4061-679eafefb096a7782bfd18a7283548607c9445cb.tar.xz csci4061-679eafefb096a7782bfd18a7283548607c9445cb.tar.zst csci4061-679eafefb096a7782bfd18a7283548607c9445cb.zip |
Add a pointer
Diffstat (limited to '')
-rw-r--r-- | P2/lib/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c index 8373a09..507eb0b 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -18,12 +18,13 @@ char *getChunkData(int mapperID) { struct msgBuffer ACK = {mapperID, "ACK"}; msgsnd(mid, (void *) &ACK, MSGSIZE, 0); } + msgctl(mid, IPC_RMID, 0); return message -> msgText; } // sends chunks of size 1024 to the mappers in RR fashion void sendChunkData(char *inputFile, int nMappers) { - struct msgBuffer message; + struct msgBuffer *message; key_t key = 10; int msgid; |