#ifndef GLOBAL_H
#define GLOBAL_H

/* this represents our shared resource */
typedef struct
{
	/* for mutual exclusion during production or consumption of an item */
	int mutex;

	/* semaphore that counts the number of produced items (occupied slots) in the buffer */
	int fullSlots;

	/* semaphore that counts the number of available slots in the buffer */
	int emptySlots;

} SharedResource;

#endif

