Index: generic/src/proc/scheduler.c
===================================================================
--- generic/src/proc/scheduler.c	(revision e45f81a91d8f7bd44b09c7657c42c53ac63ce7a2)
+++ generic/src/proc/scheduler.c	(revision 0ffa3ef51d117153ad4c8c5fdb3b525ff042ef01)
@@ -350,5 +350,5 @@
 	 */
 	context_save(&CPU->saved_context);
-	context_set(&CPU->saved_context, FADDR(scheduler_separated_stack), (__address) CPU->stack, CPU_STACK_SIZE);
+	context_set(&CPU->saved_context, FADDR(scheduler_separated_stack), (uintptr_t) CPU->stack, CPU_STACK_SIZE);
 	context_restore(&CPU->saved_context);
 	/* not reached */
Index: generic/src/proc/task.c
===================================================================
--- generic/src/proc/task.c	(revision e45f81a91d8f7bd44b09c7657c42c53ac63ce7a2)
+++ generic/src/proc/task.c	(revision 0ffa3ef51d117153ad4c8c5fdb3b525ff042ef01)
@@ -241,5 +241,5 @@
  * @return 0 on success or an error code from @ref errno.h.
  */
-__native sys_task_get_id(task_id_t *uspace_task_id)
+unative_t sys_task_get_id(task_id_t *uspace_task_id)
 {
 	/*
@@ -247,5 +247,5 @@
 	 * remains constant for the lifespan of the task.
 	 */
-	return (__native) copy_to_uspace(uspace_task_id, &TASK->taskid, sizeof(TASK->taskid));
+	return (unative_t) copy_to_uspace(uspace_task_id, &TASK->taskid, sizeof(TASK->taskid));
 }
 
Index: generic/src/proc/thread.c
===================================================================
--- generic/src/proc/thread.c	(revision e45f81a91d8f7bd44b09c7657c42c53ac63ce7a2)
+++ generic/src/proc/thread.c	(revision 0ffa3ef51d117153ad4c8c5fdb3b525ff042ef01)
@@ -91,5 +91,5 @@
 
 SPINLOCK_INITIALIZE(tidlock);
-__u32 last_tid = 0;
+uint32_t last_tid = 0;
 
 static slab_cache_t *thread_slab;
@@ -255,5 +255,5 @@
 
 	spinlock_lock(&threads_lock);
-	btree_remove(&threads_btree, (btree_key_t) ((__address ) t), NULL);
+	btree_remove(&threads_btree, (btree_key_t) ((uintptr_t ) t), NULL);
 	spinlock_unlock(&threads_lock);
 
@@ -300,5 +300,5 @@
 	
 	/* Not needed, but good for debugging */
-	memsetb((__address)t->kstack, THREAD_STACK_SIZE * 1<<STACK_FRAMES, 0);
+	memsetb((uintptr_t)t->kstack, THREAD_STACK_SIZE * 1<<STACK_FRAMES, 0);
 	
 	ipl = interrupts_disable();
@@ -309,5 +309,5 @@
 	
 	context_save(&t->saved_context);
-	context_set(&t->saved_context, FADDR(cushion), (__address) t->kstack, THREAD_STACK_SIZE);
+	context_set(&t->saved_context, FADDR(cushion), (uintptr_t) t->kstack, THREAD_STACK_SIZE);
 	
 	the_initialize((the_t *) t->kstack);
@@ -369,5 +369,5 @@
 	 */
 	spinlock_lock(&threads_lock);
-	btree_insert(&threads_btree, (btree_key_t) ((__address) t), (void *) t, NULL);
+	btree_insert(&threads_btree, (btree_key_t) ((uintptr_t) t), (void *) t, NULL);
 	spinlock_unlock(&threads_lock);
 	
@@ -412,5 +412,5 @@
  *
  */
-void thread_sleep(__u32 sec)
+void thread_sleep(uint32_t sec)
 {
 	thread_usleep(sec*1000000);
@@ -425,5 +425,5 @@
  * @return An error code from errno.h or an error code from synch.h.
  */
-int thread_join_timeout(thread_t *t, __u32 usec, int flags)
+int thread_join_timeout(thread_t *t, uint32_t usec, int flags)
 {
 	ipl_t ipl;
@@ -485,5 +485,5 @@
  *
  */	
-void thread_usleep(__u32 usec)
+void thread_usleep(uint32_t usec)
 {
 	waitq_t wq;
@@ -565,5 +565,5 @@
 	btree_node_t *leaf;
 	
-	return btree_search(&threads_btree, (btree_key_t) ((__address) t), &leaf) != NULL;
+	return btree_search(&threads_btree, (btree_key_t) ((uintptr_t) t), &leaf) != NULL;
 }
 
@@ -571,15 +571,15 @@
  *
  */
-__native sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name)
+unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name)
 {
 	thread_t *t;
 	char namebuf[THREAD_NAME_BUFLEN];
 	uspace_arg_t *kernel_uarg;
-	__u32 tid;
+	uint32_t tid;
 	int rc;
 
 	rc = copy_from_uspace(namebuf, uspace_name, THREAD_NAME_BUFLEN);
 	if (rc != 0)
-		return (__native) rc;
+		return (unative_t) rc;
 
 	kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0);	
@@ -587,5 +587,5 @@
 	if (rc != 0) {
 		free(kernel_uarg);
-		return (__native) rc;
+		return (unative_t) rc;
 	}
 
@@ -593,10 +593,10 @@
 		tid = t->tid;
 		thread_ready(t);
-		return (__native) tid; 
+		return (unative_t) tid; 
 	} else {
 		free(kernel_uarg);
 	}
 
-	return (__native) ENOMEM;
+	return (unative_t) ENOMEM;
 }
 
@@ -604,5 +604,5 @@
  *
  */
-__native sys_thread_exit(int uspace_status)
+unative_t sys_thread_exit(int uspace_status)
 {
 	thread_exit();
