diff options
author | Andrea Smith <smit9523@umn.edu> | 2020-10-24 11:44:36 -0500 |
---|---|---|
committer | Andrea Smith <smit9523@umn.edu> | 2020-10-24 11:44:36 -0500 |
commit | 65456446ed869e94801170d68b7b3a28215e87bd (patch) | |
tree | 8f48f0131e63bb3834e34bad2e5c4611d41dab69 | |
parent | Comments (diff) | |
download | csci4061-65456446ed869e94801170d68b7b3a28215e87bd.tar csci4061-65456446ed869e94801170d68b7b3a28215e87bd.tar.gz csci4061-65456446ed869e94801170d68b7b3a28215e87bd.tar.bz2 csci4061-65456446ed869e94801170d68b7b3a28215e87bd.tar.lz csci4061-65456446ed869e94801170d68b7b3a28215e87bd.tar.xz csci4061-65456446ed869e94801170d68b7b3a28215e87bd.tar.zst csci4061-65456446ed869e94801170d68b7b3a28215e87bd.zip |
Starting sendChunkData
-rw-r--r-- | P2/lib/utils.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c index 7bfe826..bbf55f8 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -1,15 +1,19 @@ #include "utils.h" -struct msg_t { - long tag; // Message type, must be > 0. Value will be used by msgrcv() - char text[MSGSIZE]; // Message data -}; - char *getChunkData(int mapperID) { } // sends chunks of size 1024 to the mappers in RR fashion void sendChunkData(char *inputFile, int nMappers) { + key_t key; + int msgid; + + // open message queue + msgid = msgget(key, 0666 | IPC_CREAT); + msgBuffer -> msgText = 1; + + // construct chunks of 1024 bytes + } // hash function to divide the list of word.txt files across reducers |