tools: semtest: new tool

Piece of code I used to validate that socketpair is a lot quicker than
pthread_semaphores.

Signed-off-by: Michel Pollet <buserror@gmail.com>
This commit is contained in:
Michel Pollet
2016-10-13 17:41:29 +01:00
parent c265d7fe3f
commit 9ab1af8dff
2 changed files with 127 additions and 2 deletions

View File

@@ -5,11 +5,14 @@ CPPFLAGS = -Wall -I../src/server -I../src/common -I../src/proxy \
CFLAGS = $(CPPFLAGS) -g -O3 -std=gnu99
all: holemap
all: holemap semtest
# holemap requires libmhash-dev for md5 calculation
holemap: holemap.c ../src/server/*.h
$(CC) $(CFLAGS) -o $@ $^ ${shell pkg-config mhash --cflags --libs}
semtest: semtest.c
$(CC) $(CFLAGS) -o $@ $^ -lpthread
clean:
rm -f holemap
rm -f holemap semtest