makefile updates

This commit is contained in:
shadow8t4 2015-11-06 12:15:31 -06:00
parent 38443df097
commit 2b113344a3
3 changed files with 14 additions and 4 deletions

View file

@ -1,4 +1,9 @@
#include "BoundedBuffer.h"
//#include <stdio>
#include <string>
#include <vector>
void BoundedBuffer::push(string item){
/* if(there is some empty slot){//data.size < b
data.push_back(item);

View file

@ -1,5 +1,7 @@
#include <vector>
#include <string>
#include <semaphore.h>
using namespace std;
@ -7,7 +9,7 @@ unsigned int n = 20, b = 100, w = 5;
class BoundedBuffer{
//int b;
Semaphore *full = new Semaphore(0); //initialized to 0, Since there are 0 full slots
Semaphore full(); //initialized to 0, Since there are 0 full slots
Semaphore *empty = new Semaphore(b); //initialized to b, Since all the slots are empty
Semaphore *mutex = new Semaphore(1);
@ -23,7 +25,6 @@ class BoundedBuffer{
void pop();
//can't be larger than b strings
//b = user input
};

View file

@ -8,5 +8,9 @@ reqchannel.o: reqchannel.h reqchannel.cpp
dataserver: dataserver.cpp reqchannel.o
g++ -std=c++11 -g -o dataserver dataserver.cpp reqchannel.o -lpthread
simpleclient: simpleclient.cpp reqchannel.o
g++ -std=c++11 -g -o simpleclient simpleclient.cpp reqchannel.o
simpleclient: simpleclient.cpp reqchannel.o BoundedBuffer.cpp
g++ -std=c++11 -g -o simpleclient simpleclient.cpp reqchannel.o BoundedBuffer.cpp
clean:
$(RM) *.o