openafs/tests/opr/Makefile.in
Simon Wilkinson cb0081604e opr: Add new softsig implementation
Signals and pthreaded applications are a poor match. OpenAFS has had
the softsig system (currently in src/util/softsig.c) in an attempt to
alleviate some of these problems. However, that implementation itself
has a number of problems. It uses signal functions that are unsafe in
pthreaded applications, and uses pthread_kill within its signal
handlers. Over the years it has been responsible for a number of
portability bugs.

The old implementation continues to receive signals in the main thread
of the application. However, the handler code is run within a seperate
signal handler thread. When the main thread receives a signal a stub
handler is invoked, which simply pthread_kill()s the signal handler
thread.

The new implementation simplifies things by only receiving signals in
the handler thread. It uses only pthread-compatible signal functions,
and invokes no code from within async signal handlers.

A complete test suite is supplied.

Change-Id: I4bac68c2f853f1e7578b54ddced3833a97dd3f82
Reviewed-on: http://gerrit.openafs.org/6947
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
2015-05-26 14:06:18 -04:00

41 lines
1.0 KiB
Makefile

srcdir=@srcdir@
abs_top_builddir=@abs_top_builddir@
include @TOP_OBJDIR@/src/config/Makefile.config
include @TOP_OBJDIR@/src/config/Makefile.pthread
MODULE_CFLAGS = -I$(srcdir)/../..
LIBS=../tap/libtap.a $(abs_top_builddir)/src/opr/liboafs_opr.la
tests = dict-t fmt-t jhash-t queues-t rbtree-t softsig-helper time-t uuid-t
all check test tests: $(tests)
dict-t: dict-t.o
$(LT_LDRULE_static) dict-t.o $(LIBS) $(XLIBS)
fmt-t: fmt-t.o
$(LT_LDRULE_static) fmt-t.o $(LIBS) $(XLIBS)
queues-t: queues-t.o
$(LT_LDRULE_static) queues-t.o ../tap/libtap.a $(XLIBS)
rbtree-t: rbtree-t.o $(LIBS)
$(LT_LDRULE_static) rbtree-t.o ../tap/libtap.a $(LIBS) $(XLIBS)
jhash-t: jhash-t.o
$(LT_LDRULE_static) jhash-t.o ../tap/libtap.a $(XLIBS)
time-t: time-t.o
$(LT_LDRULE_static) time-t.o ../tap/libtap.a $(XLIBS)
uuid-t: uuid-t.o
$(LT_LDRULE_static) uuid-t.o ../tap/libtap.a $(LIBS) $(XLIBS)
softsig-helper: softsig-helper.o $(LIBS)
$(LT_LDRULE_static) softsig-helper.o $(LIBS) $(XLIBS)
clean distclean:
$(LT_CLEAN)
$(RM) -f $(tests) *.o core