Commit fa7bbc8c authored by Mathieu Valois's avatar Mathieu Valois
Browse files

Merge branch 'master' into stdin_pthread

parents a38768e7 517c23fb
Loading
Loading
Loading
Loading
+2 −0
Changes for Statsgen/include/statsgen.h: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@
#include <iostream>
#include <regex>

#define MAX_THREADS 32



/**
+10 −14
Changes for Statsgen/makefile: 10 added lines, 14 removed lines.
Original line number Diff line number Diff line
CXX	 = g++
CXXFLAGS = -pedantic -Wall -std=c++11 -Wextra -I./include -lpthread -O3
SRC	 = src/
INC	 = include/
BIN	 = bin/
CXXFLAGS = -pedantic -Wall -std=c++11 -Wextra -Iinclude -O3
LDFLAGS  = -lpthread
SRC	 = src
INC	 = include
BIN  = cstatsgen

.PHONY = clean

all: stats
$(BIN): main.o statsgen.o
	$(CXX) $^ -o $@ $(LDFLAGS)

stats: stats.o statsgen.o
	$(CXX) $^ $(CXXFLAGS) -o $@

stats.o: $(SRC)main.cpp $(INC)statsgen.h
	$(CXX) $(CXXFLAGS) $(SRC)main.cpp -c -o $@

statsgen.o: $(SRC)statsgen.cpp $(INC)statsgen.h
	$(CXX) $(CXXFLAGS) $(SRC)statsgen.cpp -c -o $@
%.o: $(SRC)/%.cpp $(INC)/statsgen.h
	$(CXX) $(CXXFLAGS) $< -c -o $@

clean:
	-rm *.o stats
 No newline at end of file
	-rm -f *.o stats
 No newline at end of file
+2 −2
Changes for Statsgen/src/statsgen.cpp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -111,8 +111,8 @@ int Statsgen::generate_stats() {

	int rc;
	int i;
	pthread_t threads[nbThread];
	struct thread_data td[nbThread];
	pthread_t threads[MAX_THREADS];
	struct thread_data td[MAX_THREADS];

	pthread_attr_t attr;
	void *status;