Index: libcfa/src/concurrency/clib/cfathread.cfa
===================================================================
--- libcfa/src/concurrency/clib/cfathread.cfa	(revision fcd014321076dc247ecb706b7cb36599e8df00f4)
+++ libcfa/src/concurrency/clib/cfathread.cfa	(revision 05d02c69c8e5526091e4232b523b72f3084c2891)
@@ -105,5 +105,5 @@
 	//--------------------
 	// Thread
-	int cfathread_create( cfathread_t * handle, cfathread_attr_t * attr, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1))) {
+	int cfathread_create( cfathread_t * handle, const cfathread_attr_t * attr, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1))) {
 		cluster * cl = attr ? attr->cl : active_cluster();
 		cfathread_t thrd = alloc();
@@ -120,4 +120,8 @@
 		}
 		return 0;
+	}
+
+	int cfathread_get_errno(void) {
+		return errno;
 	}
 
Index: libcfa/src/concurrency/clib/cfathread.h
===================================================================
--- libcfa/src/concurrency/clib/cfathread.h	(revision fcd014321076dc247ecb706b7cb36599e8df00f4)
+++ libcfa/src/concurrency/clib/cfathread.h	(revision 05d02c69c8e5526091e4232b523b72f3084c2891)
@@ -30,5 +30,5 @@
 	typedef struct cluster * cfathread_cluster_t;
 
-	int cfathread_cluster_create(cfathread_cluster_t * cluster) __attribute__((nonnull(1)));
+	int cfathread_cluster_create(cfathread_cluster_t * cluster);
 	cfathread_cluster_t cfathread_cluster_self(void);
 	int cfathread_cluster_add_worker(cfathread_cluster_t cluster, pthread_t* tid, void (*init_routine) (void *), void * arg);
@@ -43,7 +43,10 @@
 
 	int cfathread_attr_init(cfathread_attr_t * attr) __attribute__((nonnull (1)));
-	static inline int cfathread_attr_destroy(cfathread_attr_t * attr) __attribute__((nonnull (1))) { return 0; }
-	static inline int cfathread_attr_setbackground(cfathread_attr_t * attr, int background) __attribute__((nonnull (1))) { return 0; }
-	static inline int cfathread_attr_setcluster(cfathread_attr_t * attr, cfathread_cluster_t cl) __attribute__((nonnull (1))) { attr->cl = cl; return 0; }
+	static inline int cfathread_attr_destroy(cfathread_attr_t * attr) __attribute__((nonnull (1)));
+	static inline int cfathread_attr_destroy(cfathread_attr_t * attr) { return 0; }
+	static inline int cfathread_attr_setbackground(cfathread_attr_t * attr, int background) __attribute__((nonnull (1)));
+	static inline int cfathread_attr_setbackground(cfathread_attr_t * attr, int background) { return 0; }
+	static inline int cfathread_attr_setcluster(cfathread_attr_t * attr, cfathread_cluster_t cl) __attribute__((nonnull (1)));
+	static inline int cfathread_attr_setcluster(cfathread_attr_t * attr, cfathread_cluster_t cl) { attr->cl = cl; return 0; }
 
 	//--------------------
@@ -52,5 +55,5 @@
 	typedef struct cfathread_object * cfathread_t;
 
-	int cfathread_create( cfathread_t * h, cfathread_attr_t * a, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1)));
+	int cfathread_create( cfathread_t * h, const cfathread_attr_t * a, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1)));
 	int cfathread_join( cfathread_t, void ** retval );
 
