producers-consumers/include/shared.h

17 lines
278 B
C

#ifndef SHARED_H
#define SHARED_H
#include <semaphore.h>
int StringToNumber(char* argv);
typedef struct SharedStruct
{
int buffer[10];
int count[10];
sem_t semConsumer;
sem_t semProducer;
} SharedStruct;
void SharedStructInit(SharedStruct* sharedMem);
#endif