patch-2.4.8 linux/arch/cris/kernel/entryoffsets.c
Next file: linux/arch/cris/kernel/head.S
Previous file: linux/arch/cris/kernel/entry.S
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Thu Jul 26 15:10:06 2001
- Orig file:
v2.4.7/linux/arch/cris/kernel/entryoffsets.c
- Orig date:
Wed Jul 25 17:10:17 2001
diff -u --recursive --new-file v2.4.7/linux/arch/cris/kernel/entryoffsets.c linux/arch/cris/kernel/entryoffsets.c
@@ -18,16 +18,20 @@
#include <asm/processor.h>
/* Exclude everything except the assembly by wrapping it in ".if 0". */
-#undef OF
-#define OF(NAME, TYPE, MEMBER) \
+#undef VAL
+#define VAL(NAME, VALUE) \
void NAME ## _fun (void) \
{ \
__asm__ (".endif \n" \
#NAME " = %0 \n" \
".if 0\n" \
- : : "i" (offsetof (TYPE, MEMBER))); \
+ : : "i" (VALUE)); \
}
+#undef OF
+#define OF(NAME, TYPE, MEMBER) \
+ VAL (NAME, offsetof (TYPE, MEMBER))
+
/* task_struct offsets. */
OF (LTASK_SIGPENDING, struct task_struct, sigpending)
OF (LTASK_NEEDRESCHED, struct task_struct, need_resched)
@@ -50,5 +54,8 @@
OF (LTHREAD_KSP, struct thread_struct, ksp)
OF (LTHREAD_USP, struct thread_struct, usp)
OF (LTHREAD_DCCR, struct thread_struct, dccr)
+
+/* linux/sched.h values - doesn't have an #ifdef __ASSEMBLY__ for these. */
+VAL (LCLONE_VM, CLONE_VM)
__asm__ (".endif");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)