Index: libcfa/src/concurrency/clib/cfathread.cfa
===================================================================
--- libcfa/src/concurrency/clib/cfathread.cfa	(revision 6750bcdb1d630bdf635c4e24461723ed4b53777d)
+++ libcfa/src/concurrency/clib/cfathread.cfa	(revision 6750bcdb1d630bdf635c4e24461723ed4b53777d)
@@ -0,0 +1,66 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// clib/cfathread.cfa --
+//
+// Author           : Thierry Delisle
+// Created On       : Tue Sep 22 15:31:20 2020
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#include "kernel.hfa"
+#include "thread.hfa"
+
+thread CRunner {
+	void (*themain)( CRunner * );
+};
+
+static void ?{}( CRunner & this, void (*themain)( CRunner * ) ) {
+	this.themain = themain;
+}
+
+void main( CRunner & this ) {
+	this.themain( &this );
+}
+
+processor * procs = 0p;
+int proc_cnt = 1;
+
+extern "C" {
+	//--------------------
+	// Basic thread managenemt
+	CRunner * cfathread_create( void (*main)( CRunner * ) ) {
+		return new( main );
+	}
+
+	void cfathread_join( CRunner * thrd ) {
+		delete( thrd );
+	}
+
+	void cfathread_park( void ) {
+		park( __cfaabi_dbg_ctx );
+	}
+
+	void cfathread_unpark( CRunner * thrd ) {
+		unpark( *thrd __cfaabi_dbg_ctx2 );
+	}
+
+	void cfathread_yield( void ) {
+		yield();
+	}
+
+	//--------------------
+	// Basic kernel features
+	void cfathread_setproccnt( int ncnt ) {
+		assert( ncnt >= 1 );
+		adelete(proc_cnt, procs);
+
+		proc_cnt = ncnt - 1;
+		procs = anew(proc_cnt);
+	}
+}
Index: libcfa/src/concurrency/clib/cfathread.h
===================================================================
--- libcfa/src/concurrency/clib/cfathread.h	(revision 6750bcdb1d630bdf635c4e24461723ed4b53777d)
+++ libcfa/src/concurrency/clib/cfathread.h	(revision 6750bcdb1d630bdf635c4e24461723ed4b53777d)
@@ -0,0 +1,43 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// clib/cfathread.h --
+//
+// Author           : Thierry Delisle
+// Created On       : Tue Sep 22 15:31:20 2020
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#include "stddef.h"
+#include "invoke.h"
+
+#if defined(__cforall) || defined(__cpluplus)
+extern "C" {
+#endif
+	//--------------------
+	// Basic types
+	struct cfathread_CRunner_t;
+	typedef struct cfathread_CRunner_t * cfathread_t;
+
+	//--------------------
+	// Basic thread support
+	cfathread_t cfathread_create( void (*main)( cfathread_t ) );
+	void cfathread_join( cfathread_t );
+
+	void cfathread_park( void );
+	void cfathread_unpark( cfathread_t );
+	void cfathread_yield( void );
+
+	//--------------------
+	// Basic kernel features
+	void cfathread_setproccnt( int );
+
+
+#if defined(__cforall) || defined(__cpluplus)
+}
+#endif
