Index: generic/include/arch.h
===================================================================
--- generic/include/arch.h	(revision 35667f8c04b6c9353bcd663e7b47a2b0fad66457)
+++ generic/include/arch.h	(revision e507afa088d8dc5b39f7813ae1e13adf07fa7645)
@@ -53,5 +53,5 @@
  */
 struct the {
-	int preemption_disabled;	/**< Preemption disabled counter. */
+	count_t preemption_disabled;	/**< Preemption disabled counter. */
 	thread_t *thread;		/**< Current thread. */
 	task_t *task;			/**< Current task. */
Index: generic/include/config.h
===================================================================
--- generic/include/config.h	(revision 35667f8c04b6c9353bcd663e7b47a2b0fad66457)
+++ generic/include/config.h	(revision e507afa088d8dc5b39f7813ae1e13adf07fa7645)
@@ -36,6 +36,6 @@
 #define STACK_SIZE		PAGE_SIZE
 
-#define CONFIG_MEMORY_SIZE	8*1024*1024
-#define CONFIG_HEAP_SIZE	300*1024
+#define CONFIG_MEMORY_SIZE	(8*1024*1024)
+#define CONFIG_HEAP_SIZE	(300*1024)
 #define CONFIG_STACK_SIZE	STACK_SIZE
 
Index: generic/include/cpu.h
===================================================================
--- generic/include/cpu.h	(revision 35667f8c04b6c9353bcd663e7b47a2b0fad66457)
+++ generic/include/cpu.h	(revision e507afa088d8dc5b39f7813ae1e13adf07fa7645)
@@ -46,7 +46,7 @@
 	context_t saved_context;
 
-	volatile int nrdy;
+	volatile count_t nrdy;
 	runq_t rq[RQ_COUNT];
-	volatile int needs_relink;
+	volatile count_t needs_relink;
 
 	spinlock_t timeoutlock;
Index: generic/include/proc/scheduler.h
===================================================================
--- generic/include/proc/scheduler.h	(revision 35667f8c04b6c9353bcd663e7b47a2b0fad66457)
+++ generic/include/proc/scheduler.h	(revision e507afa088d8dc5b39f7813ae1e13adf07fa7645)
@@ -39,8 +39,9 @@
 #define NEEDS_RELINK_MAX	(HZ)
 
+/** Scheduler run queue structure. */
 struct runq {
 	spinlock_t lock;
 	link_t rq_head;		/**< List of ready threads. */
-	int n;			/**< Number of threads in rq_ready. */
+	count_t n;		/**< Number of threads in rq_ready. */
 };
 
@@ -52,9 +53,10 @@
 extern void kcpulb(void *arg);
 
+extern void before_thread_runs(void);
+
 /*
  * To be defined by architectures:
  */
  
-extern void before_thread_runs(void);
 extern void before_thread_runs_arch(void);
 
Index: generic/include/synch/rwlock.h
===================================================================
--- generic/include/synch/rwlock.h	(revision 35667f8c04b6c9353bcd663e7b47a2b0fad66457)
+++ generic/include/synch/rwlock.h	(revision e507afa088d8dc5b39f7813ae1e13adf07fa7645)
@@ -44,5 +44,5 @@
 	spinlock_t lock;
 	mutex_t exclusive;	/**< Mutex for writers, readers can bypass it if readers_in is positive. */
-	int readers_in;		/**< Number of readers in critical section. */
+	count_t readers_in;	/**< Number of readers in critical section. */
 };
 
Index: generic/include/typedefs.h
===================================================================
--- generic/include/typedefs.h	(revision 35667f8c04b6c9353bcd663e7b47a2b0fad66457)
+++ generic/include/typedefs.h	(revision e507afa088d8dc5b39f7813ae1e13adf07fa7645)
@@ -40,5 +40,4 @@
 
 typedef struct config config_t;
-typedef struct cpu_private_data cpu_private_data_t;
 typedef struct cpu_info cpu_info_t;
 
