Index: benchmark/benchcltr.hfa
===================================================================
--- benchmark/benchcltr.hfa	(revision 7f6e9eb6acd5e10e763d306d95669568e9d4d8e7)
+++ benchmark/benchcltr.hfa	(revision 5bcdc8cb08e5777cc001219c3ad6a6e0d509fec5)
@@ -22,9 +22,4 @@
 	{"procstat",     no_argument      , 0, 'P'}, \
 	{"viewhalts",    no_argument      , 0, 'V'},
-
-#define BENCH_DECL \
-	double duration = 5; \
-	int nprocs = 1; \
-	int nthreads = 1;
 
 #define BENCH_OPT_CASE \
@@ -60,9 +55,24 @@
 		break;
 
+double duration = 5;
+int nprocs = 1;
+int nthreads = 1;
 bool silent = false;
+bool continuous = false;
 bool procstats = false;
 bool viewhalts = false;
 
+#define BENCH_OPT_CFA \
+	{'d', "duration",  "Duration of the experiments in seconds", duration }, \
+	{'t', "nthreads",  "Number of threads to use", nthreads }, \
+	{'p', "nprocs",    "Number of processors to use", nprocs }, \
+	{'S', "nostats",   "Don't print statistics", silent, parse_settrue }, \
+	{'C', "constats",  "Regularly print statistics", continuous, parse_settrue }, \
+	{'P', "procstat",  "Print statistics for each processors", procstats, parse_settrue }, \
+	{'V', "viewhalts", "Visualize halts, prints timestamp and Processor id for each halt.", viewhalts, parse_settrue },
+
 #ifdef __cforall
+#include <parseargs.hfa>
+
 struct cluster * the_benchmark_cluster = 0p;
 struct BenchCluster {
Index: benchmark/readyQ/yield.cfa
===================================================================
--- benchmark/readyQ/yield.cfa	(revision 7f6e9eb6acd5e10e763d306d95669568e9d4d8e7)
+++ benchmark/readyQ/yield.cfa	(revision 5bcdc8cb08e5777cc001219c3ad6a6e0d509fec5)
@@ -43,31 +43,14 @@
 
 int main(int argc, char * argv[]) {
-	BENCH_DECL
 	unsigned num_io = 1;
 	io_context_params params;
 
-	for(;;) {
-		static struct option options[] = {
-			BENCH_OPT_LONG
-			{0, 0, 0, 0}
-		};
+	cfa_option opt[] = {
+		BENCH_OPT_CFA
+	};
+	int opt_cnt = sizeof(opt) / sizeof(cfa_option);
 
-		int idx = 0;
-		int opt = getopt_long(argc, argv, BENCH_OPT_SHORT, options, &idx);
-
-		const char * arg = optarg ? optarg : "";
-		char * end;
-		switch(opt) {
-			case -1:
-				goto run;
-			BENCH_OPT_CASE
-			default: /* ? */
-				fprintf( stderr, "Unkown option '%c'\n", opt);
-			usage:
-				bench_usage( argv );
-				exit(1);
-		}
-	}
-	run:
+	char **left;
+	parse_args( argc, argv, opt, opt_cnt, "[OPTIONS]...\ncforall yield benchmark", left );
 
 	{
