Program is now fully functional
This commit is contained in:
+6
-1
@@ -8,11 +8,16 @@ typedef struct SharedStruct
|
||||
{
|
||||
int buffer[10];
|
||||
int count[10];
|
||||
int producerCount;
|
||||
int consumerCount;
|
||||
sem_t mutex;
|
||||
sem_t empty;
|
||||
sem_t full;
|
||||
} SharedStruct;
|
||||
|
||||
void SharedStructInit(SharedStruct* sharedMem);
|
||||
int IsProductionFinished(SharedStruct* sharedMem);
|
||||
void SharedStructInit(SharedStruct* sharedMem, int producers, int consumers);
|
||||
void PrintBuffer(SharedStruct* sharedMem);
|
||||
void PrintNumberCount(SharedStruct* sharedMem);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user