Only call thr_setconcurrency if it's available.
Fix order of linking and installation.
rwlock_test: Makefile rwlock.c
$(RMF) rwlock.o
$(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
- $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $@ $(DESTDIR)$(sbindir)/
$(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(DLIB) -lbac -lm $(LIBS) $(OPENSSL_LIBS)
+ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $@ $(DESTDIR)$(sbindir)/
$(RMF) rwlock.o
$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
* For Solaris 2.5,2.6,7 and 8 threads are not timesliced.
* Ensure our threads can run concurrently.
*/
+
+#ifdef USE_THR_SETCONCURRENCY
thr_setconcurrency(THREADS); /* Only implemented on Solaris */
+#endif
/*
* Initialize the shared data.