Merge pull request #248 from dgrove-oss/queue_config_cleanup

clarify config of pthread_workqueue vs. internal_workqueue
diff --git a/INSTALL.md b/INSTALL.md
index 3ab606b..b758f2b 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -160,16 +160,7 @@
 On older Ubuntu releases, you may need to install binutils-gold
 to get the gold linker.
 
-2. Initialize git submodules.
-  We are using git submodules to incorporate specific revisions of the
-  upstream pthread_workqueue and libkqueue projects into the build.
-
-    ```
-    git submodule init
-    git submodule update
-    ```
-
-3. Build (as in the general instructions above)
+2. Build (as in the general instructions above)
 
     ```
     sh autogen.sh
diff --git a/README.md b/README.md
index df6eaf7..ef9ec78 100644
--- a/README.md
+++ b/README.md
@@ -6,14 +6,14 @@
 
 libdispatch on Darwin is a combination of logic in the `xnu` kernel alongside the user-space Library. The kernel has the most information available to balance workload across the entire system. As a first step, however, we believe it is useful to bring up the basic functionality of the library using user-space pthread primitives on Linux.  Eventually, a Linux kernel module could be developed to support more informed thread scheduling.
 
-## Project Goals
+## Project Status
 
-We are currently early in the development of this project. We began with a mirror of the open source drop that corresponds with OS X El Capitan (10.11) and have ported it to x86_64 Ubuntu 14.04 and 15.10. The next steps are:
+A port of libdispatch to Linux has been completed. On Linux, since Swift 3, swift-corelibs-libdispatch has been included in all Swift releases and is used by other swift-corelibs projects.
 
-1. Complete the work to adopt libdispatch in other Core Libraries projects, especially Foundation. This will validate our work and get immediate test coverage on basic functionality of the Swift API.
-2. Include libdispatch and libdispatch-enabled Core Libraries in the Swift CI environment and the pre-built Swift toolchains at Swift.org.
-3. Develop a test suite for the Swift APIs of libdispatch.
-4. Enhance libdispatch as needed to support Swift language evolution and the needs of the other Core Libraries projects.
+Opportunities to contribute and on-going work include:
+
+1. Develop a test suite for the Swift APIs of libdispatch.
+2. Enhance libdispatch as needed to support Swift language evolution and the needs of the other Core Libraries projects.
 
 ## Build and Install
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 552be8f..56e5b58 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -74,6 +74,11 @@
 	dispatch_select				\
 	$(ADDITIONAL_TESTS)
 
+# For testing in swift.org CI system; make deadlines lenient by default
+# to reduce probability of test failures due to machine load.
+if HAVE_SWIFT
+CI_CFLAGS=-DLENIENT_DEADLINES=1
+endif
 
 dispatch_c99_CFLAGS=$(DISPATCH_TESTS_CFLAGS) $(CBLOCKS_FLAGS) -std=c99
 dispatch_plusplus_SOURCES=dispatch_plusplus.cpp
@@ -82,7 +87,7 @@
 
 AM_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir)
 
-DISPATCH_TESTS_CFLAGS=-Wall -Wno-deprecated-declarations $(MARCH_FLAGS)
+DISPATCH_TESTS_CFLAGS=-Wall -Wno-deprecated-declarations $(MARCH_FLAGS) $(CI_CFLAGS)
 AM_CFLAGS=$(DISPATCH_TESTS_CFLAGS) $(CBLOCKS_FLAGS) $(BSD_OVERLAY_CFLAGS)
 AM_OBJCFLAGS=$(DISPATCH_TESTS_CFLAGS) $(CBLOCKS_FLAGS)
 AM_CXXFLAGS=$(DISPATCH_TESTS_CFLAGS) $(CXXBLOCKS_FLAGS) $(BSD_OVERLAY_CFLAGS)
diff --git a/tests/dispatch_drift.c b/tests/dispatch_drift.c
index 3e1ef97..22f82ee 100644
--- a/tests/dispatch_drift.c
+++ b/tests/dispatch_drift.c
@@ -32,7 +32,11 @@
 #include <bsdtests.h>
 #include "dispatch_test.h"
 
+#if LENIENT_DEADLINES
+#define ACCEPTABLE_DRIFT 0.1
+#else
 #define ACCEPTABLE_DRIFT 0.001
+#endif
 
 int
 main(int argc __attribute__((unused)), char* argv[] __attribute__((unused)))
diff --git a/tests/dispatch_starfish.c b/tests/dispatch_starfish.c
index e5d3fab..66ebdd0 100644
--- a/tests/dispatch_starfish.c
+++ b/tests/dispatch_starfish.c
@@ -37,7 +37,9 @@
 #define COUNT	1000ul
 #define LAPS	10ul
 
-#if TARGET_OS_EMBEDDED
+#if LENIENT_DEADLINES
+#define ACCEPTABLE_LATENCY 10000
+#elif TARGET_OS_EMBEDDED
 #define ACCEPTABLE_LATENCY 3000
 #else
 #define ACCEPTABLE_LATENCY 1000