Index: kernel/arch/abs32le/include/context.h
===================================================================
--- kernel/arch/abs32le/include/context.h	(revision d32358f46cafe03f9b3c769982c62f90757ba1c4)
+++ kernel/arch/abs32le/include/context.h	(revision 4cac2d69158253d6b2ffb0a43fa4dc39390f104f)
@@ -39,4 +39,7 @@
 #define SP_DELTA         0
 
+#define context_set(ctx, pc, stack, size) \
+    context_set_generic(ctx, pc, stack, size)
+
 /*
  * On real hardware this stores the registers which
Index: kernel/arch/ia64/include/context.h
===================================================================
--- kernel/arch/ia64/include/context.h	(revision d32358f46cafe03f9b3c769982c62f90757ba1c4)
+++ kernel/arch/ia64/include/context.h	(revision 4cac2d69158253d6b2ffb0a43fa4dc39390f104f)
@@ -48,8 +48,4 @@
  */
 #define SP_DELTA	(0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
-
-#ifdef context_set
-#undef context_set
-#endif
 
 /* RSE stack starts at the bottom of memory stack. */
Index: kernel/arch/mips32/include/context.h
===================================================================
--- kernel/arch/mips32/include/context.h	(revision d32358f46cafe03f9b3c769982c62f90757ba1c4)
+++ kernel/arch/mips32/include/context.h	(revision 4cac2d69158253d6b2ffb0a43fa4dc39390f104f)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup mips32	
+/** @addtogroup mips32
  * @{
  */
@@ -42,10 +42,12 @@
  * Put one item onto the stack to support get_stack_base() and align it up.
  */
-#define SP_DELTA	(0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
-
+#define SP_DELTA  (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
 
 #ifndef __ASM__
 
 #include <arch/types.h>
+
+#define context_set(ctx, pc, stack, size) \
+    context_set_generic(ctx, pc, stack, size)
 
 /*
Index: kernel/arch/ppc32/include/context.h
===================================================================
--- kernel/arch/ppc32/include/context.h	(revision d32358f46cafe03f9b3c769982c62f90757ba1c4)
+++ kernel/arch/ppc32/include/context.h	(revision 4cac2d69158253d6b2ffb0a43fa4dc39390f104f)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ppc32	
+/** @addtogroup ppc32
  * @{
  */
@@ -38,5 +38,8 @@
 #include <arch/types.h>
 
-#define SP_DELTA	16
+#define SP_DELTA  16
+
+#define context_set(ctx, pc, stack, size) \
+    context_set_generic(ctx, pc, stack, size)
 
 typedef struct {
@@ -68,5 +71,5 @@
 	
 	ipl_t ipl;
-} __attribute__ ((packed)) context_t;
+} __attribute__((packed)) context_t;
 
 #endif
Index: kernel/arch/sparc64/include/context.h
===================================================================
--- kernel/arch/sparc64/include/context.h	(revision d32358f46cafe03f9b3c769982c62f90757ba1c4)
+++ kernel/arch/sparc64/include/context.h	(revision 4cac2d69158253d6b2ffb0a43fa4dc39390f104f)
@@ -42,8 +42,4 @@
 #define SP_DELTA	(STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE)
 
-#ifdef context_set
-#undef context_set
-#endif
-
 #define context_set(c, _pc, stack, size)			\
 	(c)->pc = ((uintptr_t) _pc) - 8;			\
Index: kernel/generic/include/context.h
===================================================================
--- kernel/generic/include/context.h	(revision d32358f46cafe03f9b3c769982c62f90757ba1c4)
+++ kernel/generic/include/context.h	(revision 4cac2d69158253d6b2ffb0a43fa4dc39390f104f)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
@@ -39,13 +39,10 @@
 #include <arch/context.h>
 
+#define context_set_generic(ctx, _pc, stack, size) \
+	(ctx)->pc = (uintptr_t) (_pc); \
+	(ctx)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA;
 
-#ifndef context_set
-#define context_set(c, _pc, stack, size) 	\
-	(c)->pc = (uintptr_t) (_pc);		\
-	(c)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA;
-#endif /* context_set */
-
-extern int context_save_arch(context_t *c) __attribute__ ((returns_twice));
-extern void context_restore_arch(context_t *c) __attribute__ ((noreturn));
+extern int context_save_arch(context_t *ctx) __attribute__((returns_twice));
+extern void context_restore_arch(context_t *ctx) __attribute__((noreturn));
 
 /** Save register context.
@@ -73,9 +70,10 @@
  * saved like that would therefore lead to a disaster.
  *
- * @param c		Context structure.
+ * @param ctx Context structure.
  *
- * @return		context_save() returns 1, context_restore() returns 0.
+ * @return context_save() returns 1, context_restore() returns 0.
+ *
  */
-#define context_save(c)   context_save_arch(c)
+#define context_save(ctx)  context_save_arch(ctx)
 
 /** Restore register context.
@@ -88,9 +86,9 @@
  * being return value.
  *
- * @param c		Context structure.
+ * @param ctx Context structure.
  */
-static inline void context_restore(context_t *c)
+static inline void context_restore(context_t *ctx)
 {
-	context_restore_arch(c);
+	context_restore_arch(ctx);
 }
 
