Index: generic/include/adt/bitmap.h
===================================================================
--- generic/include/adt/bitmap.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/adt/bitmap.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -42,9 +42,9 @@
 
 typedef struct {
-	__u8 *map;
+	uint8_t *map;
 	count_t bits;
 } bitmap_t;
 
-extern void bitmap_initialize(bitmap_t *bitmap, __u8 *map, count_t bits);
+extern void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, count_t bits);
 extern void bitmap_set_range(bitmap_t *bitmap, index_t start, count_t bits);
 extern void bitmap_clear_range(bitmap_t *bitmap, index_t start, count_t bits);
Index: generic/include/adt/btree.h
===================================================================
--- generic/include/adt/btree.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/adt/btree.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -43,5 +43,5 @@
 #define BTREE_MAX_KEYS	(BTREE_M - 1)
 
-typedef __u64 btree_key_t;
+typedef uint64_t btree_key_t;
 
 /** B-tree node structure. */
Index: generic/include/adt/hash_table.h
===================================================================
--- generic/include/adt/hash_table.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/adt/hash_table.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -56,5 +56,5 @@
 	 * @return Index into hash table.
 	 */
-	index_t (* hash)(__native key[]);
+	index_t (* hash)(unative_t key[]);
 	
 	/** Hash table item comparison function.
@@ -64,5 +64,5 @@
 	 * @return true if the keys match, false otherwise.
 	 */
-	bool (*compare)(__native key[], count_t keys, link_t *item);
+	bool (*compare)(unative_t key[], count_t keys, link_t *item);
 
 	/** Hash table item removal callback.
@@ -76,7 +76,7 @@
 
 extern void hash_table_create(hash_table_t *h, count_t m, count_t max_keys, hash_table_operations_t *op);
-extern void hash_table_insert(hash_table_t *h, __native key[], link_t *item);
-extern link_t *hash_table_find(hash_table_t *h, __native key[]);
-extern void hash_table_remove(hash_table_t *h, __native key[], count_t keys);
+extern void hash_table_insert(hash_table_t *h, unative_t key[], link_t *item);
+extern link_t *hash_table_find(hash_table_t *h, unative_t key[]);
+extern void hash_table_remove(hash_table_t *h, unative_t key[], count_t keys);
 
 #endif
Index: generic/include/adt/list.h
===================================================================
--- generic/include/adt/list.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/adt/list.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -176,5 +176,5 @@
 }
 
-#define list_get_instance(link,type,member) (type *)(((__u8*)(link))-((__u8*)&(((type *)NULL)->member)))
+#define list_get_instance(link,type,member) (type *)(((uint8_t*)(link))-((uint8_t*)&(((type *)NULL)->member)))
 
 extern bool list_member(const link_t *link, const link_t *head);
Index: generic/include/bitops.h
===================================================================
--- generic/include/bitops.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/bitops.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -43,5 +43,5 @@
  * If number is zero, it returns 0
  */
-static inline int fnzb32(__u32 arg)
+static inline int fnzb32(uint32_t arg)
 {
 	int n = 0;
@@ -55,10 +55,10 @@
 }
 
-static inline int fnzb64(__u64 arg)
+static inline int fnzb64(uint64_t arg)
 {
 	int n = 0;
 
 	if (arg >> 32) { arg >>= 32;n += 32;}
-	return n + fnzb32((__u32) arg);
+	return n + fnzb32((uint32_t) arg);
 }
 
Index: generic/include/byteorder.h
===================================================================
--- generic/include/byteorder.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/byteorder.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -36,5 +36,5 @@
 #define __BYTEORDER_H__
 
-static inline __u64 __u64_byteorder_swap(__u64 n)
+static inline uint64_t uint64_t_byteorder_swap(uint64_t n)
 {
 	return ((n & 0xff) << 56) |
@@ -48,5 +48,5 @@
 }
 
-static inline __u32 __u32_byteorder_swap(__u32 n)
+static inline uint32_t uint32_t_byteorder_swap(uint32_t n)
 {
 	return ((n & 0xff) << 24) |
Index: generic/include/config.h
===================================================================
--- generic/include/config.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/config.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -47,5 +47,5 @@
 
 typedef struct {
-	__address addr;
+	uintptr_t addr;
 	size_t size;
 } init_task_t;
@@ -60,5 +60,5 @@
 	volatile count_t cpu_active;	/**< Number of processors that are up and running. */
 
-	__address base;
+	uintptr_t base;
 	size_t memory_size;		/**< Size of detected memory in bytes. */
 	size_t kernel_size;		/**< Size of memory in bytes taken by kernel and stack */
Index: generic/include/console/chardev.h
===================================================================
--- generic/include/console/chardev.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/console/chardev.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -60,5 +60,5 @@
 	waitq_t wq;
 	SPINLOCK_DECLARE(lock);		/**< Protects everything below. */
-	__u8 buffer[CHARDEV_BUFLEN];
+	uint8_t buffer[CHARDEV_BUFLEN];
 	count_t counter;
 	chardev_operations_t *op;	/**< Implementation of chardev operations. */
@@ -70,5 +70,5 @@
 			       chardev_t *chardev, 
 			       chardev_operations_t *op);
-extern void chardev_push_character(chardev_t *chardev, __u8 ch);
+extern void chardev_push_character(chardev_t *chardev, uint8_t ch);
 
 #endif /* __CHARDEV_H__ */
Index: generic/include/console/console.h
===================================================================
--- generic/include/console/console.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/console/console.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -42,6 +42,6 @@
 extern chardev_t *stdout;
 
-extern __u8 getc(chardev_t *chardev);
-__u8 _getc(chardev_t *chardev);
+extern uint8_t getc(chardev_t *chardev);
+uint8_t _getc(chardev_t *chardev);
 extern count_t gets(chardev_t *chardev, char *buf, size_t buflen);
 extern void putchar(char c);
Index: generic/include/console/kconsole.h
===================================================================
--- generic/include/console/kconsole.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/console/kconsole.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -55,5 +55,5 @@
 	void *buffer;			/**< Buffer where to store data. */
 	size_t len;			/**< Size of the buffer. */
-	__native intval;                /**< Integer value */
+	unative_t intval;                /**< Integer value */
 	cmd_arg_type_t vartype;         /**< Resulting type of variable arg */
 };
Index: generic/include/context.h
===================================================================
--- generic/include/context.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/context.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -43,6 +43,6 @@
 #ifndef context_set
 #define context_set(c, _pc, stack, size) 	\
-	(c)->pc = (__address) (_pc);		\
-	(c)->sp = ((__address) (stack)) + (size) - SP_DELTA;
+	(c)->pc = (uintptr_t) (_pc);		\
+	(c)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA;
 #endif /* context_set */
 
Index: generic/include/cpu.h
===================================================================
--- generic/include/cpu.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/cpu.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -81,6 +81,6 @@
 	int tlb_active;
 
-	__u16 frequency_mhz;
-	__u32 delay_loop_const;
+	uint16_t frequency_mhz;
+	uint32_t delay_loop_const;
 
 	cpu_arch_t arch;
@@ -91,5 +91,5 @@
 	 * Stack used by scheduler when there is no running thread.
 	 */
-	__u8 *stack;
+	uint8_t *stack;
 };
 
Index: generic/include/ddi/ddi.h
===================================================================
--- generic/include/ddi/ddi.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/ddi/ddi.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -40,13 +40,13 @@
 #include <typedefs.h>
 
-__native sys_physmem_map(__native phys_base, __native virt_base, __native pages, 
-			 __native flags);
-extern __native sys_iospace_enable(ddi_ioarg_t *uspace_io_arg);
-extern __native sys_preempt_control(int enable);
+unative_t sys_physmem_map(unative_t phys_base, unative_t virt_base, unative_t pages, 
+			 unative_t flags);
+extern unative_t sys_iospace_enable(ddi_ioarg_t *uspace_io_arg);
+extern unative_t sys_preempt_control(int enable);
 
 /*
  * Interface to be implemented by all architectures.
  */
-extern int ddi_iospace_enable_arch(task_t *task, __address ioaddr, size_t size);
+extern int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size);
 
 #endif
Index: generic/include/debug.h
===================================================================
--- generic/include/debug.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/debug.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -39,9 +39,9 @@
 #include <arch/debug.h>
 
-#define CALLER       ((__address)__builtin_return_address(0))
+#define CALLER       ((uintptr_t)__builtin_return_address(0))
 
 #ifndef HERE
 /** Current Instruction Pointer address */
-#  define HERE ((__address *)0)
+#  define HERE ((uintptr_t *)0)
 #endif
 
@@ -56,5 +56,5 @@
  */
 #ifdef CONFIG_DEBUG
-#	define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s), caller=%.*p\n", #expr, sizeof(__address) * 2, CALLER); }
+#	define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s), caller=%.*p\n", #expr, sizeof(uintptr_t) * 2, CALLER); }
 #else
 #	define ASSERT(expr)
Index: generic/include/elf.h
===================================================================
--- generic/include/elf.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/elf.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -194,9 +194,9 @@
  * in ELF header.
  */
-typedef __u64 elf_xword;
-typedef __s64 elf_sxword;
-typedef __u32 elf_word;
-typedef __s32 elf_sword;
-typedef __u16 elf_half;
+typedef uint64_t elf_xword;
+typedef int64_t elf_sxword;
+typedef uint32_t elf_word;
+typedef int32_t elf_sword;
+typedef uint16_t elf_half;
 
 /**
@@ -205,6 +205,6 @@
  * These types are specific for 32-bit format.
  */
-typedef __u32 elf32_addr;
-typedef __u32 elf32_off;
+typedef uint32_t elf32_addr;
+typedef uint32_t elf32_off;
 
 /**
@@ -213,10 +213,10 @@
  * These types are specific for 64-bit format.
  */
-typedef __u64 elf64_addr;
-typedef __u64 elf64_off;
+typedef uint64_t elf64_addr;
+typedef uint64_t elf64_off;
 
 /** ELF header */
 struct elf32_header {
-	__u8 e_ident[EI_NIDENT];
+	uint8_t e_ident[EI_NIDENT];
 	elf_half e_type;
 	elf_half e_machine;
@@ -234,5 +234,5 @@
 };
 struct elf64_header {
-	__u8 e_ident[EI_NIDENT];
+	uint8_t e_ident[EI_NIDENT];
 	elf_half e_type;
 	elf_half e_machine;
@@ -310,12 +310,12 @@
 	elf32_addr st_value;
 	elf_word st_size;
-	__u8 st_info;
-	__u8 st_other;
+	uint8_t st_info;
+	uint8_t st_other;
 	elf_half st_shndx;
 };
 struct elf64_symbol {
 	elf_word st_name;
-	__u8 st_info;
-	__u8 st_other;
+	uint8_t st_info;
+	uint8_t st_other;
 	elf_half st_shndx;
 	elf64_addr st_value;
Index: generic/include/func.h
===================================================================
--- generic/include/func.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/func.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -47,5 +47,5 @@
 extern int strncmp(const char *src, const char *dst, size_t len);
 extern void strncpy(char *dest, const char *src, size_t len);
-extern __native atoi(const char *text);
+extern unative_t atoi(const char *text);
 
 #endif
Index: generic/include/ipc/ipc.h
===================================================================
--- generic/include/ipc/ipc.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/ipc/ipc.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -165,5 +165,5 @@
 typedef struct phone_s phone_t;
 typedef struct {
-	__native args[IPC_CALL_LEN];
+	unative_t args[IPC_CALL_LEN];
 	phone_t *phone;
 }ipc_data_t;
@@ -215,5 +215,5 @@
 	answerbox_t *callerbox;
 
-	__native private; /**< Private data to internal IPC */
+	unative_t private; /**< Private data to internal IPC */
 
 	ipc_data_t data;  /**< Data passed from/to userspace */
@@ -221,5 +221,5 @@
 
 extern void ipc_init(void);
-extern call_t * ipc_wait_for_call(answerbox_t *box, __u32 usec, int flags);
+extern call_t * ipc_wait_for_call(answerbox_t *box, uint32_t usec, int flags);
 extern void ipc_answer(answerbox_t *box, call_t *request);
 extern int ipc_call(phone_t *phone, call_t *call);
@@ -235,5 +235,5 @@
 void ipc_cleanup(void);
 int ipc_phone_hangup(phone_t *phone);
-extern void ipc_backsend_err(phone_t *phone, call_t *call, __native err);
+extern void ipc_backsend_err(phone_t *phone, call_t *call, unative_t err);
 extern void ipc_print_task(task_id_t taskid);
 
Index: generic/include/ipc/ipcrsc.h
===================================================================
--- generic/include/ipc/ipcrsc.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/ipc/ipcrsc.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -36,5 +36,5 @@
 #define __IPCRSC_H__
 
-call_t * get_call(__native callid);
+call_t * get_call(unative_t callid);
 int phone_alloc(void);
 void phone_connect(int phoneid, answerbox_t *box);
Index: generic/include/ipc/irq.h
===================================================================
--- generic/include/ipc/irq.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/ipc/irq.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -80,7 +80,7 @@
 extern int ipc_irq_register(answerbox_t *box, int irq, irq_code_t *ucode);
 extern void ipc_irq_send_notif(int irq);
-extern void ipc_irq_send_msg(int irq, __native a1, __native a2, __native a3);
+extern void ipc_irq_send_msg(int irq, unative_t a1, unative_t a2, unative_t a3);
 extern void ipc_irq_unregister(answerbox_t *box, int irq);
-extern void irq_ipc_bind_arch(__native irq);
+extern void irq_ipc_bind_arch(unative_t irq);
 extern void ipc_irq_cleanup(answerbox_t *box);
 
Index: generic/include/ipc/sysipc.h
===================================================================
--- generic/include/ipc/sysipc.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/ipc/sysipc.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -40,20 +40,20 @@
 #include <arch/types.h>
 
-__native sys_ipc_call_sync_fast(__native phoneid, __native method, 
-				__native arg1, ipc_data_t *data);
-__native sys_ipc_call_sync(__native phoneid, ipc_data_t *question, 
+unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method, 
+				unative_t arg1, ipc_data_t *data);
+unative_t sys_ipc_call_sync(unative_t phoneid, ipc_data_t *question, 
 			   ipc_data_t *reply);
-__native sys_ipc_call_async_fast(__native phoneid, __native method, 
-				 __native arg1, __native arg2);
-__native sys_ipc_call_async(__native phoneid, ipc_data_t *data);
-__native sys_ipc_answer_fast(__native callid, __native retval, 
-			     __native arg1, __native arg2);
-__native sys_ipc_answer(__native callid, ipc_data_t *data);
-__native sys_ipc_wait_for_call(ipc_data_t *calldata, __u32 usec, int nonblocking);
-__native sys_ipc_forward_fast(__native callid, __native phoneid,
-			      __native method, __native arg1);
-__native sys_ipc_hangup(int phoneid);
-__native sys_ipc_register_irq(int irq, irq_code_t *ucode);
-__native sys_ipc_unregister_irq(int irq);
+unative_t sys_ipc_call_async_fast(unative_t phoneid, unative_t method, 
+				 unative_t arg1, unative_t arg2);
+unative_t sys_ipc_call_async(unative_t phoneid, ipc_data_t *data);
+unative_t sys_ipc_answer_fast(unative_t callid, unative_t retval, 
+			     unative_t arg1, unative_t arg2);
+unative_t sys_ipc_answer(unative_t callid, ipc_data_t *data);
+unative_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec, int nonblocking);
+unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid,
+			      unative_t method, unative_t arg1);
+unative_t sys_ipc_hangup(int phoneid);
+unative_t sys_ipc_register_irq(int irq, irq_code_t *ucode);
+unative_t sys_ipc_unregister_irq(int irq);
 
 #endif
Index: generic/include/macros.h
===================================================================
--- generic/include/macros.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/macros.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -47,8 +47,8 @@
 
 /** Return true if the interlvals overlap. */
-static inline int overlaps(__address s1, size_t sz1, __address s2, size_t sz2)
+static inline int overlaps(uintptr_t s1, size_t sz1, uintptr_t s2, size_t sz2)
 {
-	__address e1 = s1+sz1;
-	__address e2 = s2+sz2;
+	uintptr_t e1 = s1+sz1;
+	uintptr_t e2 = s2+sz2;
 
 	return s1 < e2 && s2 < e1;
Index: generic/include/memstr.h
===================================================================
--- generic/include/memstr.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/memstr.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -44,6 +44,6 @@
  */
 extern void *_memcpy(void *dst, const void *src, size_t cnt);
-extern void _memsetb(__address dst, size_t cnt, __u8 x);
-extern void _memsetw(__address dst, size_t cnt, __u16 x);
+extern void _memsetb(uintptr_t dst, size_t cnt, uint8_t x);
+extern void _memsetw(uintptr_t dst, size_t cnt, uint16_t x);
 
 #endif
Index: generic/include/mm/as.h
===================================================================
--- generic/include/mm/as.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/mm/as.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -124,6 +124,6 @@
 /** Address space area backend structure. */
 typedef struct {
-	int (* page_fault)(as_area_t *area, __address addr, pf_access_t access);
-	void (* frame_free)(as_area_t *area, __address page, __address frame);
+	int (* page_fault)(as_area_t *area, uintptr_t addr, pf_access_t access);
+	void (* frame_free)(as_area_t *area, uintptr_t page, uintptr_t frame);
 	void (* share)(as_area_t *area);
 } mem_backend_t;
@@ -136,5 +136,5 @@
 	};
 	struct {	/**< phys_backend members */
-		__address base;
+		uintptr_t base;
 		count_t frames;
 	};
@@ -152,5 +152,5 @@
 	int attributes;		/**< Attributes related to the address space area itself. */
 	count_t pages;		/**< Size of this area in multiples of PAGE_SIZE. */
-	__address base;		/**< Base address of this area. */
+	uintptr_t base;		/**< Base address of this area. */
 	btree_t used_space;	/**< Map of used space. */
 	share_info_t *sh_info;	/**< If the address space area has been shared, this pointer will
@@ -173,18 +173,18 @@
 extern void as_destroy(as_t *as);
 extern void as_switch(as_t *old, as_t *new);
-extern int as_page_fault(__address page, pf_access_t access, istate_t *istate);
-
-extern as_area_t *as_area_create(as_t *as, int flags, size_t size, __address base, int attrs,
+extern int as_page_fault(uintptr_t page, pf_access_t access, istate_t *istate);
+
+extern as_area_t *as_area_create(as_t *as, int flags, size_t size, uintptr_t base, int attrs,
 	mem_backend_t *backend, mem_backend_data_t *backend_data);
-extern int as_area_destroy(as_t *as, __address address);	
-extern int as_area_resize(as_t *as, __address address, size_t size, int flags);
-int as_area_share(as_t *src_as, __address src_base, size_t acc_size,
-		  as_t *dst_as, __address dst_base, int dst_flags_mask);
+extern int as_area_destroy(as_t *as, uintptr_t address);	
+extern int as_area_resize(as_t *as, uintptr_t address, size_t size, int flags);
+int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size,
+		  as_t *dst_as, uintptr_t dst_base, int dst_flags_mask);
 
 extern int as_area_get_flags(as_area_t *area);
 extern bool as_area_check_access(as_area_t *area, pf_access_t access);
-extern size_t as_get_size(__address base);
-extern int used_space_insert(as_area_t *a, __address page, count_t count);
-extern int used_space_remove(as_area_t *a, __address page, count_t count);
+extern size_t as_get_size(uintptr_t base);
+extern int used_space_insert(as_area_t *a, uintptr_t page, count_t count);
+extern int used_space_remove(as_area_t *a, uintptr_t page, count_t count);
 
 /* Interface to be implemented by architectures. */
@@ -199,7 +199,7 @@
 
 /* Address space area related syscalls. */
-extern __native sys_as_area_create(__address address, size_t size, int flags);
-extern __native sys_as_area_resize(__address address, size_t size, int flags);
-extern __native sys_as_area_destroy(__address address);
+extern unative_t sys_as_area_create(uintptr_t address, size_t size, int flags);
+extern unative_t sys_as_area_resize(uintptr_t address, size_t size, int flags);
+extern unative_t sys_as_area_destroy(uintptr_t address);
 
 #endif /* KERNEL */
Index: generic/include/mm/buddy.h
===================================================================
--- generic/include/mm/buddy.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/mm/buddy.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -46,15 +46,15 @@
 	link_t *(* bisect)(buddy_system_t *, link_t *);			/**< Bisect the block passed as argument and return pointer to the new right-side buddy. */
 	link_t *(* coalesce)(buddy_system_t *, link_t *, link_t *);	/**< Coalesce two buddies into a bigger block. */
-	void (*set_order)(buddy_system_t *, link_t *, __u8);		/**< Set order of block passed as argument. */
-	__u8 (*get_order)(buddy_system_t *, link_t *);			/**< Return order of block passed as argument. */
+	void (*set_order)(buddy_system_t *, link_t *, uint8_t);		/**< Set order of block passed as argument. */
+	uint8_t (*get_order)(buddy_system_t *, link_t *);			/**< Return order of block passed as argument. */
 	void (*mark_busy)(buddy_system_t *, link_t *);			/**< Mark block as busy. */
 	void (*mark_available)(buddy_system_t *, link_t *);		/**< Mark block as available. */
 	/** Find parent of block that has given order  */
-	link_t *(* find_block)(buddy_system_t *, link_t *, __u8);
+	link_t *(* find_block)(buddy_system_t *, link_t *, uint8_t);
 	void (* print_id)(buddy_system_t *, link_t *);
 };
 
 struct buddy_system {
-	__u8 max_order;				/**< Maximal order of block which can be stored by buddy system. */
+	uint8_t max_order;				/**< Maximal order of block which can be stored by buddy system. */
 	link_t *order;
 	buddy_system_operations_t *op;
@@ -63,8 +63,8 @@
 
 extern void buddy_system_create(buddy_system_t *b,
-				__u8 max_order, 
+				uint8_t max_order, 
 				buddy_system_operations_t *op, void *data);
-extern link_t *buddy_system_alloc(buddy_system_t *b, __u8 i);
-extern bool buddy_system_can_alloc(buddy_system_t *b, __u8 order);
+extern link_t *buddy_system_alloc(buddy_system_t *b, uint8_t i);
+extern bool buddy_system_can_alloc(buddy_system_t *b, uint8_t order);
 extern void buddy_system_free(buddy_system_t *b, link_t *block);
 extern void buddy_system_structure_print(buddy_system_t *b, size_t elem_size);
Index: generic/include/mm/frame.h
===================================================================
--- generic/include/mm/frame.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/mm/frame.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -66,10 +66,10 @@
 #define FRAME_ERROR		2	/* frame_alloc return status */
 
-static inline __address PFN2ADDR(pfn_t frame)
+static inline uintptr_t PFN2ADDR(pfn_t frame)
 {
-	return (__address)(frame << FRAME_WIDTH);
+	return (uintptr_t)(frame << FRAME_WIDTH);
 }
 
-static inline pfn_t ADDR2PFN(__address addr)
+static inline pfn_t ADDR2PFN(uintptr_t addr)
 {
 	return (pfn_t)(addr >> FRAME_WIDTH);
@@ -83,5 +83,5 @@
 }
 
-#define IS_BUDDY_ORDER_OK(index, order)		((~(((__native) -1) << (order)) & (index)) == 0)
+#define IS_BUDDY_ORDER_OK(index, order)		((~(((unative_t) -1) << (order)) & (index)) == 0)
 #define IS_BUDDY_LEFT_BLOCK(zone, frame)	(((frame_index((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 0)
 #define IS_BUDDY_RIGHT_BLOCK(zone, frame)	(((frame_index((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1)
@@ -92,6 +92,6 @@
 
 extern void frame_init(void);
-extern void * frame_alloc_generic(__u8 order, int flags, int *pzone);
-extern void frame_free(__address frame);
+extern void * frame_alloc_generic(uint8_t order, int flags, int *pzone);
+extern void frame_free(uintptr_t frame);
 extern void frame_reference_add(pfn_t pfn);
 
@@ -100,5 +100,5 @@
 void frame_set_parent(pfn_t frame, void *data, int hint);
 void frame_mark_unavailable(pfn_t start, count_t count);
-__address zone_conf_size(count_t count);
+uintptr_t zone_conf_size(count_t count);
 void zone_merge(int z1, int z2);
 void zone_merge_all(void);
Index: generic/include/mm/page.h
===================================================================
--- generic/include/mm/page.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/mm/page.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -77,7 +77,7 @@
 /** Operations to manipulate page mappings. */
 struct page_mapping_operations {
-	void (* mapping_insert)(as_t *as, __address page, __address frame, int flags);
-	void (* mapping_remove)(as_t *as, __address page);
-	pte_t *(* mapping_find)(as_t *as, __address page);
+	void (* mapping_insert)(as_t *as, uintptr_t page, uintptr_t frame, int flags);
+	void (* mapping_remove)(as_t *as, uintptr_t page);
+	pte_t *(* mapping_find)(as_t *as, uintptr_t page);
 };
 typedef struct page_mapping_operations page_mapping_operations_t;
@@ -88,11 +88,11 @@
 extern void page_table_lock(as_t *as, bool lock);
 extern void page_table_unlock(as_t *as, bool unlock);
-extern void page_mapping_insert(as_t *as, __address page, __address frame, int flags);
-extern void page_mapping_remove(as_t *as, __address page);
-extern pte_t *page_mapping_find(as_t *as, __address page);
+extern void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame, int flags);
+extern void page_mapping_remove(as_t *as, uintptr_t page);
+extern pte_t *page_mapping_find(as_t *as, uintptr_t page);
 extern pte_t *page_table_create(int flags);
 extern void page_table_destroy(pte_t *page_table);
-extern void map_structure(__address s, size_t size);
-extern __address hw_map(__address physaddr, size_t size);
+extern void map_structure(uintptr_t s, size_t size);
+extern uintptr_t hw_map(uintptr_t physaddr, size_t size);
 
 #endif
Index: generic/include/mm/slab.h
===================================================================
--- generic/include/mm/slab.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/mm/slab.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -91,5 +91,5 @@
 
 	/* Computed values */
-	__u8 order;        /**< Order of frames to be allocated */
+	uint8_t order;        /**< Order of frames to be allocated */
 	int objects;      /**< Number of objects that fit in */
 
Index: generic/include/mm/tlb.h
===================================================================
--- generic/include/mm/tlb.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/mm/tlb.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -59,5 +59,5 @@
 	tlb_invalidate_type_t type;	/**< Message type. */
 	asid_t asid;			/**< Address space identifier. */
-	__address page;			/**< Page address. */
+	uintptr_t page;			/**< Page address. */
 	count_t count;			/**< Number of pages to invalidate. */
 };
@@ -67,5 +67,5 @@
 
 #ifdef CONFIG_SMP
-extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, __address page, count_t count);
+extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, uintptr_t page, count_t count);
 extern void tlb_shootdown_finalize(void);
 extern void tlb_shootdown_ipi_recv(void);
@@ -84,5 +84,5 @@
 extern void tlb_invalidate_all(void);
 extern void tlb_invalidate_asid(asid_t asid);
-extern void tlb_invalidate_pages(asid_t asid, __address page, count_t cnt);
+extern void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt);
 #endif
 
Index: generic/include/proc/task.h
===================================================================
--- generic/include/proc/task.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/proc/task.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -103,5 +103,5 @@
 #endif
 
-extern __native sys_task_get_id(task_id_t *uspace_task_id);
+extern unative_t sys_task_get_id(task_id_t *uspace_task_id);
 
 #endif
Index: generic/include/proc/thread.h
===================================================================
--- generic/include/proc/thread.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/proc/thread.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -143,12 +143,12 @@
 	task_t *task;				/**< Containing task. */
 
-	__u64 ticks;				/**< Ticks before preemption. */
+	uint64_t ticks;				/**< Ticks before preemption. */
 
 	int priority;				/**< Thread's priority. Implemented as index to CPU->rq */
-	__u32 tid;				/**< Thread ID. */
+	uint32_t tid;				/**< Thread ID. */
 	
 	thread_arch_t arch;			/**< Architecture-specific data. */
 
-	__u8 *kstack;				/**< Thread's kernel stack. */
+	uint8_t *kstack;				/**< Thread's kernel stack. */
 };
 
@@ -172,9 +172,9 @@
 #endif
 
-extern void thread_sleep(__u32 sec);
-extern void thread_usleep(__u32 usec);
+extern void thread_sleep(uint32_t sec);
+extern void thread_usleep(uint32_t usec);
 
 #define thread_join(t)	thread_join_timeout((t), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
-extern int thread_join_timeout(thread_t *t, __u32 usec, int flags);
+extern int thread_join_timeout(thread_t *t, uint32_t usec, int flags);
 extern void thread_detach(thread_t *t);
 
@@ -188,6 +188,6 @@
 
 /** Thread syscall prototypes. */
-__native sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name);
-__native sys_thread_exit(int uspace_status);
+unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name);
+unative_t sys_thread_exit(int uspace_status);
 
 #endif
Index: generic/include/security/cap.h
===================================================================
--- generic/include/security/cap.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/security/cap.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -80,11 +80,11 @@
 #define CAP_IRQ_REG		(1<<4) 
 
-typedef __u32 cap_t;
+typedef uint32_t cap_t;
 
 extern void cap_set(task_t *t, cap_t caps);
 extern cap_t cap_get(task_t *t);
 
-extern __native sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps);
-extern __native sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps);
+extern unative_t sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps);
+extern unative_t sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps);
 
 #endif
Index: generic/include/sort.h
===================================================================
--- generic/include/sort.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/sort.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -48,7 +48,7 @@
  */
 extern int int_cmp(void * a, void * b);
-extern int __u32_cmp(void * a, void * b);
-extern int __u16_cmp(void * a, void * b);
-extern int __u8_cmp(void * a, void * b);
+extern int uint32_t_cmp(void * a, void * b);
+extern int uint16_t_cmp(void * a, void * b);
+extern int uint8_t_cmp(void * a, void * b);
 
 #endif
Index: generic/include/stackarg.h
===================================================================
--- generic/include/stackarg.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/stackarg.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -46,10 +46,10 @@
 typedef struct va_list {
 	int pos;
-	__u8 *last;
+	uint8_t *last;
 } va_list;
 
 #define va_start(ap, lst) 		\
 	(ap).pos = sizeof(lst); 			\
-	(ap).last = (__u8 *) &(lst)
+	(ap).last = (uint8_t *) &(lst)
 
 #define va_arg(ap, type) 		\
Index: generic/include/symtab.h
===================================================================
--- generic/include/symtab.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/symtab.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -41,10 +41,10 @@
 
 struct symtab_entry {
-	__u64 address_le;
+	uint64_t address_le;
 	char symbol_name[MAX_SYMBOL_NAME];
 };
 
-extern char * get_symtab_entry(__native addr);
-extern __address get_symbol_addr(const char *name);
+extern char * get_symtab_entry(unative_t addr);
+extern uintptr_t get_symbol_addr(const char *name);
 extern void symtab_print_search(const char *name);
 extern int symtab_compl(char *name);
Index: generic/include/synch/condvar.h
===================================================================
--- generic/include/synch/condvar.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/synch/condvar.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -53,5 +53,5 @@
 extern void condvar_signal(condvar_t *cv);
 extern void condvar_broadcast(condvar_t *cv);
-extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, __u32 usec, int flags);
+extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, uint32_t usec, int flags);
 
 #endif
Index: generic/include/synch/futex.h
===================================================================
--- generic/include/synch/futex.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/synch/futex.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -27,5 +27,5 @@
  */
 
- /** @addtogroup sync
+/** @addtogroup sync
  * @{
  */
@@ -44,5 +44,5 @@
 /** Kernel-side futex structure. */
 struct futex {
-	__address paddr;	/**< Physical address of the status variable. */
+	uintptr_t paddr;	/**< Physical address of the status variable. */
 	waitq_t wq;		/**< Wait queue for threads waiting for futex availability. */
 	link_t ht_link;		/**< Futex hash table link. */
@@ -51,6 +51,6 @@
 
 extern void futex_init(void);
-extern __native sys_futex_sleep_timeout(__address uaddr, __u32 usec, int flags);
-extern __native sys_futex_wakeup(__address uaddr);
+extern unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, int flags);
+extern unative_t sys_futex_wakeup(uintptr_t uaddr);
 
 extern void futex_cleanup(void);
@@ -58,5 +58,5 @@
 #endif
 
- /** @}
+/** @}
  */
 
Index: generic/include/synch/mutex.h
===================================================================
--- generic/include/synch/mutex.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/synch/mutex.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -55,5 +55,5 @@
 
 extern void mutex_initialize(mutex_t *mtx);
-extern int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int flags);
+extern int _mutex_lock_timeout(mutex_t *mtx, uint32_t usec, int flags);
 extern void mutex_unlock(mutex_t *mtx);
 
Index: generic/include/synch/rwlock.h
===================================================================
--- generic/include/synch/rwlock.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/synch/rwlock.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -70,6 +70,6 @@
 extern void rwlock_read_unlock(rwlock_t *rwl);
 extern void rwlock_write_unlock(rwlock_t *rwl);
-extern int _rwlock_read_lock_timeout(rwlock_t *rwl, __u32 usec, int flags);
-extern int _rwlock_write_lock_timeout(rwlock_t *rwl, __u32 usec, int flags);
+extern int _rwlock_read_lock_timeout(rwlock_t *rwl, uint32_t usec, int flags);
+extern int _rwlock_write_lock_timeout(rwlock_t *rwl, uint32_t usec, int flags);
 
 #endif
Index: generic/include/synch/semaphore.h
===================================================================
--- generic/include/synch/semaphore.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/synch/semaphore.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -54,5 +54,5 @@
 
 extern void semaphore_initialize(semaphore_t *s, int val);
-extern int _semaphore_down_timeout(semaphore_t *s, __u32 usec, int flags);
+extern int _semaphore_down_timeout(semaphore_t *s, uint32_t usec, int flags);
 extern void semaphore_up(semaphore_t *s);
 
Index: generic/include/synch/waitq.h
===================================================================
--- generic/include/synch/waitq.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/synch/waitq.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -62,7 +62,7 @@
 
 extern void waitq_initialize(waitq_t *wq);
-extern int waitq_sleep_timeout(waitq_t *wq, __u32 usec, int flags);
+extern int waitq_sleep_timeout(waitq_t *wq, uint32_t usec, int flags);
 extern ipl_t waitq_sleep_prepare(waitq_t *wq);
-extern int waitq_sleep_timeout_unsafe(waitq_t *wq, __u32 usec, int flags);
+extern int waitq_sleep_timeout_unsafe(waitq_t *wq, uint32_t usec, int flags);
 extern void waitq_sleep_finish(waitq_t *wq, int rc, ipl_t ipl);
 extern void waitq_wakeup(waitq_t *wq, bool all);
Index: generic/include/syscall/syscall.h
===================================================================
--- generic/include/syscall/syscall.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/syscall/syscall.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -74,10 +74,10 @@
 #include <typedefs.h>
 
-typedef __native (*syshandler_t)();
+typedef unative_t (*syshandler_t)();
 
 extern syshandler_t syscall_table[SYSCALL_END];
-extern __native syscall_handler(__native a1, __native a2, __native a3,
-				__native a4, __native id);
-extern __native sys_tls_set(__native addr);
+extern unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
+				unative_t a4, unative_t id);
+extern unative_t sys_tls_set(unative_t addr);
 
 
Index: generic/include/sysinfo/sysinfo.h
===================================================================
--- generic/include/sysinfo/sysinfo.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/sysinfo/sysinfo.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -37,5 +37,5 @@
 typedef union sysinfo_item_val
 {
-	__native val;
+	unative_t val;
 	void *fn; 
 }sysinfo_item_val_t;
@@ -46,5 +46,5 @@
 	union
 	{
-		__native val;
+		unative_t val;
 		void *fn; 
 	}val;
@@ -70,14 +70,14 @@
 
 
-typedef __native (*sysinfo_val_fn_t)(sysinfo_item_t *root);
-typedef __native (*sysinfo_subinfo_fn_t)(const char *subname);
+typedef unative_t (*sysinfo_val_fn_t)(sysinfo_item_t *root);
+typedef unative_t (*sysinfo_subinfo_fn_t)(const char *subname);
 
 typedef struct sysinfo_rettype
 {
-	__native val;
-	__native valid;
+	unative_t val;
+	unative_t valid;
 }sysinfo_rettype_t;
 
-void sysinfo_set_item_val(const char *name,sysinfo_item_t **root,__native val);
+void sysinfo_set_item_val(const char *name,sysinfo_item_t **root,unative_t val);
 void sysinfo_dump(sysinfo_item_t **root,int depth);
 void sysinfo_set_item_function(const char *name,sysinfo_item_t **root,sysinfo_val_fn_t fn);
@@ -86,6 +86,6 @@
 sysinfo_rettype_t sysinfo_get_val(const char *name,sysinfo_item_t **root);
 
-__native sys_sysinfo_valid(__native ptr,__native len);
-__native sys_sysinfo_value(__native ptr,__native len);
+unative_t sys_sysinfo_valid(unative_t ptr,unative_t len);
+unative_t sys_sysinfo_value(unative_t ptr,unative_t len);
 
 
Index: generic/include/time/delay.h
===================================================================
--- generic/include/time/delay.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/time/delay.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -38,5 +38,5 @@
 #include <arch/types.h>
 
-extern void delay(__u32 microseconds);
+extern void delay(uint32_t microseconds);
 
 #endif
Index: generic/include/time/timeout.h
===================================================================
--- generic/include/time/timeout.h	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/include/time/timeout.h	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -41,5 +41,5 @@
 #include <adt/list.h>
 
-#define us2ticks(us)	((__u64)(((__u32) (us)/(1000000/HZ))))
+#define us2ticks(us)	((uint64_t)(((uint32_t) (us)/(1000000/HZ))))
 
 typedef void (* timeout_handler_t)(void *arg);
@@ -50,5 +50,5 @@
 	link_t link;			/**< Link to the list of active timeouts on THE->cpu */
 	
-	__u64 ticks;			/**< Timeout will be activated in this amount of clock() ticks. */
+	uint64_t ticks;			/**< Timeout will be activated in this amount of clock() ticks. */
 
 	timeout_handler_t handler;	/**< Function that will be called on timeout activation. */
@@ -61,5 +61,5 @@
 extern void timeout_initialize(timeout_t *t);
 extern void timeout_reinitialize(timeout_t *t);
-extern void timeout_register(timeout_t *t, __u64 usec, timeout_handler_t f, void *arg);
+extern void timeout_register(timeout_t *t, uint64_t usec, timeout_handler_t f, void *arg);
 extern bool timeout_unregister(timeout_t *t);
 
Index: generic/src/adt/bitmap.c
===================================================================
--- generic/src/adt/bitmap.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/adt/bitmap.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -56,5 +56,5 @@
  * @param bits Number of bits stored in bitmap.
  */
-void bitmap_initialize(bitmap_t *bitmap, __u8 *map, count_t bits)
+void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, count_t bits)
 {
 	bitmap->map = map;
Index: generic/src/adt/hash_table.c
===================================================================
--- generic/src/adt/hash_table.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/adt/hash_table.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -65,5 +65,5 @@
 		panic("cannot allocate memory for hash table\n");
 	}
-	memsetb((__address) h->entry, m * sizeof(link_t), 0);
+	memsetb((uintptr_t) h->entry, m * sizeof(link_t), 0);
 	
 	for (i = 0; i < m; i++)
@@ -81,5 +81,5 @@
  * @param item Item to be inserted into the hash table.
  */
-void hash_table_insert(hash_table_t *h, __native key[], link_t *item)
+void hash_table_insert(hash_table_t *h, unative_t key[], link_t *item)
 {
 	index_t chain;
@@ -101,5 +101,5 @@
  * @return Matching item on success, NULL if there is no such item.
  */
-link_t *hash_table_find(hash_table_t *h, __native key[])
+link_t *hash_table_find(hash_table_t *h, unative_t key[])
 {
 	link_t *cur;
@@ -131,5 +131,5 @@
  * @param keys Number of keys in the key array.
  */
-void hash_table_remove(hash_table_t *h, __native key[], count_t keys)
+void hash_table_remove(hash_table_t *h, unative_t key[], count_t keys)
 {
 	index_t chain;
Index: generic/src/console/chardev.c
===================================================================
--- generic/src/console/chardev.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/console/chardev.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -60,5 +60,5 @@
  * @param ch Character being pushed.
  */
-void chardev_push_character(chardev_t *chardev, __u8 ch)
+void chardev_push_character(chardev_t *chardev, uint8_t ch)
 {
 	spinlock_lock(&chardev->lock);
Index: generic/src/console/cmd.c
===================================================================
--- generic/src/console/cmd.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/console/cmd.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -480,11 +480,11 @@
 int cmd_call0(cmd_arg_t *argv)
 {
-	__address symaddr;
+	uintptr_t symaddr;
 	char *symbol;
-	__native (*f)(void);
+	unative_t (*f)(void);
 #ifdef ia64
 	struct {
-		__native f;
-		__native gp;
+		unative_t f;
+		unative_t gp;
 	}fptr;
 #endif
@@ -493,16 +493,16 @@
 	if (!symaddr)
 		printf("Symbol %s not found.\n", argv->buffer);
-	else if (symaddr == (__address) -1) {
+	else if (symaddr == (uintptr_t) -1) {
 		symtab_print_search(argv->buffer);
 		printf("Duplicate symbol, be more specific.\n");
 	} else {
 		symbol = get_symtab_entry(symaddr);
-		printf("Calling f(): %.*p: %s\n", sizeof(__address) * 2, symaddr, symbol);
+		printf("Calling f(): %.*p: %s\n", sizeof(uintptr_t) * 2, symaddr, symbol);
 #ifdef ia64
 		fptr.f = symaddr;
-		fptr.gp = ((__native *)cmd_call2)[1];
-		f =  (__native (*)(void)) &fptr;
+		fptr.gp = ((unative_t *)cmd_call2)[1];
+		f =  (unative_t (*)(void)) &fptr;
 #else
-		f =  (__native (*)(void)) symaddr;
+		f =  (unative_t (*)(void)) symaddr;
 #endif
 		printf("Result: %#zx\n", f());
@@ -515,12 +515,12 @@
 int cmd_call1(cmd_arg_t *argv)
 {
-	__address symaddr;
+	uintptr_t symaddr;
 	char *symbol;
-	__native (*f)(__native,...);
-	__native arg1 = argv[1].intval;
+	unative_t (*f)(unative_t,...);
+	unative_t arg1 = argv[1].intval;
 #ifdef ia64
 	struct {
-		__native f;
-		__native gp;
+		unative_t f;
+		unative_t gp;
 	}fptr;
 #endif
@@ -529,5 +529,5 @@
 	if (!symaddr)
 		printf("Symbol %s not found.\n", argv->buffer);
-	else if (symaddr == (__address) -1) {
+	else if (symaddr == (uintptr_t) -1) {
 		symtab_print_search(argv->buffer);
 		printf("Duplicate symbol, be more specific.\n");
@@ -535,11 +535,11 @@
 		symbol = get_symtab_entry(symaddr);
 
-		printf("Calling f(%#zx): %.*p: %s\n", arg1, sizeof(__address) * 2, symaddr, symbol);
+		printf("Calling f(%#zx): %.*p: %s\n", arg1, sizeof(uintptr_t) * 2, symaddr, symbol);
 #ifdef ia64
 		fptr.f = symaddr;
-		fptr.gp = ((__native *)cmd_call2)[1];
-		f =  (__native (*)(__native,...)) &fptr;
+		fptr.gp = ((unative_t *)cmd_call2)[1];
+		f =  (unative_t (*)(unative_t,...)) &fptr;
 #else
-		f =  (__native (*)(__native,...)) symaddr;
+		f =  (unative_t (*)(unative_t,...)) symaddr;
 #endif
 		printf("Result: %#zx\n", f(arg1));
@@ -552,13 +552,13 @@
 int cmd_call2(cmd_arg_t *argv)
 {
-	__address symaddr;
+	uintptr_t symaddr;
 	char *symbol;
-	__native (*f)(__native,__native,...);
-	__native arg1 = argv[1].intval;
-	__native arg2 = argv[2].intval;
+	unative_t (*f)(unative_t,unative_t,...);
+	unative_t arg1 = argv[1].intval;
+	unative_t arg2 = argv[2].intval;
 #ifdef ia64
 	struct {
-		__native f;
-		__native gp;
+		unative_t f;
+		unative_t gp;
 	}fptr;
 #endif
@@ -567,5 +567,5 @@
 	if (!symaddr)
 		printf("Symbol %s not found.\n", argv->buffer);
-	else if (symaddr == (__address) -1) {
+	else if (symaddr == (uintptr_t) -1) {
 		symtab_print_search(argv->buffer);
 		printf("Duplicate symbol, be more specific.\n");
@@ -573,11 +573,11 @@
 		symbol = get_symtab_entry(symaddr);
 		printf("Calling f(0x%zx,0x%zx): %.*p: %s\n", 
-		       arg1, arg2, sizeof(__address) * 2, symaddr, symbol);
+		       arg1, arg2, sizeof(uintptr_t) * 2, symaddr, symbol);
 #ifdef ia64
 		fptr.f = symaddr;
-		fptr.gp = ((__native *)cmd_call2)[1];
-		f =  (__native (*)(__native,__native,...)) &fptr;
+		fptr.gp = ((unative_t *)cmd_call2)[1];
+		f =  (unative_t (*)(unative_t,unative_t,...)) &fptr;
 #else
-		f =  (__native (*)(__native,__native,...)) symaddr;
+		f =  (unative_t (*)(unative_t,unative_t,...)) symaddr;
 #endif
 		printf("Result: %#zx\n", f(arg1, arg2));
@@ -590,14 +590,14 @@
 int cmd_call3(cmd_arg_t *argv)
 {
-	__address symaddr;
+	uintptr_t symaddr;
 	char *symbol;
-	__native (*f)(__native,__native,__native,...);
-	__native arg1 = argv[1].intval;
-	__native arg2 = argv[2].intval;
-	__native arg3 = argv[3].intval;
+	unative_t (*f)(unative_t,unative_t,unative_t,...);
+	unative_t arg1 = argv[1].intval;
+	unative_t arg2 = argv[2].intval;
+	unative_t arg3 = argv[3].intval;
 #ifdef ia64
 	struct {
-		__native f;
-		__native gp;
+		unative_t f;
+		unative_t gp;
 	}fptr;
 #endif
@@ -606,5 +606,5 @@
 	if (!symaddr)
 		printf("Symbol %s not found.\n", argv->buffer);
-	else if (symaddr == (__address) -1) {
+	else if (symaddr == (uintptr_t) -1) {
 		symtab_print_search(argv->buffer);
 		printf("Duplicate symbol, be more specific.\n");
@@ -612,11 +612,11 @@
 		symbol = get_symtab_entry(symaddr);
 		printf("Calling f(0x%zx,0x%zx, 0x%zx): %.*p: %s\n", 
-		       arg1, arg2, arg3, sizeof(__address) * 2, symaddr, symbol);
+		       arg1, arg2, arg3, sizeof(uintptr_t) * 2, symaddr, symbol);
 #ifdef ia64
 		fptr.f = symaddr;
-		fptr.gp = ((__native *)cmd_call2)[1];
-		f =  (__native (*)(__native,__native,__native,...)) &fptr;
+		fptr.gp = ((unative_t *)cmd_call2)[1];
+		f =  (unative_t (*)(unative_t,unative_t,unative_t,...)) &fptr;
 #else
-		f =  (__native (*)(__native,__native,__native,...)) symaddr;
+		f =  (unative_t (*)(unative_t,unative_t,unative_t,...)) symaddr;
 #endif
 		printf("Result: %#zx\n", f(arg1, arg2, arg3));
@@ -660,26 +660,26 @@
 int cmd_set4(cmd_arg_t *argv)
 {
-	__u32 *addr ;
-	__u32 arg1 = argv[1].intval;
+	uint32_t *addr ;
+	uint32_t arg1 = argv[1].intval;
 	bool pointer = false;
 
 	if (((char *)argv->buffer)[0] == '*') {
-		addr = (__u32 *) get_symbol_addr(argv->buffer+1);
+		addr = (uint32_t *) get_symbol_addr(argv->buffer+1);
 		pointer = true;
 	} else if (((char *)argv->buffer)[0] >= '0' && 
 		   ((char *)argv->buffer)[0] <= '9')
-		addr = (__u32 *)atoi((char *)argv->buffer);
+		addr = (uint32_t *)atoi((char *)argv->buffer);
 	else
-		addr = (__u32 *)get_symbol_addr(argv->buffer);
+		addr = (uint32_t *)get_symbol_addr(argv->buffer);
 
 	if (!addr)
 		printf("Symbol %s not found.\n", argv->buffer);
-	else if (addr == (__u32 *) -1) {
+	else if (addr == (uint32_t *) -1) {
 		symtab_print_search(argv->buffer);
 		printf("Duplicate symbol, be more specific.\n");
 	} else {
 		if (pointer)
-			addr = (__u32 *)(*(__native *)addr);
-		printf("Writing 0x%x -> %.*p\n", arg1, sizeof(__address) * 2, addr);
+			addr = (uint32_t *)(*(unative_t *)addr);
+		printf("Writing 0x%x -> %.*p\n", arg1, sizeof(uintptr_t) * 2, addr);
 		*addr = arg1;
 		
Index: generic/src/console/console.c
===================================================================
--- generic/src/console/console.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/console/console.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -77,7 +77,7 @@
  * @return Character read.
  */
-__u8 _getc(chardev_t *chardev)
+uint8_t _getc(chardev_t *chardev)
 {
-	__u8 ch;
+	uint8_t ch;
 	ipl_t ipl;
 
@@ -151,7 +151,7 @@
 
 /** Get character from device & echo it to screen */
-__u8 getc(chardev_t *chardev)
+uint8_t getc(chardev_t *chardev)
 {
-	__u8 ch;
+	uint8_t ch;
 
 	ch = _getc(chardev);
Index: generic/src/console/kconsole.c
===================================================================
--- generic/src/console/kconsole.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/console/kconsole.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -432,8 +432,8 @@
 }
 
-static int parse_int_arg(char *text, size_t len, __native *result)
+static int parse_int_arg(char *text, size_t len, unative_t *result)
 {
 	char symname[MAX_SYMBOL_NAME];
-	__address symaddr;
+	uintptr_t symaddr;
 	bool isaddr = false;
 	bool isptr = false;
@@ -454,5 +454,5 @@
 			return -1;
 		}
-		if (symaddr == (__address) -1) {
+		if (symaddr == (uintptr_t) -1) {
 			printf("Duplicate symbol %s.\n",symname);
 			symtab_print_search(symname);
@@ -460,13 +460,13 @@
 		}
 		if (isaddr)
-			*result = (__native)symaddr;
+			*result = (unative_t)symaddr;
 		else if (isptr)
-			*result = **((__native **)symaddr);
+			*result = **((unative_t **)symaddr);
 		else
-			*result = *((__native *)symaddr);
+			*result = *((unative_t *)symaddr);
 	} else { /* It's a number - convert it */
 		*result = atoi(text);
 		if (isptr)
-			*result = *((__native *)*result);
+			*result = *((unative_t *)*result);
 	}
 
@@ -555,5 +555,5 @@
 					min((end-start), cmd->argv[i].len));
 				buf[min((end - start), cmd->argv[i].len - 1)] = '\0';
-				cmd->argv[i].intval = (__native) buf;
+				cmd->argv[i].intval = (unative_t) buf;
 				cmd->argv[i].vartype = ARG_TYPE_STRING;
 			} else if (!parse_int_arg(cmdline+start, end-start+1, 
Index: generic/src/console/klog.c
===================================================================
--- generic/src/console/klog.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/console/klog.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -64,5 +64,5 @@
 	klog = (char *)PA2KA(faddr);
 	
-	sysinfo_set_item_val("klog.faddr", NULL, (__native)faddr);
+	sysinfo_set_item_val("klog.faddr", NULL, (unative_t)faddr);
 	sysinfo_set_item_val("klog.pages", NULL, 1 << KLOG_ORDER);
 
Index: generic/src/cpu/cpu.c
===================================================================
--- generic/src/cpu/cpu.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/cpu/cpu.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -69,8 +69,8 @@
 
 		/* initialize everything */
-		memsetb((__address) cpus, sizeof(cpu_t) * config.cpu_count, 0);
+		memsetb((uintptr_t) cpus, sizeof(cpu_t) * config.cpu_count, 0);
 
 		for (i=0; i < config.cpu_count; i++) {
-			cpus[i].stack = (__u8 *) frame_alloc(STACK_FRAMES, FRAME_KA | FRAME_ATOMIC);
+			cpus[i].stack = (uint8_t *) frame_alloc(STACK_FRAMES, FRAME_KA | FRAME_ATOMIC);
 			
 			cpus[i].id = i;
Index: generic/src/ddi/ddi.c
===================================================================
--- generic/src/ddi/ddi.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/ddi/ddi.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -63,5 +63,5 @@
  *	   there was a problem in creating address space area.
  */
-static int ddi_physmem_map(__address pf, __address vp, count_t pages, int flags)
+static int ddi_physmem_map(uintptr_t pf, uintptr_t vp, count_t pages, int flags)
 {
 	ipl_t ipl;
@@ -111,5 +111,5 @@
  *	   ENOENT if there is no task matching the specified ID.
  */
-static int ddi_iospace_enable(task_id_t id, __address ioaddr, size_t size)
+static int ddi_iospace_enable(task_id_t id, uintptr_t ioaddr, size_t size)
 {
 	ipl_t ipl;
@@ -159,9 +159,9 @@
  * @return 0 on success, otherwise it returns error code found in errno.h
  */ 
-__native sys_physmem_map(__native phys_base, __native virt_base, __native pages, 
-			 __native flags)
-{
-	return (__native) ddi_physmem_map(ALIGN_DOWN((__address) phys_base, FRAME_SIZE),
-					  ALIGN_DOWN((__address) virt_base, PAGE_SIZE), (count_t) pages,
+unative_t sys_physmem_map(unative_t phys_base, unative_t virt_base, unative_t pages, 
+			 unative_t flags)
+{
+	return (unative_t) ddi_physmem_map(ALIGN_DOWN((uintptr_t) phys_base, FRAME_SIZE),
+					  ALIGN_DOWN((uintptr_t) virt_base, PAGE_SIZE), (count_t) pages,
 					  (int) flags);
 }
@@ -173,5 +173,5 @@
  * @return 0 on success, otherwise it returns error code found in errno.h
  */ 
-__native sys_iospace_enable(ddi_ioarg_t *uspace_io_arg)
+unative_t sys_iospace_enable(ddi_ioarg_t *uspace_io_arg)
 {
 	ddi_ioarg_t arg;
@@ -180,7 +180,7 @@
 	rc = copy_from_uspace(&arg, uspace_io_arg, sizeof(ddi_ioarg_t));
 	if (rc != 0)
-		return (__native) rc;
+		return (unative_t) rc;
 		
-	return (__native) ddi_iospace_enable((task_id_t) arg.task_id, (__address) arg.ioaddr, (size_t) arg.size);
+	return (unative_t) ddi_iospace_enable((task_id_t) arg.task_id, (uintptr_t) arg.ioaddr, (size_t) arg.size);
 }
 
@@ -193,5 +193,5 @@
  * @return Zero on success or EPERM if callers capabilities are not sufficient.
  */ 
-__native sys_preempt_control(int enable)
+unative_t sys_preempt_control(int enable)
 {
         if (! cap_get(TASK) & CAP_PREEMPT_CONTROL)
Index: generic/src/debug/symtab.c
===================================================================
--- generic/src/debug/symtab.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/debug/symtab.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -51,13 +51,13 @@
  * @return Pointer to respective symbol string on success, NULL otherwise.
  */
-char * get_symtab_entry(__native addr)
+char * get_symtab_entry(unative_t addr)
 {
 	count_t i;
 
 	for (i=1;symbol_table[i].address_le;++i) {
-		if (addr < __u64_le2host(symbol_table[i].address_le))
+		if (addr < uint64_t_le2host(symbol_table[i].address_le))
 			break;
 	}
-	if (addr >= __u64_le2host(symbol_table[i-1].address_le))
+	if (addr >= uint64_t_le2host(symbol_table[i-1].address_le))
 		return symbol_table[i-1].symbol_name;
 	return NULL;
@@ -109,8 +109,8 @@
  * @return 0 - Not found, -1 - Duplicate symbol, other - address of symbol
  */
-__address get_symbol_addr(const char *name)
+uintptr_t get_symbol_addr(const char *name)
 {
 	count_t found = 0;
-	__address addr = NULL;
+	uintptr_t addr = NULL;
 	char *hint;
 	int i;
@@ -119,5 +119,5 @@
 	while ((hint=symtab_search_one(name, &i))) {
 		if (!strlen(hint)) {
-			addr =  __u64_le2host(symbol_table[i].address_le);
+			addr =  uint64_t_le2host(symbol_table[i].address_le);
 			found++;
 		}
@@ -125,5 +125,5 @@
 	}
 	if (found > 1)
-		return ((__address) -1);
+		return ((uintptr_t) -1);
 	return addr;
 }
@@ -133,5 +133,5 @@
 {
 	int i;
-	__address addr;
+	uintptr_t addr;
 	char *realname;
 
@@ -139,7 +139,7 @@
 	i = 0;
 	while (symtab_search_one(name, &i)) {
-		addr =  __u64_le2host(symbol_table[i].address_le);
+		addr =  uint64_t_le2host(symbol_table[i].address_le);
 		realname = symbol_table[i].symbol_name;
-		printf("%.*p: %s\n", sizeof(__address) * 2, addr, realname);
+		printf("%.*p: %s\n", sizeof(uintptr_t) * 2, addr, realname);
 		i++;
 	}
Index: generic/src/interrupt/interrupt.c
===================================================================
--- generic/src/interrupt/interrupt.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/interrupt/interrupt.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -110,9 +110,9 @@
 	printf("Exc Description Handler\n");
 	for (i=0; i < IVT_ITEMS; i++) {
-		symbol = get_symtab_entry((__native)exc_table[i].f);
+		symbol = get_symtab_entry((unative_t)exc_table[i].f);
 		if (!symbol)
 			symbol = "not found";
 		printf("%d %s %.*p(%s)\n", i + IVT_FIRST, exc_table[i].name,
-		       sizeof(__address) * 2, exc_table[i].f,symbol);		
+		       sizeof(uintptr_t) * 2, exc_table[i].f,symbol);		
 		if (!((i+1) % 20)) {
 			printf("Press any key to continue.");
Index: generic/src/ipc/ipc.c
===================================================================
--- generic/src/ipc/ipc.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/ipc/ipc.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -62,5 +62,5 @@
 static void _ipc_call_init(call_t *call)
 {
-	memsetb((__address)call, sizeof(*call), 0);
+	memsetb((uintptr_t)call, sizeof(*call), 0);
 	call->callerbox = &TASK->answerbox;
 	call->sender = TASK;
@@ -186,5 +186,5 @@
  * message and sending it as a normal answer.
  */
-void ipc_backsend_err(phone_t *phone, call_t *call, __native err)
+void ipc_backsend_err(phone_t *phone, call_t *call, unative_t err)
 {
 	call->data.phone = phone;
@@ -309,5 +309,5 @@
  * - to distinguish between call and answer, look at call->flags
  */
-call_t * ipc_wait_for_call(answerbox_t *box, __u32 usec, int flags)
+call_t * ipc_wait_for_call(answerbox_t *box, uint32_t usec, int flags)
 {
 	call_t *request;
Index: generic/src/ipc/ipcrsc.c
===================================================================
--- generic/src/ipc/ipcrsc.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/ipc/ipcrsc.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -139,5 +139,5 @@
  * @return NULL on not found, otherwise pointer to call structure
  */
-call_t * get_call(__native callid)
+call_t * get_call(unative_t callid)
 {
 	link_t *lst;
@@ -148,5 +148,5 @@
 	     lst != &TASK->answerbox.dispatched_calls; lst = lst->next) {
 		call = list_get_instance(lst, call_t, link);
-		if ((__native)call == callid) {
+		if ((unative_t)call == callid) {
 			result = call;
 			break;
Index: generic/src/ipc/irq.c
===================================================================
--- generic/src/ipc/irq.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/ipc/irq.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -73,5 +73,5 @@
 {
 	int i;
-	__native dstval = 0;
+	unative_t dstval = 0;
 	
 	if (!code)
@@ -81,26 +81,26 @@
 		switch (code->cmds[i].cmd) {
 		case CMD_MEM_READ_1:
-			dstval = *((__u8 *)code->cmds[i].addr);
+			dstval = *((uint8_t *)code->cmds[i].addr);
 			break;
 		case CMD_MEM_READ_2:
-			dstval = *((__u16 *)code->cmds[i].addr);
+			dstval = *((uint16_t *)code->cmds[i].addr);
 			break;
 		case CMD_MEM_READ_4:
-			dstval = *((__u32 *)code->cmds[i].addr);
+			dstval = *((uint32_t *)code->cmds[i].addr);
 			break;
 		case CMD_MEM_READ_8:
-			dstval = *((__u64 *)code->cmds[i].addr);
+			dstval = *((uint64_t *)code->cmds[i].addr);
 			break;
 		case CMD_MEM_WRITE_1:
-			*((__u8 *)code->cmds[i].addr) = code->cmds[i].value;
+			*((uint8_t *)code->cmds[i].addr) = code->cmds[i].value;
 			break;
 		case CMD_MEM_WRITE_2:
-			*((__u16 *)code->cmds[i].addr) = code->cmds[i].value;
+			*((uint16_t *)code->cmds[i].addr) = code->cmds[i].value;
 			break;
 		case CMD_MEM_WRITE_4:
-			*((__u32 *)code->cmds[i].addr) = code->cmds[i].value;
+			*((uint32_t *)code->cmds[i].addr) = code->cmds[i].value;
 			break;
 		case CMD_MEM_WRITE_8:
-			*((__u64 *)code->cmds[i].addr) = code->cmds[i].value;
+			*((uint64_t *)code->cmds[i].addr) = code->cmds[i].value;
 			break;
 #if defined(ia32) || defined(amd64)
@@ -235,5 +235,5 @@
  *
  */
-void ipc_irq_send_msg(int irq, __native a1, __native a2, __native a3)
+void ipc_irq_send_msg(int irq, unative_t a1, unative_t a2, unative_t a3)
 {
 	call_t *call;
Index: generic/src/ipc/sysipc.c
===================================================================
--- generic/src/ipc/sysipc.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/ipc/sysipc.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -57,5 +57,5 @@
 
 /** Return true if the method is a system method */
-static inline int is_system_method(__native method)
+static inline int is_system_method(unative_t method)
 {
 	if (method <= IPC_M_LAST_SYSTEM)
@@ -69,5 +69,5 @@
  *   it is useless
  */
-static inline int is_forwardable(__native method)
+static inline int is_forwardable(unative_t method)
 {
 	if (method == IPC_M_PHONE_HUNGUP || method == IPC_M_AS_AREA_SEND \
@@ -132,5 +132,5 @@
 			phone_connect(phoneid,&answer->sender->answerbox);
 			/* Set 'phone identification' as arg3 of response */
-			IPC_SET_ARG3(answer->data, (__native)&TASK->phones[phoneid]);
+			IPC_SET_ARG3(answer->data, (unative_t)&TASK->phones[phoneid]);
 		}
 	} else if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_ME_TO) {
@@ -192,5 +192,5 @@
 			return ELIMIT;
 		/* Set arg3 for server */
-		IPC_SET_ARG3(call->data, (__native)&TASK->phones[newphid]);
+		IPC_SET_ARG3(call->data, (unative_t)&TASK->phones[newphid]);
 		call->flags |= IPC_CALL_CONN_ME_TO;
 		call->private = newphid;
@@ -254,6 +254,6 @@
            -2 on 'Too many async request, handle answers first
  */
-__native sys_ipc_call_sync_fast(__native phoneid, __native method, 
-				__native arg1, ipc_data_t *data)
+unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method, 
+				unative_t arg1, ipc_data_t *data)
 {
 	call_t call;
@@ -278,5 +278,5 @@
 
 /** Synchronous IPC call allowing to send whole message */
-__native sys_ipc_call_sync(__native phoneid, ipc_data_t *question, 
+unative_t sys_ipc_call_sync(unative_t phoneid, ipc_data_t *question, 
 			   ipc_data_t *reply)
 {
@@ -289,5 +289,5 @@
 	rc = copy_from_uspace(&call.data.args, &question->args, sizeof(call.data.args));
 	if (rc != 0)
-		return (__native) rc;
+		return (unative_t) rc;
 
 	GET_CHECK_PHONE(phone, phoneid, return ENOENT);
@@ -324,6 +324,6 @@
            -2 on 'Too many async request, handle answers first
  */
-__native sys_ipc_call_async_fast(__native phoneid, __native method, 
-				 __native arg1, __native arg2)
+unative_t sys_ipc_call_async_fast(unative_t phoneid, unative_t method, 
+				 unative_t arg1, unative_t arg2)
 {
 	call_t *call;
@@ -347,5 +347,5 @@
 		ipc_backsend_err(phone, call, res);
 
-	return (__native) call;
+	return (unative_t) call;
 }
 
@@ -354,5 +354,5 @@
  * @return The same as sys_ipc_call_async
  */
-__native sys_ipc_call_async(__native phoneid, ipc_data_t *data)
+unative_t sys_ipc_call_async(unative_t phoneid, ipc_data_t *data)
 {
 	call_t *call;
@@ -370,5 +370,5 @@
 	if (rc != 0) {
 		ipc_call_free(call);
-		return (__native) rc;
+		return (unative_t) rc;
 	}
 	if (!(res=request_preprocess(call)))
@@ -377,5 +377,5 @@
 		ipc_backsend_err(phone, call, res);
 
-	return (__native) call;
+	return (unative_t) call;
 }
 
@@ -387,6 +387,6 @@
  *          arg3 is not rewritten for certain system IPC
  */
-__native sys_ipc_forward_fast(__native callid, __native phoneid,
-			      __native method, __native arg1)
+unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid,
+			      unative_t method, unative_t arg1)
 {
 	call_t *call;
@@ -429,6 +429,6 @@
 
 /** Send IPC answer */
-__native sys_ipc_answer_fast(__native callid, __native retval, 
-			     __native arg1, __native arg2)
+unative_t sys_ipc_answer_fast(unative_t callid, unative_t retval, 
+			     unative_t arg1, unative_t arg2)
 {
 	call_t *call;
@@ -460,5 +460,5 @@
 
 /** Send IPC answer */
-__native sys_ipc_answer(__native callid, ipc_data_t *data)
+unative_t sys_ipc_answer(unative_t callid, ipc_data_t *data)
 {
 	call_t *call;
@@ -494,5 +494,5 @@
  *
  */
-__native sys_ipc_hangup(int phoneid)
+unative_t sys_ipc_hangup(int phoneid)
 {
 	phone_t *phone;
@@ -514,5 +514,5 @@
  * @return Callid, if callid & 1, then the call is answer
  */
-__native sys_ipc_wait_for_call(ipc_data_t *calldata, __u32 usec, int flags)
+unative_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec, int flags)
 {
 	call_t *call;
@@ -533,5 +533,5 @@
 		ipc_call_free(call);
 		
-		return ((__native)call) | IPC_CALLID_NOTIFICATION;
+		return ((unative_t)call) | IPC_CALLID_NOTIFICATION;
 	}
 
@@ -551,5 +551,5 @@
 		ipc_call_free(call);
 
-		return ((__native)call) | IPC_CALLID_ANSWERED;
+		return ((unative_t)call) | IPC_CALLID_ANSWERED;
 	}
 
@@ -562,9 +562,9 @@
 		return 0;
 	}
-	return (__native)call;
+	return (unative_t)call;
 }
 
 /** Connect irq handler to task */
-__native sys_ipc_register_irq(int irq, irq_code_t *ucode)
+unative_t sys_ipc_register_irq(int irq, irq_code_t *ucode)
 {
 	if (!(cap_get(TASK) & CAP_IRQ_REG))
@@ -572,5 +572,5 @@
 
 	if (irq >= IRQ_COUNT || irq <= -IPC_IRQ_RESERVED_VIRTUAL)
-		return (__native) ELIMIT;
+		return (unative_t) ELIMIT;
 	
 	irq_ipc_bind_arch(irq);
@@ -580,5 +580,5 @@
 
 /* Disconnect irq handler from task */
-__native sys_ipc_unregister_irq(int irq)
+unative_t sys_ipc_unregister_irq(int irq)
 {
 	if (!(cap_get(TASK) & CAP_IRQ_REG))
@@ -586,5 +586,5 @@
 
 	if (irq >= IRQ_COUNT || irq <= -IPC_IRQ_RESERVED_VIRTUAL)
-		return (__native) ELIMIT;
+		return (unative_t) ELIMIT;
 
 	ipc_irq_unregister(&TASK->answerbox, irq);
Index: generic/src/lib/elf.c
===================================================================
--- generic/src/lib/elf.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/lib/elf.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -97,5 +97,5 @@
 	/* Walk through all segment headers and process them. */
 	for (i = 0; i < header->e_phnum; i++) {
-		rc = segment_header(&((elf_segment_header_t *)(((__u8 *) header) + header->e_phoff))[i], header, as);
+		rc = segment_header(&((elf_segment_header_t *)(((uint8_t *) header) + header->e_phoff))[i], header, as);
 		if (rc != EE_OK)
 			return rc;
@@ -104,5 +104,5 @@
 	/* Inspect all section headers and proccess them. */
 	for (i = 0; i < header->e_shnum; i++) {
-		rc = section_header(&((elf_section_header_t *)(((__u8 *) header) + header->e_shoff))[i], header, as);
+		rc = section_header(&((elf_section_header_t *)(((uint8_t *) header) + header->e_shoff))[i], header, as);
 		if (rc != EE_OK)
 			return rc;
Index: generic/src/lib/func.c
===================================================================
--- generic/src/lib/func.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/lib/func.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -149,5 +149,5 @@
 }
 
-/** Convert ascii representation to __native
+/** Convert ascii representation to unative_t
  *
  * Supports 0x for hexa & 0 for octal notation.
@@ -157,8 +157,8 @@
  * @return Converted number or 0 if no valid number ofund 
  */
-__native atoi(const char *text)
+unative_t atoi(const char *text)
 {
 	int base = 10;
-	__native result = 0;
+	unative_t result = 0;
 
 	if (text[0] == '0' && text[1] == 'x') {
Index: generic/src/lib/memstr.c
===================================================================
--- generic/src/lib/memstr.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/lib/memstr.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -62,15 +62,15 @@
 	int i, j;
 	
-	if (ALIGN_UP((__address) src, sizeof(__native)) != (__address) src ||
-		ALIGN_UP((__address) dst, sizeof(__native)) != (__address) dst) {
+	if (ALIGN_UP((uintptr_t) src, sizeof(unative_t)) != (uintptr_t) src ||
+		ALIGN_UP((uintptr_t) dst, sizeof(unative_t)) != (uintptr_t) dst) {
 		for (i = 0; i < cnt; i++)
-			((__u8 *) dst)[i] = ((__u8 *) src)[i];
+			((uint8_t *) dst)[i] = ((uint8_t *) src)[i];
 	} else { 
 	
-		for (i = 0; i < cnt/sizeof(__native); i++)
-			((__native *) dst)[i] = ((__native *) src)[i];
+		for (i = 0; i < cnt/sizeof(unative_t); i++)
+			((unative_t *) dst)[i] = ((unative_t *) src)[i];
 		
-		for (j = 0; j < cnt%sizeof(__native); j++)
-			((__u8 *)(((__native *) dst) + i))[j] = ((__u8 *)(((__native *) src) + i))[j];
+		for (j = 0; j < cnt%sizeof(unative_t); j++)
+			((uint8_t *)(((unative_t *) dst) + i))[j] = ((uint8_t *)(((unative_t *) src) + i))[j];
 	}
 		
@@ -88,8 +88,8 @@
  *
  */
-void _memsetb(__address dst, size_t cnt, __u8 x)
+void _memsetb(uintptr_t dst, size_t cnt, uint8_t x)
 {
 	int i;
-	__u8 *p = (__u8 *) dst;
+	uint8_t *p = (uint8_t *) dst;
 	
 	for(i=0; i<cnt; i++)
@@ -107,8 +107,8 @@
  *
  */
-void _memsetw(__address dst, size_t cnt, __u16 x)
+void _memsetw(uintptr_t dst, size_t cnt, uint16_t x)
 {
 	int i;
-	__u16 *p = (__u16 *) dst;
+	uint16_t *p = (uint16_t *) dst;
 	
 	for(i=0; i<cnt; i++)
Index: generic/src/lib/sort.c
===================================================================
--- generic/src/lib/sort.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/lib/sort.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -64,6 +64,6 @@
 void qsort(void * data, count_t n, size_t e_size, int (* cmp) (void * a, void * b))
 {
-	__u8 buf_tmp[EBUFSIZE];
-	__u8 buf_pivot[EBUFSIZE];
+	uint8_t buf_tmp[EBUFSIZE];
+	uint8_t buf_pivot[EBUFSIZE];
 	void * tmp = buf_tmp;
 	void * pivot = buf_pivot;
@@ -133,5 +133,5 @@
 void bubblesort(void * data, count_t n, size_t e_size, int (* cmp) (void * a, void * b))
 {
-	__u8 buf_slot[EBUFSIZE];
+	uint8_t buf_slot[EBUFSIZE];
 	void * slot = buf_slot;
 	
@@ -185,17 +185,17 @@
 }
 
-int __u8_cmp(void * a, void * b)
-{
-	return (* (__u8 *) a > * (__u8 *)b) ? 1 : (*(__u8 *)a < * (__u8 *)b) ? -1 : 0;
-}
-
-int __u16_cmp(void * a, void * b)
-{
-	return (* (__u16 *) a > * (__u16 *)b) ? 1 : (*(__u16 *)a < * (__u16 *)b) ? -1 : 0;
-}
-
-int __u32_cmp(void * a, void * b)
-{
-	return (* (__u32 *) a > * (__u32 *)b) ? 1 : (*(__u32 *)a < * (__u32 *)b) ? -1 : 0;
+int uint8_t_cmp(void * a, void * b)
+{
+	return (* (uint8_t *) a > * (uint8_t *)b) ? 1 : (*(uint8_t *)a < * (uint8_t *)b) ? -1 : 0;
+}
+
+int uint16_t_cmp(void * a, void * b)
+{
+	return (* (uint16_t *) a > * (uint16_t *)b) ? 1 : (*(uint16_t *)a < * (uint16_t *)b) ? -1 : 0;
+}
+
+int uint32_t_cmp(void * a, void * b)
+{
+	return (* (uint32_t *) a > * (uint32_t *)b) ? 1 : (*(uint32_t *)a < * (uint32_t *)b) ? -1 : 0;
 }
 
Index: generic/src/main/main.c
===================================================================
--- generic/src/main/main.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/main/main.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -102,5 +102,5 @@
  * appropriate sizes and addresses.
  */
-__address hardcoded_load_address = 0;	/**< Virtual address of where the kernel is loaded. */
+uintptr_t hardcoded_load_address = 0;	/**< Virtual address of where the kernel is loaded. */
 size_t hardcoded_ktext_size = 0;	/**< Size of the kernel code in bytes. */
 size_t hardcoded_kdata_size = 0;	/**< Size of the kernel data in bytes. */
@@ -133,5 +133,5 @@
 void main_bsp(void)
 {
-	__address stackaddr;
+	uintptr_t stackaddr;
 
 	config.cpu_count = 1;
@@ -203,5 +203,5 @@
 
 	version_print();
-	printf("%.*p: hardcoded_ktext_size=%zdK, hardcoded_kdata_size=%zdK\n", sizeof(__address) * 2, config.base, hardcoded_ktext_size >> 10, hardcoded_kdata_size >> 10);
+	printf("%.*p: hardcoded_ktext_size=%zdK, hardcoded_kdata_size=%zdK\n", sizeof(uintptr_t) * 2, config.base, hardcoded_ktext_size >> 10, hardcoded_kdata_size >> 10);
 
 	arch_pre_smp_init();
@@ -224,5 +224,5 @@
 	
 	for (i = 0; i < init.cnt; i++)
-		printf("init[%zd].addr=%.*p, init[%zd].size=%zd\n", i, sizeof(__address) * 2, init.tasks[i].addr, i, init.tasks[i].size);
+		printf("init[%zd].addr=%.*p, init[%zd].size=%zd\n", i, sizeof(uintptr_t) * 2, init.tasks[i].addr, i, init.tasks[i].size);
 	
 	ipc_init();
@@ -298,5 +298,5 @@
 	 * switch to this cpu's private stack prior to waking kmp up.
 	 */
-	context_set(&CPU->saved_context, FADDR(main_ap_separated_stack), (__address) CPU->stack, CPU_STACK_SIZE);
+	context_set(&CPU->saved_context, FADDR(main_ap_separated_stack), (uintptr_t) CPU->stack, CPU_STACK_SIZE);
 	context_restore(&CPU->saved_context);
 	/* not reached */
Index: generic/src/mm/as.c
===================================================================
--- generic/src/mm/as.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/mm/as.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -98,6 +98,6 @@
 
 static int area_flags_to_page_flags(int aflags);
-static as_area_t *find_area_and_lock(as_t *as, __address va);
-static bool check_area_conflicts(as_t *as, __address va, size_t size, as_area_t *avoid_area);
+static as_area_t *find_area_and_lock(as_t *as, uintptr_t va);
+static bool check_area_conflicts(as_t *as, uintptr_t va, size_t size, as_area_t *avoid_area);
 static void sh_info_remove_reference(share_info_t *sh_info);
 
@@ -200,5 +200,5 @@
  * @return Address space area on success or NULL on failure.
  */
-as_area_t *as_area_create(as_t *as, int flags, size_t size, __address base, int attrs,
+as_area_t *as_area_create(as_t *as, int flags, size_t size, uintptr_t base, int attrs,
 	       mem_backend_t *backend, mem_backend_data_t *backend_data)
 {
@@ -239,5 +239,5 @@
 		a->backend_data = *backend_data;
 	else
-		memsetb((__address) &a->backend_data, sizeof(a->backend_data), 0);
+		memsetb((uintptr_t) &a->backend_data, sizeof(a->backend_data), 0);
 
 	btree_create(&a->used_space);
@@ -260,5 +260,5 @@
  * @return Zero on success or a value from @ref errno.h otherwise.
  */ 
-int as_area_resize(as_t *as, __address address, size_t size, int flags)
+int as_area_resize(as_t *as, uintptr_t address, size_t size, int flags)
 {
 	as_area_t *area;
@@ -313,5 +313,5 @@
 	if (pages < area->pages) {
 		bool cond;
-		__address start_free = area->base + pages*PAGE_SIZE;
+		uintptr_t start_free = area->base + pages*PAGE_SIZE;
 
 		/*
@@ -338,5 +338,5 @@
 			node = list_get_instance(area->used_space.leaf_head.prev, btree_node_t, leaf_link);
 			if ((cond = (bool) node->keys)) {
-				__address b = node->key[node->keys - 1];
+				uintptr_t b = node->key[node->keys - 1];
 				count_t c = (count_t) node->value[node->keys - 1];
 				int i = 0;
@@ -419,8 +419,8 @@
  * @return Zero on success or a value from @ref errno.h on failure. 
  */
-int as_area_destroy(as_t *as, __address address)
+int as_area_destroy(as_t *as, uintptr_t address)
 {
 	as_area_t *area;
-	__address base;
+	uintptr_t base;
 	link_t *cur;
 	ipl_t ipl;
@@ -452,5 +452,5 @@
 		node = list_get_instance(cur, btree_node_t, leaf_link);
 		for (i = 0; i < node->keys; i++) {
-			__address b = node->key[i];
+			uintptr_t b = node->key[i];
 			count_t j;
 			pte_t *pte;
@@ -519,6 +519,6 @@
  *	   to share non-anonymous address space area is detected.
  */
-int as_area_share(as_t *src_as, __address src_base, size_t acc_size,
-		  as_t *dst_as, __address dst_base, int dst_flags_mask)
+int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size,
+		  as_t *dst_as, uintptr_t dst_base, int dst_flags_mask)
 {
 	ipl_t ipl;
@@ -666,5 +666,5 @@
  * 	   fault was caused by copy_to_uspace() or copy_from_uspace().
  */
-int as_page_fault(__address page, pf_access_t access, istate_t *istate)
+int as_page_fault(uintptr_t page, pf_access_t access, istate_t *istate)
 {
 	pte_t *pte;
@@ -745,8 +745,8 @@
 	if (THREAD->in_copy_from_uspace) {
 		THREAD->in_copy_from_uspace = false;
-		istate_set_retaddr(istate, (__address) &memcpy_from_uspace_failover_address);
+		istate_set_retaddr(istate, (uintptr_t) &memcpy_from_uspace_failover_address);
 	} else if (THREAD->in_copy_to_uspace) {
 		THREAD->in_copy_to_uspace = false;
-		istate_set_retaddr(istate, (__address) &memcpy_to_uspace_failover_address);
+		istate_set_retaddr(istate, (uintptr_t) &memcpy_to_uspace_failover_address);
 	} else {
 		return AS_PF_FAULT;
@@ -943,5 +943,5 @@
  * @return Locked address space area containing va on success or NULL on failure.
  */
-as_area_t *find_area_and_lock(as_t *as, __address va)
+as_area_t *find_area_and_lock(as_t *as, uintptr_t va)
 {
 	as_area_t *a;
@@ -999,5 +999,5 @@
  * @return True if there is no conflict, false otherwise.
  */
-bool check_area_conflicts(as_t *as, __address va, size_t size, as_area_t *avoid_area)
+bool check_area_conflicts(as_t *as, uintptr_t va, size_t size, as_area_t *avoid_area)
 {
 	as_area_t *a;
@@ -1072,5 +1072,5 @@
 
 /** Return size of the address space area with given base.  */
-size_t as_get_size(__address base)
+size_t as_get_size(uintptr_t base)
 {
 	ipl_t ipl;
@@ -1100,5 +1100,5 @@
  * @return 0 on failure and 1 on success.
  */
-int used_space_insert(as_area_t *a, __address page, count_t count)
+int used_space_insert(as_area_t *a, uintptr_t page, count_t count)
 {
 	btree_node_t *leaf, *node;
@@ -1124,5 +1124,5 @@
 	node = btree_leaf_node_left_neighbour(&a->used_space, leaf);
 	if (node) {
-		__address left_pg = node->key[node->keys - 1], right_pg = leaf->key[0];
+		uintptr_t left_pg = node->key[node->keys - 1], right_pg = leaf->key[0];
 		count_t left_cnt = (count_t) node->value[node->keys - 1], right_cnt = (count_t) leaf->value[0];
 		
@@ -1167,5 +1167,5 @@
 		}
 	} else if (page < leaf->key[0]) {
-		__address right_pg = leaf->key[0];
+		uintptr_t right_pg = leaf->key[0];
 		count_t right_cnt = (count_t) leaf->value[0];
 	
@@ -1198,5 +1198,5 @@
 	node = btree_leaf_node_right_neighbour(&a->used_space, leaf);
 	if (node) {
-		__address left_pg = leaf->key[leaf->keys - 1], right_pg = node->key[0];
+		uintptr_t left_pg = leaf->key[leaf->keys - 1], right_pg = node->key[0];
 		count_t left_cnt = (count_t) leaf->value[leaf->keys - 1], right_cnt = (count_t) node->value[0];
 		
@@ -1241,5 +1241,5 @@
 		}
 	} else if (page >= leaf->key[leaf->keys - 1]) {
-		__address left_pg = leaf->key[leaf->keys - 1];
+		uintptr_t left_pg = leaf->key[leaf->keys - 1];
 		count_t left_cnt = (count_t) leaf->value[leaf->keys - 1];
 	
@@ -1273,5 +1273,5 @@
 	for (i = 1; i < leaf->keys; i++) {
 		if (page < leaf->key[i]) {
-			__address left_pg = leaf->key[i - 1], right_pg = leaf->key[i];
+			uintptr_t left_pg = leaf->key[i - 1], right_pg = leaf->key[i];
 			count_t left_cnt = (count_t) leaf->value[i - 1], right_cnt = (count_t) leaf->value[i];
 
@@ -1327,5 +1327,5 @@
  * @return 0 on failure and 1 on success.
  */
-int used_space_remove(as_area_t *a, __address page, count_t count)
+int used_space_remove(as_area_t *a, uintptr_t page, count_t count)
 {
 	btree_node_t *leaf, *node;
@@ -1364,5 +1364,5 @@
 	node = btree_leaf_node_left_neighbour(&a->used_space, leaf);
 	if (node && page < leaf->key[0]) {
-		__address left_pg = node->key[node->keys - 1];
+		uintptr_t left_pg = node->key[node->keys - 1];
 		count_t left_cnt = (count_t) node->value[node->keys - 1];
 
@@ -1397,5 +1397,5 @@
 	
 	if (page > leaf->key[leaf->keys - 1]) {
-		__address left_pg = leaf->key[leaf->keys - 1];
+		uintptr_t left_pg = leaf->key[leaf->keys - 1];
 		count_t left_cnt = (count_t) leaf->value[leaf->keys - 1];
 
@@ -1433,5 +1433,5 @@
 	for (i = 1; i < leaf->keys - 1; i++) {
 		if (page < leaf->key[i]) {
-			__address left_pg = leaf->key[i - 1];
+			uintptr_t left_pg = leaf->key[i - 1];
 			count_t left_cnt = (count_t) leaf->value[i - 1];
 
@@ -1497,5 +1497,5 @@
 			node = list_get_instance(cur, btree_node_t, leaf_link);
 			for (i = 0; i < node->keys; i++) 
-				frame_free((__address) node->value[i]);
+				frame_free((uintptr_t) node->value[i]);
 		}
 		
@@ -1514,22 +1514,22 @@
 
 /** Wrapper for as_area_create(). */
-__native sys_as_area_create(__address address, size_t size, int flags)
+unative_t sys_as_area_create(uintptr_t address, size_t size, int flags)
 {
 	if (as_area_create(AS, flags | AS_AREA_CACHEABLE, size, address, AS_AREA_ATTR_NONE, &anon_backend, NULL))
-		return (__native) address;
+		return (unative_t) address;
 	else
-		return (__native) -1;
+		return (unative_t) -1;
 }
 
 /** Wrapper for as_area_resize. */
-__native sys_as_area_resize(__address address, size_t size, int flags)
-{
-	return (__native) as_area_resize(AS, address, size, 0);
+unative_t sys_as_area_resize(uintptr_t address, size_t size, int flags)
+{
+	return (unative_t) as_area_resize(AS, address, size, 0);
 }
 
 /** Wrapper for as_area_destroy. */
-__native sys_as_area_destroy(__address address)
-{
-	return (__native) as_area_destroy(AS, address);
+unative_t sys_as_area_destroy(uintptr_t address)
+{
+	return (unative_t) as_area_destroy(AS, address);
 }
 
Index: generic/src/mm/backend_anon.c
===================================================================
--- generic/src/mm/backend_anon.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/mm/backend_anon.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -52,6 +52,6 @@
 #include <arch.h>
 
-static int anon_page_fault(as_area_t *area, __address addr, pf_access_t access);
-static void anon_frame_free(as_area_t *area, __address page, __address frame);
+static int anon_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access);
+static void anon_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame);
 static void anon_share(as_area_t *area);
 
@@ -72,7 +72,7 @@
  * @return AS_PF_FAULT on failure (i.e. page fault) or AS_PF_OK on success (i.e. serviced).
  */
-int anon_page_fault(as_area_t *area, __address addr, pf_access_t access)
+int anon_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access)
 {
-	__address frame;
+	uintptr_t frame;
 
 	if (!as_area_check_access(area, access))
@@ -89,5 +89,5 @@
 		 */
 		mutex_lock(&area->sh_info->lock);
-		frame = (__address) btree_search(&area->sh_info->pagemap,
+		frame = (uintptr_t) btree_search(&area->sh_info->pagemap,
 			ALIGN_DOWN(addr, PAGE_SIZE) - area->base, &leaf);
 		if (!frame) {
@@ -106,5 +106,5 @@
 			}
 			if (allocate) {
-				frame = (__address) frame_alloc(ONE_FRAME, 0);
+				frame = (uintptr_t) frame_alloc(ONE_FRAME, 0);
 				memsetb(PA2KA(frame), FRAME_SIZE, 0);
 				
@@ -133,5 +133,5 @@
 		 *   the different causes
 		 */
-		frame = (__address)frame_alloc(ONE_FRAME, 0);
+		frame = (uintptr_t)frame_alloc(ONE_FRAME, 0);
 		memsetb(PA2KA(frame), FRAME_SIZE, 0);
 	}
@@ -157,5 +157,5 @@
  * @param frame Frame to be released.
  */
-void anon_frame_free(as_area_t *area, __address page, __address frame)
+void anon_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame)
 {
 	frame_free(frame);
@@ -185,5 +185,5 @@
 		node = list_get_instance(cur, btree_node_t, leaf_link);
 		for (i = 0; i < node->keys; i++) {
-			__address base = node->key[i];
+			uintptr_t base = node->key[i];
 			count_t count = (count_t) node->value[i];
 			int j;
Index: generic/src/mm/backend_elf.c
===================================================================
--- generic/src/mm/backend_elf.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/mm/backend_elf.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -51,6 +51,6 @@
 #include <arch.h>
 
-static int elf_page_fault(as_area_t *area, __address addr, pf_access_t access);
-static void elf_frame_free(as_area_t *area, __address page, __address frame);
+static int elf_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access);
+static void elf_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame);
 static void elf_share(as_area_t *area);
 
@@ -71,10 +71,10 @@
  * @return AS_PF_FAULT on failure (i.e. page fault) or AS_PF_OK on success (i.e. serviced).
  */
-int elf_page_fault(as_area_t *area, __address addr, pf_access_t access)
+int elf_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access)
 {
 	elf_header_t *elf = area->backend_data.elf;
 	elf_segment_header_t *entry = area->backend_data.segment;
 	btree_node_t *leaf;
-	__address base, frame;
+	uintptr_t base, frame;
 	index_t i;
 
@@ -84,5 +84,5 @@
 	ASSERT((addr >= entry->p_vaddr) && (addr < entry->p_vaddr + entry->p_memsz));
 	i = (addr - entry->p_vaddr) >> PAGE_WIDTH;
-	base = (__address) (((void *) elf) + entry->p_offset);
+	base = (uintptr_t) (((void *) elf) + entry->p_offset);
 	ASSERT(ALIGN_UP(base, FRAME_SIZE) == base);
 
@@ -95,5 +95,5 @@
 		 
 		mutex_lock(&area->sh_info->lock);
-		frame = (__address) btree_search(&area->sh_info->pagemap,
+		frame = (uintptr_t) btree_search(&area->sh_info->pagemap,
 			ALIGN_DOWN(addr, PAGE_SIZE) - area->base, &leaf);
 		if (!frame) {
@@ -135,5 +135,5 @@
 		 */
 		if (entry->p_flags & PF_W) {
-			frame = (__address)frame_alloc(ONE_FRAME, 0);
+			frame = (uintptr_t)frame_alloc(ONE_FRAME, 0);
 			memcpy((void *) PA2KA(frame), (void *) (base + i*FRAME_SIZE), FRAME_SIZE);
 			
@@ -154,5 +154,5 @@
 		 * and cleared.
 		 */
-		frame = (__address)frame_alloc(ONE_FRAME, 0);
+		frame = (uintptr_t)frame_alloc(ONE_FRAME, 0);
 		memsetb(PA2KA(frame), FRAME_SIZE, 0);
 
@@ -171,5 +171,5 @@
 		 */
 		size = entry->p_filesz - (i<<PAGE_WIDTH);
-		frame = (__address)frame_alloc(ONE_FRAME, 0);
+		frame = (uintptr_t)frame_alloc(ONE_FRAME, 0);
 		memsetb(PA2KA(frame) + size, FRAME_SIZE - size, 0);
 		memcpy((void *) PA2KA(frame), (void *) (base + i*FRAME_SIZE), size);
@@ -202,14 +202,14 @@
  *
  */
-void elf_frame_free(as_area_t *area, __address page, __address frame)
+void elf_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame)
 {
 	elf_header_t *elf = area->backend_data.elf;
 	elf_segment_header_t *entry = area->backend_data.segment;
-	__address base;
+	uintptr_t base;
 	index_t i;
 	
 	ASSERT((page >= entry->p_vaddr) && (page < entry->p_vaddr + entry->p_memsz));
 	i = (page - entry->p_vaddr) >> PAGE_WIDTH;
-	base = (__address) (((void *) elf) + entry->p_offset);
+	base = (uintptr_t) (((void *) elf) + entry->p_offset);
 	ASSERT(ALIGN_UP(base, FRAME_SIZE) == base);
 	
@@ -246,5 +246,5 @@
 	link_t *cur;
 	btree_node_t *leaf, *node;
-	__address start_anon = entry->p_vaddr + entry->p_filesz;
+	uintptr_t start_anon = entry->p_vaddr + entry->p_filesz;
 
 	/*
@@ -270,5 +270,5 @@
 		
 		for (i = 0; i < node->keys; i++) {
-			__address base = node->key[i];
+			uintptr_t base = node->key[i];
 			count_t count = (count_t) node->value[i];
 			int j;
Index: generic/src/mm/backend_phys.c
===================================================================
--- generic/src/mm/backend_phys.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/mm/backend_phys.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -47,5 +47,5 @@
 #include <align.h>
 
-static int phys_page_fault(as_area_t *area, __address addr, pf_access_t access);
+static int phys_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access);
 static void phys_share(as_area_t *area);
 
@@ -66,7 +66,7 @@
  * @return AS_PF_FAULT on failure (i.e. page fault) or AS_PF_OK on success (i.e. serviced).
  */
-int phys_page_fault(as_area_t *area, __address addr, pf_access_t access)
+int phys_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access)
 {
-	__address base = area->backend_data.base;
+	uintptr_t base = area->backend_data.base;
 
 	if (!as_area_check_access(area, access))
Index: generic/src/mm/buddy.c
===================================================================
--- generic/src/mm/buddy.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/mm/buddy.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -67,5 +67,5 @@
  */
 void buddy_system_create(buddy_system_t *b,
-			 __u8 max_order, 
+			 uint8_t max_order, 
 			 buddy_system_operations_t *op, 
 			 void *data)
@@ -102,6 +102,6 @@
  * @return True if block can be allocated
  */
-bool buddy_system_can_alloc(buddy_system_t *b, __u8 i) {
-	__u8 k;
+bool buddy_system_can_alloc(buddy_system_t *b, uint8_t i) {
+	uint8_t k;
 	
 	/*
@@ -131,5 +131,5 @@
 {
 	link_t *left,*right, *tmp;
-	__u8 order;
+	uint8_t order;
 
 	left = b->op->find_block(b, block, BUDDY_SYSTEM_INNER_BLOCK);
@@ -168,5 +168,5 @@
  * @return Block of data represented by link_t.
  */
-link_t *buddy_system_alloc(buddy_system_t *b, __u8 i)
+link_t *buddy_system_alloc(buddy_system_t *b, uint8_t i)
 {
 	link_t *res, *hlp;
@@ -231,5 +231,5 @@
 {
 	link_t *buddy, *hlp;
-	__u8 i;
+	uint8_t i;
 
 	/*
Index: generic/src/mm/frame.c
===================================================================
--- generic/src/mm/frame.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/mm/frame.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -70,5 +70,5 @@
 typedef struct {
 	count_t refcount;	/**< tracking of shared frames  */
-	__u8 buddy_order;	/**< buddy system block order */
+	uint8_t buddy_order;	/**< buddy system block order */
 	link_t buddy_link;	/**< link to the next free block inside one order */
 	void *parent;           /**< If allocated by slab, this points there */
@@ -218,5 +218,5 @@
 
 /** @return True if zone can allocate specified order */
-static int zone_can_alloc(zone_t *z, __u8 order)
+static int zone_can_alloc(zone_t *z, uint8_t order)
 {
 	return buddy_system_can_alloc(z->buddy_system, order);
@@ -231,5 +231,5 @@
  * @param pzone Pointer to preferred zone or NULL, on return contains zone number
  */
-static zone_t * find_free_zone_lock(__u8 order, int *pzone)
+static zone_t * find_free_zone_lock(uint8_t order, int *pzone)
 {
 	int i;
@@ -272,5 +272,5 @@
  */
 static link_t *zone_buddy_find_block(buddy_system_t *b, link_t *child,
-				     __u8 order)
+				     uint8_t order)
 {
 	frame_t * frame;
@@ -381,5 +381,5 @@
  * @param order Order to set
  */
-static void zone_buddy_set_order(buddy_system_t *b, link_t * block, __u8 order) {
+static void zone_buddy_set_order(buddy_system_t *b, link_t * block, uint8_t order) {
 	frame_t * frame;
 	frame = list_get_instance(block, frame_t, buddy_link);
@@ -394,5 +394,5 @@
  * @return Order of block
  */
-static __u8 zone_buddy_get_order(buddy_system_t *b, link_t * block) {
+static uint8_t zone_buddy_get_order(buddy_system_t *b, link_t * block) {
 	frame_t * frame;
 	frame = list_get_instance(block, frame_t, buddy_link);
@@ -451,5 +451,5 @@
  *
  */
-static pfn_t zone_frame_alloc(zone_t *zone, __u8 order)
+static pfn_t zone_frame_alloc(zone_t *zone, uint8_t order)
 {
 	pfn_t v;
@@ -484,5 +484,5 @@
 {
 	frame_t *frame;
-	__u8 order;
+	uint8_t order;
 
 	frame = &zone->frames[frame_idx];
@@ -538,5 +538,5 @@
 static void _zone_merge(zone_t *z, zone_t *z1, zone_t *z2)
 {
-	__u8 max_order;
+	uint8_t max_order;
 	int i, z2idx;
 	pfn_t frame_idx;
@@ -625,5 +625,5 @@
 	int i;
 
-	pfn = ADDR2PFN((__address)KA2PA(oldzone));
+	pfn = ADDR2PFN((uintptr_t)KA2PA(oldzone));
 	cframes = SIZE2FRAMES(zone_conf_size(oldzone->count));
 	
@@ -654,5 +654,5 @@
 {
 	count_t i;
-	__u8 order;
+	uint8_t order;
 	frame_t *frame;
 	
@@ -690,5 +690,5 @@
 	zone_t *zone1, *zone2, *newzone;
 	int cframes;
-	__u8 order;
+	uint8_t order;
 	int i;
 	pfn_t pfn;
@@ -780,5 +780,5 @@
 {
 	int i;
-	__u8 max_order;
+	uint8_t max_order;
 
 	spinlock_initialize(&z->lock, "zone_lock");
@@ -818,5 +818,5 @@
  * @return Size of zone configuration info (in bytes)
  */
-__address zone_conf_size(count_t count)
+uintptr_t zone_conf_size(count_t count)
 {
 	int size = sizeof(zone_t) + count*sizeof(frame_t);
@@ -846,5 +846,5 @@
 {
 	zone_t *z;
-	__address addr;
+	uintptr_t addr;
 	count_t confcount;
 	int i;
@@ -932,5 +932,5 @@
  *
  */
-void * frame_alloc_generic(__u8 order, int flags, int *pzone) 
+void * frame_alloc_generic(uint8_t order, int flags, int *pzone) 
 {
 	ipl_t ipl;
@@ -991,5 +991,5 @@
  * @param Frame Physical Address of of the frame to be freed.
  */
-void frame_free(__address frame)
+void frame_free(uintptr_t frame)
 {
 	ipl_t ipl;
@@ -1100,5 +1100,5 @@
 		zone = zones.info[i];
 		spinlock_lock(&zone->lock);
-		printf("%d: %.*p \t%10zd\t%10zd\n", i, sizeof(__address) * 2, PFN2ADDR(zone->base), zone->free_count, zone->busy_count);
+		printf("%d: %.*p \t%10zd\t%10zd\n", i, sizeof(uintptr_t) * 2, PFN2ADDR(zone->base), zone->free_count, zone->busy_count);
 		spinlock_unlock(&zone->lock);
 	}
@@ -1132,5 +1132,5 @@
 	spinlock_lock(&zone->lock);
 	printf("Memory zone information\n");
-	printf("Zone base address: %#.*p\n", sizeof(__address) * 2, PFN2ADDR(zone->base));
+	printf("Zone base address: %#.*p\n", sizeof(uintptr_t) * 2, PFN2ADDR(zone->base));
 	printf("Zone size: %zd frames (%zdK)\n", zone->count, ((zone->count) * FRAME_SIZE) >> 10);
 	printf("Allocated space: %zd frames (%zdK)\n", zone->busy_count, (zone->busy_count * FRAME_SIZE) >> 10);
Index: generic/src/mm/page.c
===================================================================
--- generic/src/mm/page.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/mm/page.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -70,5 +70,5 @@
  * @param size Size of the structure.
  */
-void map_structure(__address s, size_t size)
+void map_structure(uintptr_t s, size_t size)
 {
 	int i, cnt, length;
@@ -94,5 +94,5 @@
  * @param flags Flags to be used for mapping.
  */
-void page_mapping_insert(as_t *as, __address page, __address frame, int flags)
+void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame, int flags)
 {
 	ASSERT(page_mapping_operations);
@@ -113,5 +113,5 @@
  * @param page Virtual address of the page to be demapped.
  */
-void page_mapping_remove(as_t *as, __address page)
+void page_mapping_remove(as_t *as, uintptr_t page)
 {
 	ASSERT(page_mapping_operations);
@@ -132,5 +132,5 @@
  * @return NULL if there is no such mapping; requested mapping otherwise.
  */
-pte_t *page_mapping_find(as_t *as, __address page)
+pte_t *page_mapping_find(as_t *as, uintptr_t page)
 {
 	ASSERT(page_mapping_operations);
Index: generic/src/mm/slab.c
===================================================================
--- generic/src/mm/slab.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/mm/slab.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -550,5 +550,5 @@
 	cache->mag_cache = malloc(sizeof(slab_mag_cache_t)*config.cpu_count,0);
 	for (i=0; i < config.cpu_count; i++) {
-		memsetb((__address)&cache->mag_cache[i],
+		memsetb((uintptr_t)&cache->mag_cache[i],
 			sizeof(cache->mag_cache[i]), 0);
 		spinlock_initialize(&cache->mag_cache[i].lock, 
@@ -570,9 +570,9 @@
 	ipl_t ipl;
 
-	memsetb((__address)cache, sizeof(*cache), 0);
+	memsetb((uintptr_t)cache, sizeof(*cache), 0);
 	cache->name = name;
 
-	if (align < sizeof(__native))
-		align = sizeof(__native);
+	if (align < sizeof(unative_t))
+		align = sizeof(unative_t);
 	size = ALIGN_UP(size, align);
 		
@@ -821,5 +821,5 @@
 			   "slab_magazine",
 			   sizeof(slab_magazine_t)+SLAB_MAG_SIZE*sizeof(void*),
-			   sizeof(__address),
+			   sizeof(uintptr_t),
 			   NULL, NULL,
 			   SLAB_CACHE_NOMAGAZINE | SLAB_CACHE_SLINSIDE);
@@ -828,5 +828,5 @@
 			   "slab_cache",
 			   sizeof(slab_cache_cache),
-			   sizeof(__address),
+			   sizeof(uintptr_t),
 			   NULL, NULL,
 			   SLAB_CACHE_NOMAGAZINE | SLAB_CACHE_SLINSIDE);
Index: generic/src/mm/tlb.c
===================================================================
--- generic/src/mm/tlb.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/mm/tlb.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -79,5 +79,5 @@
  * @param count Number of pages, if required by type.
  */
-void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, __address page, count_t count)
+void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, uintptr_t page, count_t count)
 {
 	int i;
@@ -142,5 +142,5 @@
 	tlb_invalidate_type_t type;
 	asid_t asid;
-	__address page;
+	uintptr_t page;
 	count_t count;
 	int i;
Index: generic/src/printf/printf_core.c
===================================================================
--- generic/src/printf/printf_core.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/printf/printf_core.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -89,7 +89,7 @@
  * @return string length without trailing zero.
  */
-static __native strlen(const char *str) 
-{
-	__native counter = 0;
+static unative_t strlen(const char *str) 
+{
+	unative_t counter = 0;
 
 	while (str[counter] != 0) {
@@ -147,5 +147,5 @@
  * @return number of printed characters, negative value on fail
  */
-static int print_char(char c, int width, __u64 flags, struct printf_spec *ps)
+static int print_char(char c, int width, uint64_t flags, struct printf_spec *ps)
 {
 	int counter = 0;
@@ -177,5 +177,5 @@
  */
 						
-static int print_string(char *s, int width, int precision, __u64 flags, struct printf_spec *ps)
+static int print_string(char *s, int width, int precision, uint64_t flags, struct printf_spec *ps)
 {
 	int counter = 0;
@@ -237,5 +237,5 @@
  *
  */
-static int print_number(__u64 num, int width, int precision, int base , __u64 flags, struct printf_spec *ps)
+static int print_number(uint64_t num, int width, int precision, int base , uint64_t flags, struct printf_spec *ps)
 {
 	char *digits = digits_small;
@@ -428,5 +428,5 @@
  * 	- "l"	Signed or usigned long int.@n
  * 	- "ll"	Signed or usigned long long int.@n
- * 	- "z"	__native (non-standard extension).@n
+ * 	- "z"	unative_t (non-standard extension).@n
  * 
  * 
@@ -467,8 +467,8 @@
 	qualifier_t qualifier;	/* type of argument */
 	int base;	/**< base in which will be parameter (numbers only) printed */
-	__u64 number; /**< argument value */
+	uint64_t number; /**< argument value */
 	size_t	size; /**< byte size of integer parameter */
 	int width, precision;
-	__u64 flags;
+	uint64_t flags;
 	
 	counter = 0;
@@ -563,5 +563,5 @@
 					}
 					break;
-				case 'z':	/* __native */
+				case 'z':	/* unative_t */
 					qualifier = PrintfQualifierNative;
 					break;
@@ -645,29 +645,29 @@
 				case PrintfQualifierByte:
 					size = sizeof(unsigned char);
-					number = (__u64)va_arg(ap, unsigned int);
+					number = (uint64_t)va_arg(ap, unsigned int);
 					break;
 				case PrintfQualifierShort:
 					size = sizeof(unsigned short);
-					number = (__u64)va_arg(ap, unsigned int);
+					number = (uint64_t)va_arg(ap, unsigned int);
 					break;
 				case PrintfQualifierInt:
 					size = sizeof(unsigned int);
-					number = (__u64)va_arg(ap, unsigned int);
+					number = (uint64_t)va_arg(ap, unsigned int);
 					break;
 				case PrintfQualifierLong:
 					size = sizeof(unsigned long);
-					number = (__u64)va_arg(ap, unsigned long);
+					number = (uint64_t)va_arg(ap, unsigned long);
 					break;
 				case PrintfQualifierLongLong:
 					size = sizeof(unsigned long long);
-					number = (__u64)va_arg(ap, unsigned long long);
+					number = (uint64_t)va_arg(ap, unsigned long long);
 					break;
 				case PrintfQualifierPointer:
 					size = sizeof(void *);
-					number = (__u64)(unsigned long)va_arg(ap, void *);
+					number = (uint64_t)(unsigned long)va_arg(ap, void *);
 					break;
 				case PrintfQualifierNative:
-					size = sizeof(__native);
-					number = (__u64)va_arg(ap, __native);
+					size = sizeof(unative_t);
+					number = (uint64_t)va_arg(ap, unative_t);
 					break;
 				default: /* Unknown qualifier */
@@ -680,6 +680,6 @@
 					flags |= __PRINTF_FLAG_NEGATIVE;
 				
-					if (size == sizeof(__u64)) {
-						number = -((__s64)number);
+					if (size == sizeof(uint64_t)) {
+						number = -((int64_t)number);
 					} else {
 						number = ~number;
@@ -704,5 +704,5 @@
 	
 	if (i > j) {
-		if ((retval = printf_putnchars(&fmt[j], (__native)(i - j), ps)) < 0) { /* error */
+		if ((retval = printf_putnchars(&fmt[j], (unative_t)(i - j), ps)) < 0) { /* error */
 			counter = -counter;
 			goto out;
Index: generic/src/proc/scheduler.c
===================================================================
--- generic/src/proc/scheduler.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/proc/scheduler.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -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 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/proc/task.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -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 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/proc/thread.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -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();
Index: generic/src/security/cap.c
===================================================================
--- generic/src/security/cap.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/security/cap.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -95,5 +95,5 @@
  * @return Zero on success or an error code from @ref errno.h.
  */
-__native sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps)
+unative_t sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps)
 {
 	sysarg64_t taskid_arg;
@@ -103,9 +103,9 @@
 	
 	if (!(cap_get(TASK) & CAP_CAP))
-		return (__native) EPERM;
+		return (unative_t) EPERM;
 	
 	rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t));
 	if (rc != 0)
-		return (__native) rc;
+		return (unative_t) rc;
 		
 	ipl = interrupts_disable();
@@ -115,5 +115,5 @@
 		spinlock_unlock(&tasks_lock);
 		interrupts_restore(ipl);
-		return (__native) ENOENT;
+		return (unative_t) ENOENT;
 	}
 	
@@ -140,5 +140,5 @@
  * @return Zero on success or an error code from @ref errno.h.
  */
-__native sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps)
+unative_t sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps)
 {
 	sysarg64_t taskid_arg;
@@ -149,5 +149,5 @@
 	rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t));
 	if (rc != 0)
-		return (__native) rc;
+		return (unative_t) rc;
 
 	ipl = interrupts_disable();
@@ -157,5 +157,5 @@
 		spinlock_unlock(&tasks_lock);
 		interrupts_restore(ipl);
-		return (__native) ENOENT;
+		return (unative_t) ENOENT;
 	}
 
@@ -168,5 +168,5 @@
 		spinlock_unlock(&tasks_lock);
 		interrupts_restore(ipl);
-		return (__native) EPERM;
+		return (unative_t) EPERM;
 	}
 	
Index: generic/src/synch/condvar.c
===================================================================
--- generic/src/synch/condvar.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/synch/condvar.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -88,5 +88,5 @@
  * @return See comment for waitq_sleep_timeout().
  */
-int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, __u32 usec, int flags)
+int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, uint32_t usec, int flags)
 {
 	int rc;
Index: generic/src/synch/futex.c
===================================================================
--- generic/src/synch/futex.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/synch/futex.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -59,7 +59,7 @@
 static void futex_initialize(futex_t *futex);
 
-static futex_t *futex_find(__address paddr);
-static index_t futex_ht_hash(__native *key);
-static bool futex_ht_compare(__native *key, count_t keys, link_t *item);
+static futex_t *futex_find(uintptr_t paddr);
+static index_t futex_ht_hash(unative_t *key);
+static bool futex_ht_compare(unative_t *key, count_t keys, link_t *item);
 static void futex_ht_remove_callback(link_t *item);
 
@@ -109,8 +109,8 @@
  *	   If there is no physical mapping for uaddr ENOENT is returned.
  */
-__native sys_futex_sleep_timeout(__address uaddr, __u32 usec, int flags)
-{
-	futex_t *futex;
-	__address paddr;
+unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, int flags)
+{
+	futex_t *futex;
+	uintptr_t paddr;
 	pte_t *t;
 	ipl_t ipl;
@@ -126,5 +126,5 @@
 		page_table_unlock(AS, true);
 		interrupts_restore(ipl);
-		return (__native) ENOENT;
+		return (unative_t) ENOENT;
 	}
 	paddr = PTE_GET_FRAME(t) + (uaddr - ALIGN_DOWN(uaddr, PAGE_SIZE));
@@ -135,5 +135,5 @@
 	futex = futex_find(paddr);
 	
-	return (__native) waitq_sleep_timeout(&futex->wq, usec, flags | SYNCH_FLAGS_INTERRUPTIBLE);
+	return (unative_t) waitq_sleep_timeout(&futex->wq, usec, flags | SYNCH_FLAGS_INTERRUPTIBLE);
 }
 
@@ -144,8 +144,8 @@
  * @return ENOENT if there is no physical mapping for uaddr.
  */
-__native sys_futex_wakeup(__address uaddr)
-{
-	futex_t *futex;
-	__address paddr;
+unative_t sys_futex_wakeup(uintptr_t uaddr)
+{
+	futex_t *futex;
+	uintptr_t paddr;
 	pte_t *t;
 	ipl_t ipl;
@@ -161,5 +161,5 @@
 		page_table_unlock(AS, true);
 		interrupts_restore(ipl);
-		return (__native) ENOENT;
+		return (unative_t) ENOENT;
 	}
 	paddr = PTE_GET_FRAME(t) + (uaddr - ALIGN_DOWN(uaddr, PAGE_SIZE));
@@ -183,5 +183,5 @@
  * @return Address of the kernel futex structure.
  */
-futex_t *futex_find(__address paddr)
+futex_t *futex_find(uintptr_t paddr)
 {
 	link_t *item;
@@ -276,5 +276,5 @@
  * @return Index into futex hash table.
  */
-index_t futex_ht_hash(__native *key)
+index_t futex_ht_hash(unative_t *key)
 {
 	return *key & (FUTEX_HT_SIZE-1);
@@ -287,5 +287,5 @@
  * @return True if the item matches the key. False otherwise.
  */
-bool futex_ht_compare(__native *key, count_t keys, link_t *item)
+bool futex_ht_compare(unative_t *key, count_t keys, link_t *item)
 {
 	futex_t *futex;
@@ -324,5 +324,5 @@
 		for (i = 0; i < node->keys; i++) {
 			futex_t *ftx;
-			__address paddr = node->key[i];
+			uintptr_t paddr = node->key[i];
 			
 			ftx = (futex_t *) node->value[i];
Index: generic/src/synch/mutex.c
===================================================================
--- generic/src/synch/mutex.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/synch/mutex.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -65,5 +65,5 @@
  * @return See comment for waitq_sleep_timeout().
  */
-int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int flags)
+int _mutex_lock_timeout(mutex_t *mtx, uint32_t usec, int flags)
 {
 	return _semaphore_down_timeout(&mtx->sem, usec, flags);
Index: generic/src/synch/rwlock.c
===================================================================
--- generic/src/synch/rwlock.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/synch/rwlock.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -102,5 +102,5 @@
  * @return See comment for waitq_sleep_timeout().
  */
-int _rwlock_write_lock_timeout(rwlock_t *rwl, __u32 usec, int flags)
+int _rwlock_write_lock_timeout(rwlock_t *rwl, uint32_t usec, int flags)
 {
 	ipl_t ipl;
@@ -156,5 +156,5 @@
  * @return See comment for waitq_sleep_timeout().
  */
-int _rwlock_read_lock_timeout(rwlock_t *rwl, __u32 usec, int flags)
+int _rwlock_read_lock_timeout(rwlock_t *rwl, uint32_t usec, int flags)
 {
 	int rc;
Index: generic/src/synch/semaphore.c
===================================================================
--- generic/src/synch/semaphore.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/synch/semaphore.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -79,5 +79,5 @@
  * @return See comment for waitq_sleep_timeout().
  */
-int _semaphore_down_timeout(semaphore_t *s, __u32 usec, int flags)
+int _semaphore_down_timeout(semaphore_t *s, uint32_t usec, int flags)
 {
 	return waitq_sleep_timeout(&s->wq, usec, flags); 
Index: generic/src/synch/spinlock.c
===================================================================
--- generic/src/synch/spinlock.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/synch/spinlock.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -109,5 +109,5 @@
 		if (i++ > DEADLOCK_THRESHOLD) {
 			printf("cpu%d: looping on spinlock %.*p:%s, caller=%.*p",
-			       CPU->id, sizeof(__address) * 2, sl, sl->name, sizeof(__address) * 2, CALLER);
+			       CPU->id, sizeof(uintptr_t) * 2, sl, sl->name, sizeof(uintptr_t) * 2, CALLER);
 			symbol = get_symtab_entry(CALLER);
 			if (symbol)
Index: generic/src/synch/waitq.c
===================================================================
--- generic/src/synch/waitq.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/synch/waitq.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -215,5 +215,5 @@
  * attempted.
  */
-int waitq_sleep_timeout(waitq_t *wq, __u32 usec, int flags)
+int waitq_sleep_timeout(waitq_t *wq, uint32_t usec, int flags)
 {
 	ipl_t ipl;
@@ -298,5 +298,5 @@
  * @return See waitq_sleep_timeout().
  */
-int waitq_sleep_timeout_unsafe(waitq_t *wq, __u32 usec, int flags)
+int waitq_sleep_timeout_unsafe(waitq_t *wq, uint32_t usec, int flags)
 {
 	/* checks whether to go to sleep at all */
@@ -352,5 +352,5 @@
 		}
 		THREAD->timeout_pending = true;
-		timeout_register(&THREAD->sleep_timeout, (__u64) usec, waitq_timeouted_sleep, THREAD);
+		timeout_register(&THREAD->sleep_timeout, (uint64_t) usec, waitq_timeouted_sleep, THREAD);
 	}
 
Index: generic/src/syscall/copy.c
===================================================================
--- generic/src/syscall/copy.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/syscall/copy.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -68,5 +68,5 @@
 	
 	if (!KERNEL_ADDRESS_SPACE_SHADOWED) {
-		if (overlaps((__address) uspace_src, size,
+		if (overlaps((uintptr_t) uspace_src, size,
 			KERNEL_ADDRESS_SPACE_START, KERNEL_ADDRESS_SPACE_END-KERNEL_ADDRESS_SPACE_START)) {
 			/*
@@ -109,5 +109,5 @@
 	
 	if (!KERNEL_ADDRESS_SPACE_SHADOWED) {
-		if (overlaps((__address) uspace_dst, size,
+		if (overlaps((uintptr_t) uspace_dst, size,
 			KERNEL_ADDRESS_SPACE_START, KERNEL_ADDRESS_SPACE_END-KERNEL_ADDRESS_SPACE_START)) {
 			/*
Index: generic/src/syscall/syscall.c
===================================================================
--- generic/src/syscall/syscall.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/syscall/syscall.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -59,5 +59,5 @@
  * this syscall to facilitate it.
  */
-static __native sys_io(int fd, const void * buf, size_t count) 
+static unative_t sys_io(int fd, const void * buf, size_t count) 
 {
 	size_t i;
@@ -86,5 +86,5 @@
 
 /** Tell kernel to get keyboard/console access again */
-static __native sys_debug_enable_console(void)
+static unative_t sys_debug_enable_console(void)
 {
 	arch_grab_console();
@@ -93,8 +93,8 @@
 
 /** Dispatch system call */
-__native syscall_handler(__native a1, __native a2, __native a3,
-			 __native a4, __native id)
+unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
+			 unative_t a4, unative_t id)
 {
-	__native rc;
+	unative_t rc;
 
 	if (id < SYSCALL_END)
Index: generic/src/sysinfo/sysinfo.c
===================================================================
--- generic/src/sysinfo/sysinfo.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/sysinfo/sysinfo.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -168,5 +168,5 @@
 }
 
-void sysinfo_set_item_val(const char *name, sysinfo_item_t **root, __native val)
+void sysinfo_set_item_val(const char *name, sysinfo_item_t **root, unative_t val)
 {
 	if (root == NULL)
@@ -223,5 +223,5 @@
 	while (root != NULL) {
 		int i;
-		__native val = 0;
+		unative_t val = 0;
 		char *vtype = NULL;
 		
@@ -279,5 +279,5 @@
 }
 
-__native sys_sysinfo_valid(__native ptr, __native len)
+unative_t sys_sysinfo_valid(unative_t ptr, unative_t len)
 {
 	char *str;
@@ -293,5 +293,5 @@
 }
 
-__native sys_sysinfo_value(__native ptr, __native len)
+unative_t sys_sysinfo_value(unative_t ptr, unative_t len)
 {
 	char *str;
Index: generic/src/time/clock.c
===================================================================
--- generic/src/time/clock.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/time/clock.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -58,7 +58,7 @@
 /* Pointers to public variables with time */
 struct ptime {
-	__native seconds1;
-	__native useconds;
-	__native seconds2;
+	unative_t seconds1;
+	unative_t useconds;
+	unative_t seconds2;
 };
 struct ptime *public_time;
@@ -66,5 +66,5 @@
  * seconds correctly
  */
-static __native secfrag = 0;
+static unative_t secfrag = 0;
 
 /** Initialize realtime clock counter
@@ -91,5 +91,5 @@
 	public_time->useconds = 0; 
 
-	sysinfo_set_item_val("clock.faddr", NULL, (__native)faddr);
+	sysinfo_set_item_val("clock.faddr", NULL, (unative_t)faddr);
 }
 
@@ -166,5 +166,5 @@
 
 	if (THREAD) {
-		__u64 ticks;
+		uint64_t ticks;
 		
 		spinlock_lock(&CPU->lock);
Index: generic/src/time/delay.c
===================================================================
--- generic/src/time/delay.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/time/delay.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -50,5 +50,5 @@
  * @param usec Number of microseconds to sleep.
  */
-void delay(__u32 usec)
+void delay(uint32_t usec)
 {
 	ipl_t ipl;
Index: generic/src/time/timeout.c
===================================================================
--- generic/src/time/timeout.c	(revision 7ee0e2fa610021a3023ca5ce1f183ca5f3f759d2)
+++ generic/src/time/timeout.c	(revision 7f1c620c9e5bd00a90322b5118b47b8b033b5152)
@@ -104,10 +104,10 @@
  *
  */
-void timeout_register(timeout_t *t, __u64 time, timeout_handler_t f, void *arg)
+void timeout_register(timeout_t *t, uint64_t time, timeout_handler_t f, void *arg)
 {
 	timeout_t *hlp = NULL;
 	link_t *l, *m;
 	ipl_t ipl;
-	__u64 sum;
+	uint64_t sum;
 
 	ipl = interrupts_disable();
