producers-consumers/src/consumer.c

27 lines
378 B
C
Raw Normal View History

2022-10-11 19:53:52 -05:00
#include "consumer.h"
2022-10-12 15:44:12 -05:00
#include "shared.h"
2022-10-11 19:53:52 -05:00
void Consumer(void)
2022-10-11 20:18:38 -05:00
{
int item;
while (1)
{
2022-10-12 15:44:12 -05:00
// down(&full);
// down(&mutex);
2022-10-11 20:18:38 -05:00
item = remove_item();
2022-10-12 15:44:12 -05:00
// up(&mutex);
// up(&empty);
2022-10-11 20:18:38 -05:00
consume_item(item);
2022-10-12 15:44:12 -05:00
break;
2022-10-11 20:18:38 -05:00
}
}
2022-10-12 15:44:12 -05:00
void consume_item(long int item)
2022-10-11 20:18:38 -05:00
{
;
}
long int remove_item()
2022-10-11 19:50:07 -05:00
{
;
}