Skip to content

Instantly share code, notes, and snippets.

View vinitbolla10's full-sized avatar
🎯
Focusing

Vinit Bolla vinitbolla10

🎯
Focusing
View GitHub Profile
@vinitbolla10
vinitbolla10 / producer_consumer.c
Created October 8, 2018 11:34 — forked from navin-mohan/producer_consumer.c
Producer-Consumer problem in C using semaphores
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
/*
use the pthread flag with gcc to compile this code