Index: uspace/lib/c/include/async.h
===================================================================
--- uspace/lib/c/include/async.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/async.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -57,15 +57,11 @@
 extern atomic_t threads_in_ipc_wait;
 
+#define async_manager() \
+	fibril_switch(FIBRIL_TO_MANAGER)
+
+#define async_get_call(data) \
+	async_get_call_timeout(data, 0)
+
 extern ipc_callid_t async_get_call_timeout(ipc_call_t *, suseconds_t);
-
-static inline ipc_callid_t async_get_call(ipc_call_t *data)
-{
-	return async_get_call_timeout(data, 0);
-}
-
-static inline void async_manager(void)
-{
-	fibril_switch(FIBRIL_TO_MANAGER);
-}
 
 /*
@@ -142,7 +138,8 @@
  */
 
-extern int async_forward_fast(ipc_callid_t, int, int, sysarg_t, sysarg_t, int);
-extern int async_forward_slow(ipc_callid_t, int, int, sysarg_t, sysarg_t,
-    sysarg_t, sysarg_t, sysarg_t, int);
+extern int async_forward_fast(ipc_callid_t, int, sysarg_t, sysarg_t, sysarg_t,
+    unsigned int);
+extern int async_forward_slow(ipc_callid_t, int, sysarg_t, sysarg_t, sysarg_t,
+    sysarg_t, sysarg_t, sysarg_t, unsigned int);
 
 /*
@@ -305,9 +302,10 @@
 	async_share_in_start((phoneid), (dst), (size), (arg), (flags))
 
-extern int async_share_in_start(int, void *, size_t, sysarg_t, int *);
-extern int async_share_in_receive(ipc_callid_t *, size_t *);
-extern int async_share_in_finalize(ipc_callid_t, void *, int );
-extern int async_share_out_start(int, void *, int);
-extern int async_share_out_receive(ipc_callid_t *, size_t *, int *);
+extern int async_share_in_start(int, void *, size_t, sysarg_t, unsigned int *);
+extern bool async_share_in_receive(ipc_callid_t *, size_t *);
+extern int async_share_in_finalize(ipc_callid_t, void *, unsigned int);
+
+extern int async_share_out_start(int, void *, unsigned int);
+extern bool async_share_out_receive(ipc_callid_t *, size_t *, unsigned int *);
 extern int async_share_out_finalize(ipc_callid_t, void *);
 
@@ -343,5 +341,5 @@
 
 extern int async_data_read_start(int, void *, size_t);
-extern int async_data_read_receive(ipc_callid_t *, size_t *);
+extern bool async_data_read_receive(ipc_callid_t *, size_t *);
 extern int async_data_read_finalize(ipc_callid_t, const void *, size_t);
 
@@ -382,10 +380,10 @@
 
 extern int async_data_write_start(int, const void *, size_t);
-extern int async_data_write_receive(ipc_callid_t *, size_t *);
+extern bool async_data_write_receive(ipc_callid_t *, size_t *);
 extern int async_data_write_finalize(ipc_callid_t, void *, size_t);
 
 extern int async_data_write_accept(void **, const bool, const size_t,
     const size_t, const size_t, size_t *);
-extern void async_data_write_void(const int);
+extern void async_data_write_void(sysarg_t);
 
 extern int async_data_write_forward_fast(int, sysarg_t, sysarg_t, sysarg_t,
Index: uspace/lib/c/include/async_sess.h
===================================================================
--- uspace/lib/c/include/async_sess.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/async_sess.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -45,5 +45,4 @@
 } async_sess_t;
 
-extern void _async_sess_init(void);
 extern void async_session_create(async_sess_t *, int, sysarg_t);
 extern void async_session_destroy(async_sess_t *);
Index: uspace/lib/c/include/byteorder.h
===================================================================
--- uspace/lib/c/include/byteorder.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/byteorder.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -80,8 +80,8 @@
 #endif
 
-#define htons(n)	host2uint16_t_be((n))
-#define htonl(n)	host2uint32_t_be((n))
-#define ntohs(n)	uint16_t_be2host((n))
-#define ntohl(n)	uint32_t_be2host((n))
+#define htons(n)  host2uint16_t_be((n))
+#define htonl(n)  host2uint32_t_be((n))
+#define ntohs(n)  uint16_t_be2host((n))
+#define ntohl(n)  uint32_t_be2host((n))
 
 static inline uint64_t uint64_t_byteorder_swap(uint64_t n)
Index: uspace/lib/c/include/err.h
===================================================================
--- uspace/lib/c/include/err.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/err.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -39,8 +39,8 @@
 
 #define errx(status, fmt, ...) \
-	{ \
+	do { \
 		printf((fmt), ##__VA_ARGS__); \
-		_exit(status); \
-	}
+		exit(status); \
+	} while (0)
 
 #endif
Index: uspace/lib/c/include/errno.h
===================================================================
--- uspace/lib/c/include/errno.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/errno.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -39,7 +39,7 @@
 #include <fibril.h>
 
+#define errno _errno
+
 extern int _errno;
-
-#define errno _errno
 
 #define EMFILE        (-18)
@@ -57,36 +57,35 @@
 
 /** An API function is called while another blocking function is in progress. */
-#define EINPROGRESS	(-10036)
+#define EINPROGRESS  (-10036)
 
 /** The socket identifier is not valid. */
-#define ENOTSOCK	(-10038)
+#define ENOTSOCK  (-10038)
 
 /** The destination address required. */
-#define EDESTADDRREQ	(-10039)
+#define EDESTADDRREQ  (-10039)
 
 /** Protocol is not supported.  */
-#define EPROTONOSUPPORT	(-10043)
+#define EPROTONOSUPPORT  (-10043)
 
 /** Socket type is not supported. */
-#define ESOCKTNOSUPPORT	(-10044)
+#define ESOCKTNOSUPPORT  (-10044)
 
 /** Protocol family is not supported. */
-#define EPFNOSUPPORT	(-10046)
+#define EPFNOSUPPORT  (-10046)
 
 /** Address family is not supported. */
-#define EAFNOSUPPORT	(-10047)
+#define EAFNOSUPPORT  (-10047)
 
 /** Address is already in use. */
-#define EADDRINUSE	(-10048)
+#define EADDRINUSE  (-10048)
 
 /** The socket is not connected or bound. */
-#define ENOTCONN	(-10057)
+#define ENOTCONN  (-10057)
 
 /** The requested operation was not performed. Try again later. */
-#define EAGAIN		(-11002)
+#define EAGAIN  (-11002)
 
-/** No data.
- */
-#define NO_DATA		(-11004)
+/** No data. */
+#define NO_DATA (-11004)
 
 #endif
Index: uspace/lib/c/include/loader/pcb.h
===================================================================
--- uspace/lib/c/include/loader/pcb.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/loader/pcb.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -52,5 +52,5 @@
 	/** Program entry point. */
 	entry_point_t entry;
-
+	
 	/** Current working directory. */
 	char *cwd;
Index: uspace/lib/c/include/malloc.h
===================================================================
--- uspace/lib/c/include/malloc.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/malloc.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -38,5 +38,4 @@
 #include <sys/types.h>
 
-extern void __heap_init(void);
 extern uintptr_t get_max_heap_addr(void);
 
Index: uspace/lib/c/include/setjmp.h
===================================================================
--- uspace/lib/c/include/setjmp.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/setjmp.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -41,5 +41,5 @@
 
 extern int setjmp(jmp_buf env);
-extern void longjmp(jmp_buf env,int val) __attribute__((__noreturn__));
+extern void longjmp(jmp_buf env, int val) __attribute__((noreturn));
 
 #endif
Index: uspace/lib/c/include/stdlib.h
===================================================================
--- uspace/lib/c/include/stdlib.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/stdlib.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -40,29 +40,13 @@
 #include <stacktrace.h>
 
-#define abort() \
-	do { \
-		stacktrace_print(); \
-		_exit(1); \
-	} while (0)
+#define RAND_MAX  714025
 
-#define core() \
-	*((int *) 0) = 0xbadbad;
-
-#define exit(status)  _exit((status))
-
-#define RAND_MAX  714025
+#define rand()       random()
+#define srand(seed)  srandom(seed)
 
 extern long int random(void);
 extern void srandom(unsigned int seed);
 
-static inline int rand(void)
-{
-	return random();
-}
-
-static inline void srand(unsigned int seed)
-{
-	srandom(seed);
-}
+extern void abort(void) __attribute__((noreturn));
 
 #endif
Index: uspace/lib/c/include/syscall.h
===================================================================
--- uspace/lib/c/include/syscall.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/syscall.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -32,7 +32,7 @@
 /**
  * @file
- * @brief	Syscall function declaration for architectures that don't
- *		inline syscalls or architectures that handle syscalls
- *		according to the number of arguments.
+ * @brief Syscall function declaration for architectures that don't
+ *        inline syscalls or architectures that handle syscalls
+ *        according to the number of arguments.
  */
 
@@ -40,6 +40,6 @@
 #define LIBC_SYSCALL_H_
 
-#ifndef	LIBARCH_SYSCALL_GENERIC
-#error "You can't include this file directly."
+#ifndef LIBARCH_SYSCALL_GENERIC
+	#error You cannot include this file directly
 #endif
 
@@ -47,11 +47,11 @@
 #include <kernel/syscall/syscall.h>
 
-#define __syscall0	__syscall
-#define __syscall1	__syscall
-#define __syscall2	__syscall
-#define __syscall3	__syscall
-#define __syscall4	__syscall
-#define __syscall5	__syscall
-#define __syscall6	__syscall
+#define __syscall0  __syscall
+#define __syscall1  __syscall
+#define __syscall2  __syscall
+#define __syscall3  __syscall
+#define __syscall4  __syscall
+#define __syscall5  __syscall
+#define __syscall6  __syscall
 
 extern sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2,
Index: uspace/lib/c/include/thread.h
===================================================================
--- uspace/lib/c/include/thread.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/thread.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -36,5 +36,4 @@
 #define LIBC_THREAD_H_
 
-#include <kernel/proc/uarg.h>
 #include <libarch/thread.h>
 #include <sys/types.h>
@@ -42,9 +41,6 @@
 typedef uint64_t thread_id_t;
 
-extern void __thread_entry(void);
-extern void __thread_main(uspace_arg_t *);
-
 extern int thread_create(void (*)(void *), void *, const char *, thread_id_t *);
-extern void thread_exit(int) __attribute__ ((noreturn));
+extern void thread_exit(int) __attribute__((noreturn));
 extern void thread_detach(thread_id_t);
 extern int thread_join(thread_id_t);
Index: uspace/lib/c/include/tls.h
===================================================================
--- uspace/lib/c/include/tls.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/tls.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -57,4 +57,5 @@
 extern void tls_free_variant_1(tcb_t *, size_t);
 #endif
+
 #ifdef CONFIG_TLS_VARIANT_2
 extern tcb_t *tls_alloc_variant_2(void **, size_t);
Index: uspace/lib/c/include/unistd.h
===================================================================
--- uspace/lib/c/include/unistd.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/unistd.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -41,5 +41,5 @@
 
 #ifndef NULL
-	#define NULL	((void *) 0)
+	#define NULL  ((void *) 0)
 #endif
 
@@ -74,5 +74,5 @@
 extern int chdir(const char *);
 
-extern void _exit(int) __attribute__((noreturn));
+extern void exit(int) __attribute__((noreturn));
 extern int usleep(useconds_t);
 extern unsigned int sleep(unsigned int);
Index: uspace/lib/c/include/vfs/vfs.h
===================================================================
--- uspace/lib/c/include/vfs/vfs.h	(revision fc5f7a8b7a00dd98ac6bacb49dbdfc61d2b775ae)
+++ uspace/lib/c/include/vfs/vfs.h	(revision fc4788545f82a1def816a3bc5940db8c6f0c1a9f)
@@ -57,7 +57,4 @@
 extern int unmount(const char *);
 
-extern void __stdio_init(int filc, fdi_node_t *filv[]);
-extern void __stdio_done(void);
-
 extern int open_node(fdi_node_t *, int);
 extern int fd_phone(int);
