Skip to content

Commit

Permalink
Make trickle thread-safe
Browse files Browse the repository at this point in the history
thread safety is provided by a big global lock with pthread. There is maybe ways to increase lock
granularity but all I was interested in was to have a safe behavior in a threaded environment.

I have modified the configure.in file so
someone could fall back to the non thread-safe version with the configure script option
--disable-threadsafe

I have improved the AC_CHECK_TYPE macro for in_addr_t. As it was, it was causing a compiling
error on my system.

All the other modifs are from the fact that I did use autoconf 1.69. I had to modernize some parts
of the am/in files to make them work with the latest version.

Signed-off-by: Olivier Langlois <olivier@olivierlanglois.net>
  • Loading branch information
lano1106 committed Nov 27, 2013
1 parent e91eb49 commit 56637e7
Show file tree
Hide file tree
Showing 10 changed files with 28,594 additions and 25,046 deletions.
10 changes: 5 additions & 5 deletions Makefile.am
Expand Up @@ -17,18 +17,18 @@ man_MANS = trickle.1 trickled.8 trickled.conf.5

bin_PROGRAMS = trickle trickled tricklectl

trickle_DEPENDENCIES = @ERRO@ @LIBOBJS@
trickle_DEPENDENCIES = @ERRO@ $(LIBOBJS)
trickle_SOURCES = trickle.c util.c getopt.c
trickle_LDADD = @ERRO@ @LIBOBJS@
trickle_LDADD = @ERRO@ $(LIBOBJS)

trickled_SOURCES = trickled.c atomicio.c print.c bwstat.c client.c conf.c \
util.c cleanup.c getopt.c xdr.c
trickled_LDADD = @EVENTLIB@ @LIBOBJS@
trickled_LDADD = @EVENTLIB@ $(LIBOBJS)

tricklectl_SOURCES = tricklectl.c trickledu.c atomicio.c xdr.c
tricklectl_LDADD = @ERRO@ @LIBOBJS@
tricklectl_LDADD = @ERRO@ $(LIBOBJS)

AM_CFLAGS += -Wall -Icompat @EVENTINC@
AM_CFLAGS = -Wall -Icompat @EVENTINC@

overloaddir = $(libdir)
overload_DATA = libtrickle.so
Expand Down

0 comments on commit 56637e7

Please sign in to comment.