bssolver/include/master.h

31 lines
796 B
C

#ifndef MASTER_H
#define MASTER_H
#define _SVID_SOURCE 1
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200112L
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/select.h>
#include "error.h"
#include "shr_mem.h"
#include <math.h>
#include "siglib.h"
#define MAX_SLAVES 500
#define MAX_SIZE 300
#define MAX_PATH_SIZE 100
#define MAX_OUTPUT_SIZE (200 + MAX_PATH_SIZE)
#define OUTPUT_NAME "outputFile.txt"
void createPipesAndSlaves(int pipesOutput[][2], int pipesInput[][2]);
int writeOutput(char * output, FILE * outputFile, char * shmPointers);
void closePipes(int pipesInput[][2], int pipesOutput[][2], int slave, fd_set * set);
void sendTask(char * fileName, int pipesInput[][2], int slave);
void changeViewFlag();
#endif