You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2015/06/14 00:56:00 UTC

[10/22] trafficserver git commit: TS-3689: Remove libck

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_array/validate/serial.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_array/validate/serial.c b/lib/ck/regressions/ck_array/validate/serial.c
deleted file mode 100644
index b6d7b56..0000000
--- a/lib/ck/regressions/ck_array/validate/serial.c
+++ /dev/null
@@ -1,178 +0,0 @@
-#include <ck_array.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "../../common.h"
-
-#ifndef ITERATION
-#define ITERATION 128
-#endif
-
-static void
-my_free(void *p, size_t m, bool d)
-{
-
-	(void)m;
-	(void)d;
-
-	free(p);
-	return;
-}
-
-static void *
-my_malloc(size_t b)
-{
-
-	return malloc(b);
-}
-
-static void *
-my_realloc(void *r, size_t a, size_t b, bool d)
-{
-
-	(void)a;
-	(void)d;
-
-	return realloc(r, b);
-}
-
-int
-main(void)
-{
-	void *r;
-	uintptr_t i;
-	ck_array_t array;
-	ck_array_iterator_t iterator;
-	struct ck_malloc m = {
-		.malloc = my_malloc,
-		.free = NULL,
-		.realloc = my_realloc
-	};
-
-	if (ck_array_init(&array, CK_ARRAY_MODE_SPMC, &m, 4) == true)
-		ck_error("ck_array_init with NULL free succeeded\n");
-
-	m.free = my_free;
-	if (ck_array_init(&array, CK_ARRAY_MODE_SPMC, &m, 4) == false)
-		ck_error("ck_array_init\n");
-
-	for (i = 0; i < ITERATION; i++) {
-		if (ck_array_put(&array, (void *)i) == false)
-			ck_error("ck_error_put\n");
-
-		if (ck_array_remove(&array, (void *)i) == false)
-			ck_error("ck_error_remove after put\n");
-	}
-
-	i = 0; CK_ARRAY_FOREACH(&array, &iterator, &r) i++;
-	if (i != 0)
-		ck_error("Non-empty array after put -> remove workload.\n");
-
-	ck_array_commit(&array);
-
-	i = 0; CK_ARRAY_FOREACH(&array, &iterator, &r) i++;
-	if (i != 0)
-		ck_error("Non-empty array after put -> remove -> commit workload.\n");
-
-	for (i = 0; i < ITERATION; i++) {
-		if (ck_array_put(&array, (void *)i) == false)
-			ck_error("ck_error_put\n");
-	}
-
-	i = 0; CK_ARRAY_FOREACH(&array, &iterator, &r) i++;
-	if (i != 0)
-		ck_error("Non-empty array after put workload.\n");
-
-	for (i = 0; i < ITERATION; i++) {
-		if (ck_array_remove(&array, (void *)i) == false)
-			ck_error("ck_error_remove after put\n");
-	}
-
-	i = 0; CK_ARRAY_FOREACH(&array, &iterator, &r) i++;
-	if (i != 0)
-		ck_error("Non-empty array after put -> remove workload.\n");
-
-	ck_array_commit(&array);
-
-	i = 0; CK_ARRAY_FOREACH(&array, &iterator, &r) i++;
-	if (i != 0)
-		ck_error("Non-empty array after put -> remove -> commit workload.\n");
-
-	for (i = 0; i < ITERATION; i++) {
-		if (ck_array_put(&array, (void *)i) == false)
-			ck_error("ck_error_put\n");
-	}
-
-	ck_array_commit(&array);
-
-	i = 0;
-	CK_ARRAY_FOREACH(&array, &iterator, &r) {
-		i++;
-	}
-
-	if (i != ITERATION)
-		ck_error("Incorrect item count in iteration\n");
-
-	ck_array_remove(&array, (void *)(uintptr_t)0);
-	ck_array_remove(&array, (void *)(uintptr_t)1);
-	ck_array_commit(&array);
-	i = 0; CK_ARRAY_FOREACH(&array, &iterator, &r) i++;
-	if (i != ITERATION - 2 || ck_array_length(&array) != ITERATION - 2)
-		ck_error("Incorrect item count in iteration after remove\n");
-
-	if (ck_array_put_unique(&array, (void *)UINTPTR_MAX) != 0)
-		ck_error("Unique value put failed.\n");
-
-	if (ck_array_put_unique(&array, (void *)(uintptr_t)4) != 1)
-		ck_error("put of 4 not detected as non-unique.\n");
-
-	if (ck_array_put_unique(&array, (void *)UINTPTR_MAX) != 1)
-		ck_error("put of UINTPTR_MAX not detected as non-unique.\n");
-
-	ck_array_commit(&array);
-	i = 0;
-	CK_ARRAY_FOREACH(&array, &iterator, &r) {
-		i++;
-	}
-	if (i != ITERATION - 1 || ck_array_length(&array) != ITERATION - 1)
-		ck_error("Incorrect item count in iteration after unique put\n");
-
-	if (ck_array_initialized(&array) == false)
-		ck_error("Error, expected array to be initialized.\n");
-
-	for (i = 0; i < ITERATION * 4; i++) {
-		ck_array_remove(&array, (void *)i);
-	}
-
-	for (i = 0; i < ITERATION * 16; i++) {
-		ck_array_put(&array, (void *)i);
-	}
-
-	ck_array_commit(&array);
-
-	for (i = 0; i < ITERATION * 128; i++) {
-		ck_array_put(&array, (void *)i);
-		if (ck_array_put_unique(&array, (void *)i) != 1)
-			ck_error("put_unique for non-unique value should fail.\n");
-	}
-
-	for (i = 0; i < ITERATION * 64; i++) {
-		bool f = ck_array_remove(&array, (void *)i);
-
-		if (f == false && i < ITERATION * 144)
-			ck_error("Remove failed for existing entry.\n");
-
-		if (f == true && i > ITERATION * 144)
-			ck_error("Remove succeeded for non-existing entry.\n");
-	}
-
-	ck_array_commit(&array);
-	ck_array_deinit(&array, false);
-
-	if (ck_array_initialized(&array) == true)
-		ck_error("Error, expected array to be uninitialized.\n");
-
-	return 0;
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_backoff/validate/Makefile
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_backoff/validate/Makefile b/lib/ck/regressions/ck_backoff/validate/Makefile
deleted file mode 100644
index 39e6d4f..0000000
--- a/lib/ck/regressions/ck_backoff/validate/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-.PHONY: check clean
-
-all: validate
-
-validate: validate.c ../../../include/ck_backoff.h
-	$(CC) $(CFLAGS) -o validate validate.c
-
-check: all
-	./validate
-
-clean:
-	rm -rf validate *.dSYM *.exe
-
-include ../../../build/regressions.build
-CFLAGS+=-D_GNU_SOURCE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_backoff/validate/validate.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_backoff/validate/validate.c b/lib/ck/regressions/ck_backoff/validate/validate.c
deleted file mode 100644
index d48662b..0000000
--- a/lib/ck/regressions/ck_backoff/validate/validate.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <ck_backoff.h>
-#include "../../common.h"
-
-int
-main(void)
-{
-	ck_backoff_t backoff = CK_BACKOFF_INITIALIZER;
-	const ck_backoff_t ceiling = CK_BACKOFF_CEILING + 1;
-	unsigned int i = 0;
-
-	fprintf(stderr, "Ceiling is: %u (%#x)\n", CK_BACKOFF_CEILING, CK_BACKOFF_CEILING);
-
-	for (;;) {
-		ck_backoff_t previous = backoff;
-		ck_backoff_eb(&backoff);
-
-		printf("EB %u\n", backoff);
-		if (previous == ceiling) {
-			if (backoff != ceiling)
-				ck_error("[C] GB: expected %u, got %u\n", ceiling, backoff);
-
-			if (i++ >= 1)
-				break;
-		} else if (previous != backoff >> 1) {
-			ck_error("[N] GB: expected %u (%u), got %u\n", previous << 1, previous, backoff);
-		}
-	}
-
-	return 0;
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_barrier/benchmark/Makefile
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_barrier/benchmark/Makefile b/lib/ck/regressions/ck_barrier/benchmark/Makefile
deleted file mode 100644
index ea973d2..0000000
--- a/lib/ck/regressions/ck_barrier/benchmark/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-.PHONY: clean distribution
-
-OBJECTS=throughput
-
-all: $(OBJECTS)
-
-throughput: throughput.c ../../../include/ck_barrier.h ../../../src/ck_barrier_centralized.c
-	$(CC) $(CFLAGS) -o throughput throughput.c ../../../src/ck_barrier_centralized.c
-
-clean:
-	rm -rf *.dSYM *.exe *~ *.o $(OBJECTS)
-
-include ../../../build/regressions.build
-CFLAGS+=$(PTHREAD_CFLAGS) -D_GNU_SOURCE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_barrier/benchmark/throughput.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_barrier/benchmark/throughput.c b/lib/ck/regressions/ck_barrier/benchmark/throughput.c
deleted file mode 100644
index 1a1c013..0000000
--- a/lib/ck/regressions/ck_barrier/benchmark/throughput.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright 2011 David Joseph.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <pthread.h>
-#include <unistd.h>
-#include <ck_stdint.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <ck_pr.h>
-#include <ck_barrier.h>
-
-#include "../../common.h"
-
-#if defined(CK_F_PR_INC_64) && defined(CK_F_PR_LOAD_64)
-static int done = 0;
-static struct affinity a;
-static int nthr;
-static int tid;
-static ck_barrier_centralized_t barrier = CK_BARRIER_CENTRALIZED_INITIALIZER;
-struct counter {
-	uint64_t value;
-} CK_CC_CACHELINE;
-struct counter *counters;
-
-static void *
-thread(void *null CK_CC_UNUSED)
-{
-	ck_barrier_centralized_state_t state = CK_BARRIER_CENTRALIZED_STATE_INITIALIZER;
-	int id;
-
-	id = ck_pr_faa_int(&tid, 1);
-	aff_iterate(&a);
-
-	while (ck_pr_load_int(&done) == 0) {
-		ck_barrier_centralized(&barrier, &state, nthr);
-		ck_pr_inc_64(&counters[id].value);
-		ck_barrier_centralized(&barrier, &state, nthr);
-		ck_pr_inc_64(&counters[id].value);
-		ck_barrier_centralized(&barrier, &state, nthr);
-		ck_pr_inc_64(&counters[id].value);
-		ck_barrier_centralized(&barrier, &state, nthr);
-		ck_pr_inc_64(&counters[id].value);
-		ck_barrier_centralized(&barrier, &state, nthr);
-		ck_pr_inc_64(&counters[id].value);
-		ck_barrier_centralized(&barrier, &state, nthr);
-		ck_pr_inc_64(&counters[id].value);
-		ck_barrier_centralized(&barrier, &state, nthr);
-		ck_pr_inc_64(&counters[id].value);
-		ck_barrier_centralized(&barrier, &state, nthr);
-		ck_pr_inc_64(&counters[id].value);
-	}
-
-	return (NULL);
-}
-
-int
-main(int argc, char *argv[])
-{
-	pthread_t *threads;
-	uint64_t count;
-	int i;
-
-	if (argc != 3) {
-		ck_error("Correct usage: <number of threads> <affinity delta>\n");
-	}
-
-	nthr = atoi(argv[1]);
-        if (nthr <= 0) {
-                ck_error("ERROR: Number of threads must be greater than 0\n");
-        }
-
-        threads = malloc(sizeof(pthread_t) * nthr);
-        if (threads == NULL) {
-                ck_error("ERROR: Could not allocate thread structures\n");
-        }
-
-	counters = calloc(sizeof(struct counter), nthr);
-	if (counters == NULL) {
-		ck_error("ERROR: Could not allocate counters\n");
-	}
-
-        a.delta = atoi(argv[2]);
-
-        fprintf(stderr, "Creating threads (barrier)...");
-        for (i = 0; i < nthr; ++i) {
-                if (pthread_create(&threads[i], NULL, thread, NULL)) {
-                        ck_error("ERROR: Could not create thread %d\n", i);
-                }
-        }
-        fprintf(stderr, "done\n");
-
-	common_sleep(10);
-
-	count = 0;
-	ck_pr_store_int(&done, 1);
-	for (i = 0; i < nthr; ++i)
-		count += ck_pr_load_64(&counters[i].value);
-	printf("%d %16" PRIu64 "\n", nthr, count);
-
-	return (0);
-}
-#else
-int
-main(void)
-{
-
-	fputs("Unsupported.", stderr);
-	return 0;
-}
-#endif
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_barrier/validate/Makefile
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_barrier/validate/Makefile b/lib/ck/regressions/ck_barrier/validate/Makefile
deleted file mode 100644
index f31a1a6..0000000
--- a/lib/ck/regressions/ck_barrier/validate/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-.PHONY: check clean distribution
-
-OBJECTS=barrier_centralized barrier_combining barrier_dissemination barrier_tournament barrier_mcs
-
-all: $(OBJECTS)
-
-barrier_centralized: barrier_centralized.c ../../../include/ck_barrier.h ../../../src/ck_barrier_centralized.c
-	$(CC) $(CFLAGS) -o barrier_centralized barrier_centralized.c ../../../src/ck_barrier_centralized.c
-
-barrier_combining: barrier_combining.c ../../../include/ck_barrier.h ../../../src/ck_barrier_combining.c
-	$(CC) $(CFLAGS) -o barrier_combining barrier_combining.c ../../../src/ck_barrier_combining.c
-
-barrier_dissemination: barrier_dissemination.c ../../../include/ck_barrier.h ../../../src/ck_barrier_dissemination.c
-	$(CC) $(CFLAGS) -o barrier_dissemination barrier_dissemination.c ../../../src/ck_barrier_dissemination.c
-
-barrier_tournament: barrier_tournament.c ../../../include/ck_barrier.h ../../../src/ck_barrier_tournament.c
-	$(CC) $(CFLAGS) -o barrier_tournament barrier_tournament.c ../../../src/ck_barrier_tournament.c
-
-barrier_mcs: barrier_mcs.c ../../../include/ck_barrier.h ../../../src/ck_barrier_mcs.c
-	$(CC) $(CFLAGS) -o barrier_mcs barrier_mcs.c ../../../src/ck_barrier_mcs.c
-
-check: all
-	rc=0;                                                   \
-	for d in $(OBJECTS) ; do                                \
-		echo $$d;					\
-		./$$d $(CORES) 1 1 || rc=1;     		\
-	done;                                                   \
-	exit $$rc
-
-clean:
-	rm -rf *.dSYM *.exe *~ *.o $(OBJECTS)
-
-include ../../../build/regressions.build
-CFLAGS+=$(PTHREAD_CFLAGS) -D_GNU_SOURCE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_barrier/validate/barrier_centralized.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_barrier/validate/barrier_centralized.c b/lib/ck/regressions/ck_barrier/validate/barrier_centralized.c
deleted file mode 100644
index 64ff54c..0000000
--- a/lib/ck/regressions/ck_barrier/validate/barrier_centralized.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <errno.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <math.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#include <ck_pr.h>
-#include <ck_barrier.h>
-
-#include "../../common.h"
-
-#ifndef ITERATE
-#define ITERATE 5000000
-#endif
-
-#ifndef ENTRIES
-#define ENTRIES 512
-#endif
-
-static struct affinity a;
-static int nthr;
-static int counters[ENTRIES];
-static ck_barrier_centralized_t barrier = CK_BARRIER_CENTRALIZED_INITIALIZER;
-static int barrier_wait;
-
-static void *
-thread(void *null CK_CC_UNUSED)
-{
-	ck_barrier_centralized_state_t state = CK_BARRIER_CENTRALIZED_STATE_INITIALIZER;
-	int j, counter;
-	int i = 0;
-
-	aff_iterate(&a);
-
-	ck_pr_inc_int(&barrier_wait);
-	while (ck_pr_load_int(&barrier_wait) != nthr)
-		ck_pr_stall();
-
-	for (j = 0; j < ITERATE; j++) {
-		i = j++ & (ENTRIES - 1);
-		ck_pr_inc_int(&counters[i]);
-		ck_barrier_centralized(&barrier, &state, nthr);
-		counter = ck_pr_load_int(&counters[i]);
-		if (counter != nthr * (j / ENTRIES + 1)) {
-			ck_error("FAILED [%d:%d]: %d != %d\n", i, j - 1, counter, nthr);
-		}
-	}
-
-	return (NULL);
-}
-
-int
-main(int argc, char *argv[])
-{
-	pthread_t *threads;
-	int i;
-
-	if (argc < 3) {
-		ck_error("Usage: correct <number of threads> <affinity delta>\n");
-	}
-
-	nthr = atoi(argv[1]);
-	if (nthr <= 0) {
-		ck_error("ERROR: Number of threads must be greater than 0\n");
-	}
-
-	threads = malloc(sizeof(pthread_t) * nthr);
-	if (threads == NULL) {
-		ck_error("ERROR: Could not allocate thread structures\n");
-	}
-
-	a.delta = atoi(argv[2]);
-
-	fprintf(stderr, "Creating threads (barrier)...");
-	for (i = 0; i < nthr; i++) {
-		if (pthread_create(&threads[i], NULL, thread, NULL)) {
-			ck_error("ERROR: Could not create thread %d\n", i);
-		}
-	}
-	fprintf(stderr, "done\n");
-
-	fprintf(stderr, "Waiting for threads to finish correctness regression...");
-	for (i = 0; i < nthr; i++)
-		pthread_join(threads[i], NULL);
-	fprintf(stderr, "done (passed)\n");
-
-
-	return (0);
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_barrier/validate/barrier_combining.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_barrier/validate/barrier_combining.c b/lib/ck/regressions/ck_barrier/validate/barrier_combining.c
deleted file mode 100644
index 10aa701..0000000
--- a/lib/ck/regressions/ck_barrier/validate/barrier_combining.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * Copyright 2011 David Joseph.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <errno.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <math.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#include <ck_pr.h>
-#include <ck_barrier.h>
-
-#include "../../common.h"
-
-#ifndef ITERATE
-#define ITERATE 5000000
-#endif
-
-#ifndef ENTRIES
-#define ENTRIES 512
-#endif
-
-static struct affinity a;
-static int nthr;
-static int ngroups;
-static int counters[ENTRIES];
-static ck_barrier_combining_t barrier;
-static int barrier_wait;
-
-static void *
-thread(void *group)
-{
-	ck_barrier_combining_state_t state = CK_BARRIER_COMBINING_STATE_INITIALIZER;
-	int j, counter;
-	int i = 0;
-
-	aff_iterate(&a);
-
-	ck_pr_inc_int(&barrier_wait);
-	while (ck_pr_load_int(&barrier_wait) != (nthr * ngroups))
-		ck_pr_stall();
-
-	for (j = 0; j < ITERATE; j++) {
-		i = j++ & (ENTRIES - 1);
-		ck_pr_inc_int(&counters[i]);
-		ck_barrier_combining(&barrier, group, &state);
-		counter = ck_pr_load_int(&counters[i]);
-		if (counter != nthr * ngroups * (j / ENTRIES + 1)) {
-			ck_error("FAILED [%d:%d]: %d != %d\n", i, j - 1, counter, nthr * ngroups);
-		}
-	}
-
-	return (NULL);
-}
-
-int
-main(int argc, char *argv[])
-{
-	pthread_t *threads;
-	ck_barrier_combining_group_t *groupings;
-	ck_barrier_combining_group_t *init_root;
-	int i;
-
-	init_root = malloc(sizeof(ck_barrier_combining_group_t));
-	if (init_root == NULL) {
-		ck_error("ERROR: Could not allocate initial barrier structure\n");
-	}
-	ck_barrier_combining_init(&barrier, init_root);
-
-	if (argc < 4) {
-		ck_error("Usage: correct <total groups> <threads per group> <affinity delta>\n");
-	}
-
-	ngroups = atoi(argv[1]);
-	if (ngroups <= 0) {
-		ck_error("ERROR: Number of groups must be greater than 0\n");
-	}
-
-	nthr = atoi(argv[2]);
-	if (nthr <= 0) {
-		ck_error("ERROR: Number of threads must be greater than 0\n");
-	}
-
-	groupings = malloc(sizeof(ck_barrier_combining_group_t) * ngroups);
-	if (groupings == NULL) {
-		ck_error("Could not allocate thread barrier grouping structures\n");
-	}
-
-	threads = malloc(sizeof(pthread_t) * nthr * ngroups);
-	if (threads == NULL) {
-		ck_error("ERROR: Could not allocate thread structures\n");
-	}
-
-	a.delta = atoi(argv[3]);
-
-	for (i = 0; i < ngroups; i++)
-		ck_barrier_combining_group_init(&barrier, groupings + i, nthr);
-
-	fprintf(stderr, "Creating threads (barrier)...");
-	for (i = 0; i < (nthr * ngroups); i++) {
-		if (pthread_create(&threads[i], NULL, thread, groupings + (i % ngroups))) {
-			ck_error("ERROR: Could not create thread %d\n", i);
-		}
-	}
-	fprintf(stderr, "done\n");
-
-	fprintf(stderr, "Waiting for threads to finish correctness regression...");
-	for (i = 0; i < (nthr * ngroups); i++)
-		pthread_join(threads[i], NULL);
-	fprintf(stderr, "done (passed)\n");
-
-	return (0);
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_barrier/validate/barrier_dissemination.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_barrier/validate/barrier_dissemination.c b/lib/ck/regressions/ck_barrier/validate/barrier_dissemination.c
deleted file mode 100644
index eea4f69..0000000
--- a/lib/ck/regressions/ck_barrier/validate/barrier_dissemination.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * Copyright 2011 David Joseph.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <errno.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <math.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#include <ck_pr.h>
-#include <ck_barrier.h>
-
-#include "../../common.h"
-
-#ifndef ITERATE
-#define ITERATE 5000000
-#endif
-
-#ifndef ENTRIES
-#define ENTRIES 512
-#endif
-
-static struct affinity a;
-static int nthr;
-static int counters[ENTRIES];
-static int barrier_wait;
-
-static void *
-thread(void *b)
-{
-	ck_barrier_dissemination_t *barrier = b;
-	ck_barrier_dissemination_state_t state;
-	int j, k, counter;
-	int i = 0;
-
-	aff_iterate(&a);
-	ck_barrier_dissemination_subscribe(barrier, &state);
-
-	ck_pr_inc_int(&barrier_wait);
-	while (ck_pr_load_int(&barrier_wait) != nthr)
-		ck_pr_stall();
-
-	for (j = 0, k = 0; j < ITERATE; j++, k++) {
-		i = j++ & (ENTRIES - 1);
-		ck_pr_inc_int(&counters[i]);
-		ck_barrier_dissemination(barrier, &state);
-		counter = ck_pr_load_int(&counters[i]);
-		if (counter != nthr * (j / ENTRIES + 1)) {
-			ck_error("FAILED [%d:%d]: %d != %d\n", i, j - 1, counter, nthr);
-		}
-	}
-
-	return (NULL);
-}
-
-int
-main(int argc, char *argv[])
-{
-	ck_barrier_dissemination_t *barrier;
-	ck_barrier_dissemination_flag_t **barrier_internal;
-	pthread_t *threads;
-	int i, size;
-
-	if (argc < 3) {
-		ck_error("Usage: correct <number of threads> <affinity delta>\n");
-	}
-
-	nthr = atoi(argv[1]);
-	if (nthr <= 0) {
-		ck_error("ERROR: Number of threads must be greater than 0\n");
-	}
-
-	threads = malloc(sizeof(pthread_t) * nthr);
-	if (threads == NULL) {
-		ck_error("ERROR: Could not allocate thread structures\n");
-	}
-
-	a.delta = atoi(argv[2]);
-
-	barrier = malloc(sizeof(ck_barrier_dissemination_t) * nthr);
-	if (barrier == NULL) {
-		ck_error("ERROR: Could not allocate barrier structures\n");
-	}
-
-	barrier_internal = malloc(sizeof(ck_barrier_dissemination_flag_t *) * nthr);
-	if (barrier_internal == NULL) {
-		ck_error("ERROR: Could not allocate barrier structures\n");
-	}
-
-	size = ck_barrier_dissemination_size(nthr);
-	for (i = 0; i < nthr; ++i) {
-		barrier_internal[i] = malloc(sizeof(ck_barrier_dissemination_flag_t) * size);
-		if (barrier_internal[i] == NULL) {
-			ck_error("ERROR: Could not allocate barrier structures\n");
-		}
-	}
-	ck_barrier_dissemination_init(barrier, barrier_internal, nthr);
-
-	fprintf(stderr, "Creating threads (barrier)...");
-	for (i = 0; i < nthr; i++) {
-		if (pthread_create(&threads[i], NULL, thread, barrier)) {
-			ck_error("ERROR: Could not create thread %d\n", i);
-		}
-	}
-	fprintf(stderr, "done\n");
-
-	fprintf(stderr, "Waiting for threads to finish correctness regression...");
-	for (i = 0; i < nthr; i++)
-		pthread_join(threads[i], NULL);
-	fprintf(stderr, "done (passed)\n");
-
-
-	return (0);
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_barrier/validate/barrier_mcs.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_barrier/validate/barrier_mcs.c b/lib/ck/regressions/ck_barrier/validate/barrier_mcs.c
deleted file mode 100644
index 3c5cd01..0000000
--- a/lib/ck/regressions/ck_barrier/validate/barrier_mcs.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * Copyright 2011 David Joseph.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <errno.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <math.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#include <ck_pr.h>
-#include <ck_barrier.h>
-
-#include "../../common.h"
-
-#ifndef ITERATE
-#define ITERATE 5000000
-#endif
-
-#ifndef ENTRIES
-#define ENTRIES 512
-#endif
-
-static struct affinity a;
-static int nthr;
-static int counters[ENTRIES];
-static int barrier_wait;
-
-static void *
-thread(void *b)
-{
-	ck_barrier_mcs_t *barrier = b;
-	ck_barrier_mcs_state_t state;
-	int j, counter;
-	int i = 0;
-
-	aff_iterate(&a);
-
-	ck_barrier_mcs_subscribe(barrier, &state);
-
-	ck_pr_inc_int(&barrier_wait);
-	while (ck_pr_load_int(&barrier_wait) != nthr)
-		ck_pr_stall();
-
-	for (j = 0; j < ITERATE; j++) {
-		i = j++ & (ENTRIES - 1);
-		ck_pr_inc_int(&counters[i]);
-		ck_barrier_mcs(barrier, &state);
-		counter = ck_pr_load_int(&counters[i]);
-		if (counter != nthr * (j / ENTRIES + 1)) {
-			ck_error("FAILED [%d:%d]: %d != %d\n", i, j - 1, counter, nthr);
-		}
-	}
-
-	return (NULL);
-}
-
-int
-main(int argc, char *argv[])
-{
-	pthread_t *threads;
-	ck_barrier_mcs_t *barrier;
-	int i;
-
-	if (argc < 3) {
-		ck_error("Usage: correct <number of threads> <affinity delta>\n");
-	}
-
-	nthr = atoi(argv[1]);
-	if (nthr <= 0) {
-		ck_error("ERROR: Number of threads must be greater than 0\n");
-	}
-
-	threads = malloc(sizeof(pthread_t) * nthr);
-	if (threads == NULL) {
-		ck_error("ERROR: Could not allocate thread structures\n");
-	}
-
-	barrier = malloc(sizeof(ck_barrier_mcs_t) * nthr);
-	if (barrier == NULL) {
-		ck_error("ERROR: Could not allocate barrier structures\n");
-	}
-	ck_barrier_mcs_init(barrier, nthr);
-
-	a.delta = atoi(argv[2]);
-
-	fprintf(stderr, "Creating threads (barrier)...");
-	for (i = 0; i < nthr; i++) {
-		if (pthread_create(&threads[i], NULL, thread, barrier)) {
-			ck_error("ERROR: Could not create thread %d\n", i);
-		}
-	}
-	fprintf(stderr, "done\n");
-
-	fprintf(stderr, "Waiting for threads to finish correctness regression...");
-	for (i = 0; i < nthr; i++)
-		pthread_join(threads[i], NULL);
-	fprintf(stderr, "done (passed)\n");
-
-
-	return (0);
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_barrier/validate/barrier_tournament.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_barrier/validate/barrier_tournament.c b/lib/ck/regressions/ck_barrier/validate/barrier_tournament.c
deleted file mode 100644
index f23c997..0000000
--- a/lib/ck/regressions/ck_barrier/validate/barrier_tournament.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * Copyright 2011 David Joseph.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <errno.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <math.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#include <ck_pr.h>
-#include <ck_barrier.h>
-
-#include "../../common.h"
-
-#ifndef ITERATE
-#define ITERATE 5000000
-#endif
-
-#ifndef ENTRIES
-#define ENTRIES 512
-#endif
-
-static struct affinity a;
-static int nthr;
-static int counters[ENTRIES];
-static int barrier_wait;
-static ck_barrier_tournament_t barrier;
-
-static void *
-thread(CK_CC_UNUSED void *unused)
-{
-	ck_barrier_tournament_state_t state;
-	int j, counter;
-	int i = 0;
-
-	aff_iterate(&a);
-	ck_barrier_tournament_subscribe(&barrier, &state);
-
-	ck_pr_inc_int(&barrier_wait);
-	while (ck_pr_load_int(&barrier_wait) != nthr)
-		ck_pr_stall();
-
-	for (j = 0; j < ITERATE; j++) {
-		i = j++ & (ENTRIES - 1);
-		ck_pr_inc_int(&counters[i]);
-		ck_barrier_tournament(&barrier, &state);
-		counter = ck_pr_load_int(&counters[i]);
-		if (counter != nthr * (j / ENTRIES + 1)) {
-			ck_error("FAILED [%d:%d]: %d != %d\n", i, j - 1, counter, nthr);
-		}
-	}
-
-	ck_pr_inc_int(&barrier_wait);
-	while (ck_pr_load_int(&barrier_wait) != nthr * 2)
-		ck_pr_stall();
-
-	return (NULL);
-}
-
-int
-main(int argc, char *argv[])
-{
-	pthread_t *threads;
-	ck_barrier_tournament_round_t **rounds;
-	int i;
-	unsigned int size;
-
-	if (argc < 3) {
-		ck_error("Usage: correct <number of threads> <affinity delta>\n");
-	}
-
-	nthr = atoi(argv[1]);
-	if (nthr <= 0) {
-		ck_error("ERROR: Number of threads must be greater than 0\n");
-	}
-	a.delta = atoi(argv[2]);
-
-	threads = malloc(sizeof(pthread_t) * nthr);
-	if (threads == NULL) {
-		ck_error("ERROR: Could not allocate thread structures\n");
-	}
-
-	rounds = malloc(sizeof(ck_barrier_tournament_round_t *) * nthr);
-	if (rounds == NULL) {
-		ck_error("ERROR: Could not allocate barrier structures\n");
-	}
-
-	size = ck_barrier_tournament_size(nthr);
-	for (i = 0; i < nthr; ++i) {
-		rounds[i] = malloc(sizeof(ck_barrier_tournament_round_t) * size);
-		if (rounds[i] == NULL) {
-			ck_error("ERROR: Could not allocate barrier structures\n");
-		}
-	}
-
-	ck_barrier_tournament_init(&barrier, rounds, nthr);
-
-	fprintf(stderr, "Creating threads (barrier)...");
-	for (i = 0; i < nthr; i++) {
-		if (pthread_create(&threads[i], NULL, thread, NULL)) {
-			ck_error("ERROR: Could not create thread %d\n", i);
-		}
-	}
-	fprintf(stderr, "done\n");
-
-	fprintf(stderr, "Waiting for threads to finish correctness regression...");
-	for (i = 0; i < nthr; i++)
-		pthread_join(threads[i], NULL);
-	fprintf(stderr, "done (passed)\n");
-
-	return (0);
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_bitmap/validate/Makefile
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_bitmap/validate/Makefile b/lib/ck/regressions/ck_bitmap/validate/Makefile
deleted file mode 100644
index 85e13c8..0000000
--- a/lib/ck/regressions/ck_bitmap/validate/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-.PHONY: check clean
-
-OBJECTS=serial
-
-all: $(OBJECTS)
-
-serial: serial.c ../../../include/ck_bitmap.h
-	$(CC) $(CFLAGS) -o serial serial.c
-
-clean:
-	rm -rf *~ *.o $(OBJECTS) *.dSYM *.exe
-
-check: all
-	./serial
-
-include ../../../build/regressions.build
-CFLAGS+=-D_GNU_SOURCE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_bitmap/validate/serial.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_bitmap/validate/serial.c b/lib/ck/regressions/ck_bitmap/validate/serial.c
deleted file mode 100644
index ecc5258..0000000
--- a/lib/ck/regressions/ck_bitmap/validate/serial.c
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * Copyright 2012-2014 Samy Al Bahra.
- * Copyright 2012-2014 AppNexus, Inc.
- * Copyright 2012 Shreyas Prasad.
- * Copyright 2014 Paul Khuong.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <ck_bitmap.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "../../common.h"
-
-#ifndef STATIC_LENGTH
-#define STATIC_LENGTH 256
-#endif
-
-static unsigned int length = 256;
-static ck_bitmap_t *g_bits;
-
-static void
-check_iteration(ck_bitmap_t *bits, unsigned int len, bool initial)
-{
-	ck_bitmap_iterator_t iter;
-	unsigned int i = 0, j;
-
-	len += 1;
-	if (initial == true) {
-		if (bits == g_bits)
-			len = length;
-		else
-			len = STATIC_LENGTH;
-	}
-
-	ck_bitmap_iterator_init(&iter, bits);
-	for (j = 0; ck_bitmap_next(bits, &iter, &i) == true; j++) {
-		if (i == j)
-			continue;
-
-		ck_error("[4] ERROR: Expected bit %u, got bit %u\n", j, i);
-	}
-
-	if (j != len) {
-		ck_error("[5] ERROR: Expected length %u, got length %u\n", len, j);
-	}
-
-	return;
-}
-
-static void
-test(ck_bitmap_t *bits, unsigned int n_length, bool initial)
-{
-	bool r;
-	unsigned int i;
-	CK_BITMAP_INSTANCE(8) u;
-
-	CK_BITMAP_INIT(&u, 8, false);
-	CK_BITMAP_SET(&u, 1);
-	CK_BITMAP_SET(&u, 4);
-
-	for (i = 0; i < n_length; i++) {
-		if (ck_bitmap_test(bits, i) == !initial) {
-			ck_error("[0] ERROR [%u]: Expected %u got %u\n", i,
-				initial, !initial);
-		}
-	}
-
-	for (i = 0; i < n_length; i++) {
-		ck_bitmap_set(bits, i);
-		if (ck_bitmap_test(bits, i) == false) {
-			ck_error("[1] ERROR: Expected bit to be set: %u\n", i);
-		}
-
-		ck_bitmap_reset(bits, i);
-		if (ck_bitmap_test(bits, i) == true) {
-			ck_error("[2] ERROR: Expected bit to be cleared: %u\n", i);
-		}
-
-		r = ck_bitmap_bts(bits, i);
-		if (r == true) {
-			ck_error("[3] ERROR: Expected bit to be cleared before 1st bts: %u\n", i);
-		}
-		if (ck_bitmap_test(bits, i) == false) {
-			ck_error("[4] ERROR: Expected bit to be set: %u\n", i);
-		}
-		r = ck_bitmap_bts(bits, i);
-		if (r == false) {
-			ck_error("[5] ERROR: Expected bit to be set before 2nd bts: %u\n", i);
-		}
-		if (ck_bitmap_test(bits, i) == false) {
-			ck_error("[6] ERROR: Expected bit to be set: %u\n", i);
-		}
-
-		ck_bitmap_reset(bits, i);
-		if (ck_bitmap_test(bits, i) == true) {
-			ck_error("[7] ERROR: Expected bit to be cleared: %u\n", i);
-		}
-
-		ck_bitmap_set(bits, i);
-		if (ck_bitmap_test(bits, i) == false) {
-			ck_error("[8] ERROR: Expected bit to be set: %u\n", i);
-		}
-
-		check_iteration(bits, i, initial);
-	}
-
-	for (i = 0; i < n_length; i++) {
-		if (ck_bitmap_test(bits, i) == false) {
-			ck_error("[9] ERROR: Expected bit to be set: %u\n", i);
-		}
-	}
-
-	ck_bitmap_clear(bits);
-
-	for (i = 0; i < n_length; i++) {
-		if (ck_bitmap_test(bits, i) == true) {
-			ck_error("[10] ERROR: Expected bit to be reset: %u\n", i);
-		}
-	}
-
-	ck_bitmap_union(bits, CK_BITMAP(&u));
-	if (ck_bitmap_test(bits, 1) == false ||
-	    ck_bitmap_test(bits, 4) == false) {
-		ck_error("ERROR: Expected union semantics.\n");
-	}
-
-	return;
-}
-
-static void
-test_init(bool init)
-{
-	ck_bitmap_t *bitmap;
-	size_t bytes;
-	unsigned int i;
-
-	bytes = ck_bitmap_size(length);
-	bitmap = malloc(bytes);
-	memset(bitmap, random(), bytes);
-
-	ck_bitmap_init(bitmap, length, init);
-
-	if (ck_bitmap_bits(bitmap) != length) {
-		ck_error("ERROR: Expected length %u got %u\n",
-		    length, ck_bitmap_bits(bitmap));
-	}
-
-	for (i = 0; i < length; i++) {
-		if (ck_bitmap_test(bitmap, i) != init) {
-			ck_error("ERROR: Expected bit %i at index %u, got %i\n",
-			    (int)init, i, (int)(!init));
-		}
-	}
-
-	free(bitmap);
-}
-
-static ck_bitmap_t *
-random_init(void)
-{
-	ck_bitmap_t *bitmap;
-	unsigned int i;
-
-	bitmap = malloc(ck_bitmap_size(length));
-	ck_bitmap_init(bitmap, length, false);
-
-	for (i = 0; i < length; i++) {
-		if (random() & 1) {
-			ck_bitmap_set(bitmap, i);
-		}
-	}
-
-	return bitmap;
-}
-
-static ck_bitmap_t *
-copy(const ck_bitmap_t *src)
-{
-	ck_bitmap_t *bitmap;
-	size_t bytes = ck_bitmap_size(ck_bitmap_bits(src));
-
-	bitmap = malloc(bytes);
-	memcpy(bitmap, src, bytes);
-	return bitmap;
-}
-
-static void
-test_counts(const ck_bitmap_t *x, const ck_bitmap_t *y)
-{
-	unsigned int count = 0;
-	unsigned int count_intersect = 0;
-	unsigned int i;
-
-	for (i = 0; i <= length * 2; i++) {
-		unsigned actual_limit = i;
-		unsigned int r;
-		bool check;
-
-		if (actual_limit > ck_bitmap_bits(x))
-			actual_limit = ck_bitmap_bits(x);
-
-		check = ck_bitmap_empty(x, i);
-		if (check != (count == 0)) {
-			ck_error("ck_bitmap_empty(%u): got %i expected %i\n",
-			    i, (int)check, (int)(count == 0));
-		}
-
-		check = ck_bitmap_full(x, i);
-		if (check != (count == actual_limit)) {
-			ck_error("ck_bitmap_full(%u): got %i expected %i\n",
-			    i, (int)check, (int)(count == i));
-		}
-
-		r = ck_bitmap_count(x, i);
-		if (r != count) {
-			ck_error("ck_bitmap_count(%u): got %u expected %u\n",
-			    i, r, count);
-		}
-
-		r = ck_bitmap_count_intersect(x, y, i);
-		if (r != count_intersect) {
-			ck_error("ck_bitmap_count_intersect(%u): got %u expected %u\n",
-			    i, r, count_intersect);
-		}
-
-		if (i < length) {
-			count += ck_bitmap_test(x, i);
-			count_intersect += ck_bitmap_test(x, i) & ck_bitmap_test(y, i);
-		}
-	}
-}
-
-static void
-random_test(unsigned int seed)
-{
-	ck_bitmap_t *x, *x_copy, *y;
-	unsigned int i;
-
-	srandom(seed);
-
-	test_init(false);
-	test_init(true);
-
-	x = random_init();
-	y = random_init();
-
-#define TEST(routine, expected) do {					\
-		x_copy = copy(x);					\
-		routine(x_copy, y);					\
-		for (i = 0; i < length; i++) {				\
-			bool xi = ck_bitmap_test(x, i);			\
-			bool yi = ck_bitmap_test(y, i);			\
-			bool ri = ck_bitmap_test(x_copy, i);		\
-			bool wanted = expected(xi, yi);			\
-									\
-			if (ri != wanted) {				\
-				ck_error("In " #routine " at %u: "	\
-				    "got %i expected %i\n",		\
-				    i, ri, wanted);			\
-			}						\
-		}							\
-		free(x_copy);						\
-	} while (0)
-
-#define OR(x, y) (x | y)
-#define AND(x, y) (x & y)
-#define ANDC2(x, y) (x & (~y))
-
-	TEST(ck_bitmap_union, OR);
-	TEST(ck_bitmap_intersection, AND);
-	TEST(ck_bitmap_intersection_negate, ANDC2);
-
-#undef ANDC2
-#undef AND
-#undef OR
-#undef TEST
-
-	test_counts(x, y);
-
-	for (i = 0; i < 4; i++) {
-		ck_bitmap_init(x, length, i & 1);
-		ck_bitmap_init(y, length, i >> 1);
-		test_counts(x, y);
-	}
-
-	free(y);
-	free(x);
-}
-
-int
-main(int argc, char *argv[])
-{
-	unsigned int bytes, base;
-	size_t i, j;
-
-	if (argc >= 2) {
-		length = atoi(argv[1]);
-	}
-
-	base = ck_bitmap_base(length);
-	bytes = ck_bitmap_size(length);
-	fprintf(stderr, "Configuration: %u bytes\n",
-	    bytes);
-
-	g_bits = malloc(bytes);
-	memset(g_bits->map, 0xFF, base);
-	ck_bitmap_init(g_bits, length, false);
-	test(g_bits, length, false);
-
-	memset(g_bits->map, 0x00, base);
-	ck_bitmap_init(g_bits, length, true);
-	test(g_bits, length, true);
-
-	ck_bitmap_test(g_bits, length - 1);
-
-	CK_BITMAP_INSTANCE(STATIC_LENGTH) sb;
-	fprintf(stderr, "Static configuration: %zu bytes\n",
-	    sizeof(sb));
-	memset(CK_BITMAP_BUFFER(&sb), 0xFF, ck_bitmap_base(STATIC_LENGTH));
-	CK_BITMAP_INIT(&sb, STATIC_LENGTH, false);
-	test(CK_BITMAP(&sb), STATIC_LENGTH, false);
-	memset(CK_BITMAP_BUFFER(&sb), 0x00, ck_bitmap_base(STATIC_LENGTH));
-	CK_BITMAP_INIT(&sb, STATIC_LENGTH, true);
-	test(CK_BITMAP(&sb), STATIC_LENGTH, true);
-
-	CK_BITMAP_CLEAR(&sb);
-	if (CK_BITMAP_TEST(&sb, 1) == true) {
-		ck_error("ERROR: Expected bit to be reset.\n");
-	}
-
-	CK_BITMAP_SET(&sb, 1);
-	if (CK_BITMAP_TEST(&sb, 1) == false) {
-		ck_error("ERROR: Expected bit to be set.\n");
-	}
-
-	CK_BITMAP_RESET(&sb, 1);
-	if (CK_BITMAP_TEST(&sb, 1) == true) {
-		ck_error("ERROR: Expected bit to be reset.\n");
-	}
-
-	for (i = 0; i < 4 * sizeof(unsigned int) * CHAR_BIT; i++) {
-		length = i;
-		for (j = 0; j < 10; j++) {
-			random_test(i * 10 + j);
-		}
-	}
-
-	return 0;
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_brlock/benchmark/Makefile
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_brlock/benchmark/Makefile b/lib/ck/regressions/ck_brlock/benchmark/Makefile
deleted file mode 100644
index cd12e7c..0000000
--- a/lib/ck/regressions/ck_brlock/benchmark/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-.PHONY: clean distribution
-
-OBJECTS=latency throughput
-
-all: $(OBJECTS)
-
-latency: latency.c ../../../include/ck_brlock.h
-	$(CC) $(CFLAGS) -o latency latency.c
-
-throughput: throughput.c ../../../include/ck_brlock.h
-	$(CC) $(CFLAGS) -o throughput throughput.c
-
-clean:
-	rm -rf *.dSYM *.exe *~ *.o $(OBJECTS)
-
-include ../../../build/regressions.build
-CFLAGS+=$(PTHREAD_CFLAGS) -D_GNU_SOURCE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_brlock/benchmark/latency.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_brlock/benchmark/latency.c b/lib/ck/regressions/ck_brlock/benchmark/latency.c
deleted file mode 100644
index 9360c4b..0000000
--- a/lib/ck/regressions/ck_brlock/benchmark/latency.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <ck_brlock.h>
-#include <ck_rwlock.h>
-#include <inttypes.h>
-#include <stdio.h>
-
-#include "../../common.h"
-
-#ifndef STEPS
-#define STEPS 1000000
-#endif
-
-int
-main(void)
-{
-	uint64_t s_b, e_b, i;
-	ck_brlock_t brlock = CK_BRLOCK_INITIALIZER;
-	ck_brlock_reader_t r[8];
-	ck_rwlock_t naive;
-
-	for (i = 0; i < sizeof(r) / sizeof(*r); i++)
-		ck_brlock_read_register(&brlock, &r[i]);
-
-	for (i = 0; i < STEPS; i++) {
-		ck_brlock_write_lock(&brlock);
-		ck_brlock_write_unlock(&brlock);
-	}
-
-	s_b = rdtsc();
-	for (i = 0; i < STEPS; i++) {
-		ck_brlock_write_lock(&brlock);
-		ck_brlock_write_unlock(&brlock);
-	}
-	e_b = rdtsc();
-	printf("WRITE: brlock   %15" PRIu64 "\n", (e_b - s_b) / STEPS);
-
-	ck_rwlock_init(&naive);
-	for (i = 0; i < STEPS; i++) {
-		ck_rwlock_write_lock(&naive);
-		ck_rwlock_write_unlock(&naive);
-	}
-
-	s_b = rdtsc();
-	for (i = 0; i < STEPS; i++) {
-		ck_rwlock_write_lock(&naive);
-		ck_rwlock_write_unlock(&naive);
-	}
-	e_b = rdtsc();
-	printf("WRITE: naive    %15" PRIu64 "\n", (e_b - s_b) / STEPS);
-
-	for (i = 0; i < STEPS; i++) {
-		ck_brlock_read_lock(&brlock, &r[0]);
-		ck_brlock_read_unlock(&r[0]);
-	}
-	s_b = rdtsc();
-	for (i = 0; i < STEPS; i++) {
-		ck_brlock_read_lock(&brlock, &r[0]);
-		ck_brlock_read_unlock(&r[0]);
-	}
-	e_b = rdtsc();
-	printf("READ:  brlock   %15" PRIu64 "\n", (e_b - s_b) / STEPS);
-
-	for (i = 0; i < STEPS; i++) {
-		ck_rwlock_read_lock(&naive);
-		ck_rwlock_read_unlock(&naive);
-	}
-
-	s_b = rdtsc();
-	for (i = 0; i < STEPS; i++) {
-		ck_rwlock_read_lock(&naive);
-		ck_rwlock_read_unlock(&naive);
-	}
-	e_b = rdtsc();
-	printf("READ:  naive    %15" PRIu64 "\n", (e_b - s_b) / STEPS);
-
-	return (0);
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_brlock/benchmark/throughput.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_brlock/benchmark/throughput.c b/lib/ck/regressions/ck_brlock/benchmark/throughput.c
deleted file mode 100644
index a4d324e..0000000
--- a/lib/ck/regressions/ck_brlock/benchmark/throughput.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <ck_brlock.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "../../common.h"
-
-#ifndef STEPS
-#define STEPS 1000000
-#endif
-
-static int barrier;
-static int threads;
-static unsigned int flag CK_CC_CACHELINE;
-static ck_brlock_t brlock = CK_BRLOCK_INITIALIZER;
-static struct affinity affinity;
-
-static void *
-thread_brlock(void *pun)
-{
-	uint64_t s_b, e_b, a, i;
-	ck_brlock_reader_t r;
-	uint64_t *value = pun;
-
-	if (aff_iterate(&affinity) != 0) {
-		perror("ERROR: Could not affine thread");
-		exit(EXIT_FAILURE);
-	}
-
-	ck_brlock_read_register(&brlock, &r);
-	ck_pr_inc_int(&barrier);
-	while (ck_pr_load_int(&barrier) != threads)
-		ck_pr_stall();
-
-	for (i = 1, a = 0;; i++) {
-		s_b = rdtsc();
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		ck_brlock_read_lock(&brlock, &r);
-		ck_brlock_read_unlock(&r);
-		e_b = rdtsc();
-
-		a += (e_b - s_b) >> 4;
-
-		if (ck_pr_load_uint(&flag) == 1)
-			break;
-	}
-
-	ck_pr_inc_int(&barrier);
-	while (ck_pr_load_int(&barrier) != threads * 2)
-		ck_pr_stall();
-
-	*value = (a / i);
-	return NULL;
-}
-
-int
-main(int argc, char *argv[])
-{
-	int t;
-	pthread_t *p;
-	uint64_t *latency;
-
-	if (argc != 3) {
-		ck_error("Usage: throughput <delta> <threads>\n");
-	}
-
-	threads = atoi(argv[2]);
-	if (threads <= 0) {
-		ck_error("ERROR: Threads must be a value > 0.\n");
-	}
-
-	p = malloc(sizeof(pthread_t) * threads);
-	if (p == NULL) {
-		ck_error("ERROR: Failed to initialize thread.\n");
-	}
-
-	latency = malloc(sizeof(uint64_t) * threads);
-	if (latency == NULL) {
-		ck_error("ERROR: Failed to create latency buffer.\n");
-	}
-
-	affinity.delta = atoi(argv[1]);
-	affinity.request = 0;
-
-	fprintf(stderr, "Creating threads (brlock)...");
-	for (t = 0; t < threads; t++) {
-		if (pthread_create(&p[t], NULL, thread_brlock, latency + t) != 0) {
-			ck_error("ERROR: Could not create thread %d\n", t);
-		}
-	}
-	fprintf(stderr, "done\n");
-
-	common_sleep(10);
-	ck_pr_store_uint(&flag, 1);
-
-	fprintf(stderr, "Waiting for threads to finish acquisition regression...");
-	for (t = 0; t < threads; t++)
-		pthread_join(p[t], NULL);
-	fprintf(stderr, "done\n\n");
-
-	for (t = 1; t <= threads; t++)
-		printf("%10u %20" PRIu64 "\n", t, latency[t - 1]);
-
-	return (0);
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_brlock/validate/Makefile
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_brlock/validate/Makefile b/lib/ck/regressions/ck_brlock/validate/Makefile
deleted file mode 100644
index 3a49c43..0000000
--- a/lib/ck/regressions/ck_brlock/validate/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-.PHONY: check clean distribution
-
-OBJECTS=validate
-
-all: $(OBJECTS)
-
-validate: validate.c ../../../include/ck_brlock.h
-	$(CC) $(CFLAGS) -o validate validate.c
-
-check: all
-	./validate $(CORES) 1
-
-clean:
-	rm -rf *.dSYM *.exe *~ *.o $(OBJECTS)
-
-include ../../../build/regressions.build
-CFLAGS+=$(PTHREAD_CFLAGS) -D_GNU_SOURCE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_brlock/validate/validate.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_brlock/validate/validate.c b/lib/ck/regressions/ck_brlock/validate/validate.c
deleted file mode 100644
index 810a1bd..0000000
--- a/lib/ck/regressions/ck_brlock/validate/validate.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <errno.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <math.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#include <ck_pr.h>
-#include <ck_brlock.h>
-
-#include "../../common.h"
-
-#ifndef ITERATE
-#define ITERATE 1000000
-#endif
-
-static struct affinity a;
-static unsigned int locked = 0;
-static int nthr;
-static ck_brlock_t lock = CK_BRLOCK_INITIALIZER;
-
-static void *
-thread(void *null CK_CC_UNUSED)
-{
-	ck_brlock_reader_t r;
-	int i = ITERATE;
-	unsigned int l;
-
-        if (aff_iterate(&a)) {
-                perror("ERROR: Could not affine thread");
-                exit(EXIT_FAILURE);
-        }
-
-	ck_brlock_read_register(&lock, &r);
-
-	while (i--) {
-		ck_brlock_write_lock(&lock);
-		{
-			l = ck_pr_load_uint(&locked);
-			if (l != 0) {
-				ck_error("ERROR [WR:%d]: %u != 0\n", __LINE__, l);
-			}
-
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-
-			l = ck_pr_load_uint(&locked);
-			if (l != 8) {
-				ck_error("ERROR [WR:%d]: %u != 2\n", __LINE__, l);
-			}
-
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-
-			l = ck_pr_load_uint(&locked);
-			if (l != 0) {
-				ck_error("ERROR [WR:%d]: %u != 0\n", __LINE__, l);
-			}
-		}
-		ck_brlock_write_unlock(&lock);
-
-		ck_brlock_read_lock(&lock, &r);
-		{
-			l = ck_pr_load_uint(&locked);
-			if (l != 0) {
-				ck_error("ERROR [RD:%d]: %u != 0\n", __LINE__, l);
-			}
-		}
-		ck_brlock_read_unlock(&r);
-	}
-
-	ck_brlock_read_unregister(&lock, &r);
-	return (NULL);
-}
-
-int
-main(int argc, char *argv[])
-{
-	pthread_t *threads;
-	int i;
-
-	if (argc != 3) {
-		ck_error("Usage: validate <number of threads> <affinity delta>\n");
-	}
-
-	nthr = atoi(argv[1]);
-	if (nthr <= 0) {
-		ck_error("ERROR: Number of threads must be greater than 0\n");
-	}
-
-	threads = malloc(sizeof(pthread_t) * nthr);
-	if (threads == NULL) {
-		ck_error("ERROR: Could not allocate thread structures\n");
-	}
-
-	a.delta = atoi(argv[2]);
-
-	fprintf(stderr, "Creating threads (mutual exclusion)...");
-	for (i = 0; i < nthr; i++) {
-		if (pthread_create(&threads[i], NULL, thread, NULL)) {
-			ck_error("ERROR: Could not create thread %d\n", i);
-		}
-	}
-	fprintf(stderr, "done\n");
-
-	fprintf(stderr, "Waiting for threads to finish correctness regression...");
-	for (i = 0; i < nthr; i++)
-		pthread_join(threads[i], NULL);
-	fprintf(stderr, "done (passed)\n");
-
-	return (0);
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_bytelock/benchmark/Makefile
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_bytelock/benchmark/Makefile b/lib/ck/regressions/ck_bytelock/benchmark/Makefile
deleted file mode 100644
index c819099..0000000
--- a/lib/ck/regressions/ck_bytelock/benchmark/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-.PHONY: clean distribution
-
-OBJECTS=latency
-
-all: $(OBJECTS)
-
-latency: latency.c
-	$(CC) $(CFLAGS) -o latency latency.c
-
-clean:
-	rm -rf *.dSYM *.exe *~ *.o $(OBJECTS)
-
-include ../../../build/regressions.build
-CFLAGS+=$(PTHREAD_CFLAGS) -D_GNU_SOURCE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_bytelock/benchmark/latency.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_bytelock/benchmark/latency.c b/lib/ck/regressions/ck_bytelock/benchmark/latency.c
deleted file mode 100644
index 38a3fc9..0000000
--- a/lib/ck/regressions/ck_bytelock/benchmark/latency.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <ck_bytelock.h>
-#include <ck_rwlock.h>
-#include <inttypes.h>
-#include <stdio.h>
-
-#include "../../common.h"
-
-#ifndef STEPS
-#define STEPS 1000000
-#endif
-
-int
-main(void)
-{
-	uint64_t s_b, e_b, i;
-	ck_bytelock_t bytelock = CK_BYTELOCK_INITIALIZER;
-	ck_rwlock_t naive;
-
-	for (i = 0; i < STEPS; i++) {
-		ck_bytelock_write_lock(&bytelock, 1);
-		ck_bytelock_write_unlock(&bytelock);
-	}
-
-	s_b = rdtsc();
-	for (i = 0; i < STEPS; i++) {
-		ck_bytelock_write_lock(&bytelock, 1);
-		ck_bytelock_write_unlock(&bytelock);
-	}
-	e_b = rdtsc();
-	printf("WRITE: bytelock %15" PRIu64 "\n", (e_b - s_b) / STEPS);
-
-	ck_rwlock_init(&naive);
-	for (i = 0; i < STEPS; i++) {
-		ck_rwlock_write_lock(&naive);
-		ck_rwlock_write_unlock(&naive);
-	}
-
-	s_b = rdtsc();
-	for (i = 0; i < STEPS; i++) {
-		ck_rwlock_write_lock(&naive);
-		ck_rwlock_write_unlock(&naive);
-	}
-	e_b = rdtsc();
-	printf("WRITE: naive    %15" PRIu64 "\n", (e_b - s_b) / STEPS);
-
-	for (i = 0; i < STEPS; i++) {
-		ck_bytelock_read_lock(&bytelock, 1);
-		ck_bytelock_read_unlock(&bytelock, 1);
-	}
-	s_b = rdtsc();
-	for (i = 0; i < STEPS; i++) {
-		ck_bytelock_read_lock(&bytelock, 1);
-		ck_bytelock_read_unlock(&bytelock, 1);
-	}
-	e_b = rdtsc();
-	printf("READ:  bytelock %15" PRIu64 "\n", (e_b - s_b) / STEPS);
-
-	for (i = 0; i < STEPS; i++) {
-		ck_rwlock_read_lock(&naive);
-		ck_rwlock_read_unlock(&naive);
-	}
-
-	s_b = rdtsc();
-	for (i = 0; i < STEPS; i++) {
-		ck_rwlock_read_lock(&naive);
-		ck_rwlock_read_unlock(&naive);
-	}
-	e_b = rdtsc();
-	printf("READ:  naive    %15" PRIu64 "\n", (e_b - s_b) / STEPS);
-
-	return (0);
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_bytelock/validate/Makefile
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_bytelock/validate/Makefile b/lib/ck/regressions/ck_bytelock/validate/Makefile
deleted file mode 100644
index 2a890e0..0000000
--- a/lib/ck/regressions/ck_bytelock/validate/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-.PHONY: check clean distribution
-
-OBJECTS=validate
-
-all: $(OBJECTS)
-
-validate: validate.c ../../../include/ck_bytelock.h
-	$(CC) $(CFLAGS) -o validate validate.c
-
-check: all
-	./validate $(CORES) 1
-
-clean:
-	rm -rf *.dSYM *.exe *~ *.o $(OBJECTS)
-
-include ../../../build/regressions.build
-CFLAGS+=$(PTHREAD_CFLAGS) -D_GNU_SOURCE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_bytelock/validate/validate.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_bytelock/validate/validate.c b/lib/ck/regressions/ck_bytelock/validate/validate.c
deleted file mode 100644
index 34d7bed..0000000
--- a/lib/ck/regressions/ck_bytelock/validate/validate.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright 2011-2014 Samy Al Bahra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <errno.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <math.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#include <ck_pr.h>
-#include <ck_bytelock.h>
-
-#include "../../common.h"
-
-#ifndef ITERATE
-#define ITERATE 5000000
-#endif
-
-struct block {
-	unsigned int tid;
-};
-
-static struct affinity a;
-static unsigned int locked = 0;
-static int nthr;
-static ck_bytelock_t lock CK_CC_CACHELINE = CK_BYTELOCK_INITIALIZER;
-
-static void *
-thread(void *null)
-{
-	struct block *context = null;
-	int i = ITERATE;
-	unsigned int l;
-
-        if (aff_iterate(&a)) {
-                perror("ERROR: Could not affine thread");
-                exit(EXIT_FAILURE);
-        }
-
-	if (context->tid == (unsigned int)nthr - 1)
-		context->tid = sizeof(lock.readers) + 1;
-
-	while (i--) {
-		ck_bytelock_write_lock(&lock, context->tid);
-		{
-			l = ck_pr_load_uint(&locked);
-			if (l != 0) {
-				ck_error("ERROR [WR:%d]: %u != 0\n", __LINE__, l);
-			}
-
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-			ck_pr_inc_uint(&locked);
-
-			l = ck_pr_load_uint(&locked);
-			if (l != 8) {
-				ck_error("ERROR [WR:%d]: %u != 2\n", __LINE__, l);
-			}
-
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-			ck_pr_dec_uint(&locked);
-
-			l = ck_pr_load_uint(&locked);
-			if (l != 0) {
-				ck_error("ERROR [WR:%d]: %u != 0\n", __LINE__, l);
-			}
-		}
-		ck_bytelock_write_unlock(&lock);
-
-		ck_bytelock_read_lock(&lock, context->tid);
-		{
-			l = ck_pr_load_uint(&locked);
-			if (l != 0) {
-				ck_error("ERROR [RD:%d]: %u != 0\n", __LINE__, l);
-			}
-		}
-		ck_bytelock_read_unlock(&lock, context->tid);
-	}
-
-	return (NULL);
-}
-
-int
-main(int argc, char *argv[])
-{
-	pthread_t *threads;
-	struct block *context;
-	int i;
-
-	if (argc != 3) {
-		ck_error("Usage: correct <number of threads> <affinity delta>\n");
-	}
-
-	nthr = atoi(argv[1]);
-	if (nthr <= 0) {
-		ck_error("ERROR: Number of threads must be greater than 0\n");
-	}
-
-	threads = malloc(sizeof(pthread_t) * nthr);
-	if (threads == NULL) {
-		ck_error("ERROR: Could not allocate thread structures\n");
-	}
-
-	context = malloc(sizeof(struct block) * nthr);
-	if (context == NULL) {
-		ck_error("ERROR: Could not allocate thread contexts\n");
-	}
-
-	a.delta = atoi(argv[2]);
-
-	fprintf(stderr, "Creating threads (mutual exclusion)...");
-	for (i = 0; i < nthr; i++) {
-		context[i].tid = i + 1;
-		if (pthread_create(&threads[i], NULL, thread, context + i)) {
-			ck_error("ERROR: Could not create thread %d\n", i);
-		}
-	}
-	fprintf(stderr, "done\n");
-
-	fprintf(stderr, "Waiting for threads to finish correctness regression...");
-	for (i = 0; i < nthr; i++)
-		pthread_join(threads[i], NULL);
-	fprintf(stderr, "done (passed)\n");
-
-	return (0);
-}
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_cohort/benchmark/Makefile
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_cohort/benchmark/Makefile b/lib/ck/regressions/ck_cohort/benchmark/Makefile
deleted file mode 100644
index 6af18b9..0000000
--- a/lib/ck/regressions/ck_cohort/benchmark/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-.PHONY: all clean
-
-OBJECTS=ck_cohort.THROUGHPUT ck_cohort.LATENCY
-
-all: $(OBJECTS)
-
-ck_cohort.THROUGHPUT: ck_cohort.c
-	$(CC) $(CFLAGS) -o ck_cohort.THROUGHPUT throughput.c -lm
-
-ck_cohort.LATENCY: ck_cohort.c
-	$(CC) -DLATENCY $(CFLAGS) -o ck_cohort.LATENCY ck_cohort.c
-
-clean:
-	rm -rf *.dSYM *.exe $(OBJECTS)
-
-include ../../../build/regressions.build
-CFLAGS+=$(PTHREAD_CFLAGS) -D_GNU_SOURCE -lm

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_cohort/benchmark/ck_cohort.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_cohort/benchmark/ck_cohort.c b/lib/ck/regressions/ck_cohort/benchmark/ck_cohort.c
deleted file mode 100644
index 954b616..0000000
--- a/lib/ck/regressions/ck_cohort/benchmark/ck_cohort.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "../ck_cohort.h"
-
-#include <ck_cohort.h>
-#ifdef THROUGHPUT
-#include "../../ck_spinlock/benchmark/throughput.h"
-#elif defined(LATENCY)
-#include "../../ck_spinlock/benchmark/latency.h"
-#endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_cohort/benchmark/throughput.c
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_cohort/benchmark/throughput.c b/lib/ck/regressions/ck_cohort/benchmark/throughput.c
deleted file mode 100644
index 6c3833c..0000000
--- a/lib/ck/regressions/ck_cohort/benchmark/throughput.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright 2013-2014 Samy Al Bahra.
- * Copyright 2013 Brendon Scheinman.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <errno.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <math.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#include <ck_pr.h>
-#include <ck_cohort.h>
-#include <ck_md.h>
-#include <ck_spinlock.h>
-
-#include "../../common.h"
-
-#define max(x, y) (((x) > (y)) ? (x) : (y))
-
-static struct affinity a;
-static unsigned int ready;
-
-struct counters {
-	uint64_t value;
-} CK_CC_CACHELINE;
-
-static struct counters *count;
-static uint64_t nthr;
-static unsigned int n_cohorts;
-static unsigned int barrier;
-static int critical CK_CC_CACHELINE;
-
-static void
-ck_spinlock_fas_lock_with_context(ck_spinlock_fas_t *lock, void *context)
-{
-
-	(void)context;
-	ck_spinlock_fas_lock(lock);
-	return;
-}
-
-static void
-ck_spinlock_fas_unlock_with_context(ck_spinlock_fas_t *lock, void *context)
-{
-
-	(void)context;
-	ck_spinlock_fas_unlock(lock);
-	return;
-}
-
-static bool
-ck_spinlock_fas_locked_with_context(ck_spinlock_fas_t *lock, void *context)
-{
-
-	(void)context;
-	return ck_spinlock_fas_locked(lock);
-}
-
-CK_COHORT_PROTOTYPE(basic,
-    ck_spinlock_fas_lock_with_context, ck_spinlock_fas_unlock_with_context, ck_spinlock_fas_locked_with_context,
-    ck_spinlock_fas_lock_with_context, ck_spinlock_fas_unlock_with_context, ck_spinlock_fas_locked_with_context)
-
-struct cohort_record {
-	CK_COHORT_INSTANCE(basic) cohort;
-} CK_CC_CACHELINE;
-static struct cohort_record *cohorts;
-
-static ck_spinlock_t global_lock = CK_SPINLOCK_INITIALIZER;
-
-struct block {
-	unsigned int tid;
-};
-
-static void *
-fairness(void *null)
-{
-	struct block *context = null;
-	unsigned int i = context->tid;
-	volatile int j;
-	long int base;
-	unsigned int core;
-	CK_COHORT_INSTANCE(basic) *cohort;
-
-
-	if (aff_iterate_core(&a, &core)) {
-		perror("ERROR: Could not affine thread");
-		exit(EXIT_FAILURE);
-	}
-
-	cohort = &((cohorts + (core / (int)(a.delta)) % n_cohorts)->cohort);
-
-	while (ck_pr_load_uint(&ready) == 0);
-
-	ck_pr_inc_uint(&barrier);
-	while (ck_pr_load_uint(&barrier) != nthr);
-
-	while (ready) {
-		CK_COHORT_LOCK(basic, cohort, NULL, NULL);
-
-		count[i].value++;
-		if (critical) {
-			base = common_lrand48() % critical;
-			for (j = 0; j < base; j++);
-		}
-
-		CK_COHORT_UNLOCK(basic, cohort, NULL, NULL);
-	}
-
-	return NULL;
-}
-
-int
-main(int argc, char *argv[])
-{
-	uint64_t v, d;
-	unsigned int i;
-	pthread_t *threads;
-	struct block *context;
-	ck_spinlock_t *local_lock;
-
-	if (argc != 5) {
-		ck_error("Usage: ck_cohort <number of cohorts> <threads per cohort> "
-			"<affinity delta> <critical section>\n");
-	}
-
-	n_cohorts = atoi(argv[1]);
-	if (n_cohorts <= 0) {
-		ck_error("ERROR: Number of cohorts must be greater than 0\n");
-	}
-
-	nthr = n_cohorts * atoi(argv[2]);
-	if (nthr <= 0) {
-		ck_error("ERROR: Number of threads must be greater than 0\n");
-	}
-
-	critical = atoi(argv[4]);
-	if (critical < 0) {
-		ck_error("ERROR: critical section cannot be negative\n");
-	}
-
-	threads = malloc(sizeof(pthread_t) * nthr);
-	if (threads == NULL) {
-		ck_error("ERROR: Could not allocate thread structures\n");
-	}
-
-	cohorts = malloc(sizeof(struct cohort_record) * n_cohorts);
-	if (cohorts == NULL) {
-		ck_error("ERROR: Could not allocate cohort structures\n");
-	}
-
-	context = malloc(sizeof(struct block) * nthr);
-	if (context == NULL) {
-		ck_error("ERROR: Could not allocate thread contexts\n");
-	}
-
-	a.delta = atoi(argv[2]);
-	a.request = 0;
-
-	count = malloc(sizeof(*count) * nthr);
-	if (count == NULL) {
-		ck_error("ERROR: Could not create acquisition buffer\n");
-	}
-	memset(count, 0, sizeof(*count) * nthr);
-
-	fprintf(stderr, "Creating cohorts...");
-	for (i = 0 ; i < n_cohorts ; i++) {
-		local_lock = malloc(max(CK_MD_CACHELINE, sizeof(ck_spinlock_t)));
-		if (local_lock == NULL) {
-			ck_error("ERROR: Could not allocate local lock\n");
-		}
-		CK_COHORT_INIT(basic, &((cohorts + i)->cohort), &global_lock, local_lock,
-		    CK_COHORT_DEFAULT_LOCAL_PASS_LIMIT);
-		local_lock = NULL;
-	}
-	fprintf(stderr, "done\n");
-
-	fprintf(stderr, "Creating threads (fairness)...");
-	for (i = 0; i < nthr; i++) {
-		context[i].tid = i;
-		if (pthread_create(&threads[i], NULL, fairness, context + i)) {
-			ck_error("ERROR: Could not create thread %d\n", i);
-		}
-	}
-	fprintf(stderr, "done\n");
-
-	ck_pr_store_uint(&ready, 1);
-	common_sleep(10);
-	ck_pr_store_uint(&ready, 0);
-
-	fprintf(stderr, "Waiting for threads to finish acquisition regression...");
-	for (i = 0; i < nthr; i++)
-		pthread_join(threads[i], NULL);
-	fprintf(stderr, "done\n\n");
-
-	for (i = 0, v = 0; i < nthr; i++) {
-		printf("%d %15" PRIu64 "\n", i, count[i].value);
-		v += count[i].value;
-	}
-
-	printf("\n# total       : %15" PRIu64 "\n", v);
-	printf("# throughput  : %15" PRIu64 " a/s\n", (v /= nthr) / 10);
-
-	for (i = 0, d = 0; i < nthr; i++)
-		d += (count[i].value - v) * (count[i].value - v);
-
-	printf("# average     : %15" PRIu64 "\n", v);
-	printf("# deviation   : %.2f (%.2f%%)\n\n", sqrt(d / nthr), (sqrt(d / nthr) / v) * 100.00);
-
-	return 0;
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_cohort/ck_cohort.h
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_cohort/ck_cohort.h b/lib/ck/regressions/ck_cohort/ck_cohort.h
deleted file mode 100644
index b0d7f0a..0000000
--- a/lib/ck/regressions/ck_cohort/ck_cohort.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#define LOCK_NAME "ck_cohort"
-#define LOCK_DEFINE									\
-	static ck_spinlock_fas_t global_fas_lock = CK_SPINLOCK_FAS_INITIALIZER;		\
-	static ck_spinlock_fas_t local_fas_lock = CK_SPINLOCK_FAS_INITIALIZER;		\
-	static void									\
-	ck_spinlock_fas_lock_with_context(ck_spinlock_fas_t *lock, void *context)	\
-	{										\
-		(void)context;								\
-		ck_spinlock_fas_lock(lock);						\
-	}										\
-											\
-	static void									\
-	ck_spinlock_fas_unlock_with_context(ck_spinlock_fas_t *lock, void *context)	\
-	{										\
-		(void)context;								\
-		ck_spinlock_fas_unlock(lock);						\
-	}										\
-											\
-	static bool									\
-	ck_spinlock_fas_locked_with_context(ck_spinlock_fas_t *lock, void *context)	\
-	{										\
-		(void)context;								\
-		return ck_spinlock_fas_locked(lock);					\
-	}										\
-	CK_COHORT_PROTOTYPE(fas_fas,							\
-	    ck_spinlock_fas_lock_with_context, ck_spinlock_fas_unlock_with_context,	\
-	    ck_spinlock_fas_locked_with_context, ck_spinlock_fas_lock_with_context,	\
-	    ck_spinlock_fas_unlock_with_context, ck_spinlock_fas_locked_with_context)	\
-	static CK_COHORT_INSTANCE(fas_fas) CK_CC_CACHELINE cohort = CK_COHORT_INITIALIZER
-
-
-#define LOCK_INIT CK_COHORT_INIT(fas_fas, &cohort, &global_fas_lock, &local_fas_lock,   \
-	CK_COHORT_DEFAULT_LOCAL_PASS_LIMIT)
-#define LOCK CK_COHORT_LOCK(fas_fas, &cohort, NULL, NULL)
-#define UNLOCK CK_COHORT_UNLOCK(fas_fas, &cohort, NULL, NULL)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/025a4550/lib/ck/regressions/ck_cohort/validate/Makefile
----------------------------------------------------------------------
diff --git a/lib/ck/regressions/ck_cohort/validate/Makefile b/lib/ck/regressions/ck_cohort/validate/Makefile
deleted file mode 100644
index 145af3a..0000000
--- a/lib/ck/regressions/ck_cohort/validate/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-.PHONY: check clean distribution
-
-OBJECTS=validate
-
-all: $(OBJECTS)
-
-validate: validate.c ../../../include/ck_cohort.h
-	$(CC) $(CFLAGS) -o validate validate.c
-
-check: all
-	./validate `expr $(CORES) / 2` 2 1
-
-clean:
-	rm -rf *.dSYM *.exe *~ *.o $(OBJECTS)
-
-include ../../../build/regressions.build
-CFLAGS+=$(PTHREAD_CFLAGS) -D_GNU_SOURCE