summaryrefslogtreecommitdiff
path: root/include/asm-m68k/processor.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2002-07-23 06:24:25 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-07-23 06:24:25 -0700
commit0ff21ea7187f53d3aa23950a0f6cf825b25aaa93 (patch)
treeeeefc548ab933d715d4d02831295d0fd91714eab /include/asm-m68k/processor.h
parentb066fff83faab6dd9efe93dae026f578051ee9d0 (diff)
[PATCH] M68k update (part 42)
M68k task and thread updates
Diffstat (limited to 'include/asm-m68k/processor.h')
-rw-r--r--include/asm-m68k/processor.h50
1 files changed, 16 insertions, 34 deletions
diff --git a/include/asm-m68k/processor.h b/include/asm-m68k/processor.h
index 7ba60318ce28..864e69653644 100644
--- a/include/asm-m68k/processor.h
+++ b/include/asm-m68k/processor.h
@@ -59,11 +59,16 @@ extern inline void wrusp(unsigned long usp) {
#define EISA_bus 0
#define MCA_bus 0
-/*
- * if you change this structure, you must change the code and offsets
- * in m68k/machasm.S
- */
-
+struct task_work {
+ unsigned char sigpending;
+ unsigned char notify_resume; /* request for notification on
+ userspace execution resumption */
+ char need_resched;
+ unsigned char delayed_trace; /* single step a syscall */
+ unsigned char syscall_trace; /* count of syscall interceptors */
+ unsigned char pad[3];
+};
+
struct thread_struct {
unsigned long ksp; /* kernel stack pointer */
unsigned long usp; /* user stack pointer */
@@ -76,11 +81,13 @@ struct thread_struct {
unsigned long fp[8*3];
unsigned long fpcntl[3]; /* fp control regs */
unsigned char fpstate[FPSTATESIZE]; /* floating point state */
+ struct task_work work;
};
-#define INIT_THREAD { \
- sizeof(init_stack) + (unsigned long) init_stack, 0, \
- PS_S, __KERNEL_DS, \
+#define INIT_THREAD { \
+ ksp: sizeof(init_stack) + (unsigned long) init_stack, \
+ sr: PS_S, \
+ fs: __KERNEL_DS, \
}
/*
@@ -117,21 +124,7 @@ static inline void exit_thread(void)
{
}
-/*
- * Return saved PC of a blocked thread.
- */
-extern inline unsigned long thread_saved_pc(struct thread_struct *t)
-{
- extern void scheduling_functions_start_here(void);
- extern void scheduling_functions_end_here(void);
- struct switch_stack *sw = (struct switch_stack *)t->ksp;
- /* Check whether the thread is blocked in resume() */
- if (sw->retpc > (unsigned long)scheduling_functions_start_here &&
- sw->retpc < (unsigned long)scheduling_functions_end_here)
- return ((unsigned long *)sw->a6)[1];
- else
- return sw->retpc;
-}
+extern unsigned long thread_saved_pc(struct task_struct *tsk);
unsigned long get_wchan(struct task_struct *p);
@@ -144,17 +137,6 @@ unsigned long get_wchan(struct task_struct *p);
eip; })
#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
-#define THREAD_SIZE (2*PAGE_SIZE)
-
-/* Allocation and freeing of basic task resources. */
-#define alloc_task_struct() \
- ((struct task_struct *) __get_free_pages(GFP_KERNEL,1))
-#define free_task_struct(p) free_pages((unsigned long)(p),1)
-#define get_task_struct(tsk) atomic_inc(&virt_to_page(tsk)->count)
-
-#define init_task (init_task_union.task)
-#define init_stack (init_task_union.stack)
-
#define cpu_relax() do { } while (0)
#endif