2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
6 #ifndef __UM_PROCESSOR_GENERIC_H
7 #define __UM_PROCESSOR_GENERIC_H
13 #include "asm/ptrace.h"
14 #include "registers.h"
15 #include "sysdep/archsetjmp.h"
19 struct thread_struct
{
20 /* This flag is set to 1 before calling do_fork (and analyzed in
21 * copy_thread) to mark that we are begin called from userspace (fork /
22 * vfork / clone), and reset to 0 after. It is left to 0 when called
23 * from kernelspace (i.e. kernel_thread() or fork_idle(), as of 2.6.11). */
24 struct task_struct
*saved_task
;
28 int singlestep_syscall
;
31 struct task_struct
*prev_sched
;
32 unsigned long temp_stack
;
34 struct arch_thread arch
;
64 .arch = INIT_ARCH_THREAD, \
72 extern struct task_struct
*alloc_task_struct(void);
74 static inline void release_thread(struct task_struct
*task
)
78 extern int kernel_thread(int (*fn
)(void *), void * arg
, unsigned long flags
);
80 static inline void prepare_to_copy(struct task_struct
*tsk
)
85 extern unsigned long thread_saved_pc(struct task_struct
*t
);
87 static inline void mm_copy_segments(struct mm_struct
*from_mm
,
88 struct mm_struct
*new_mm
)
92 #define init_stack (init_thread_union.stack)
95 * User space process size: 3GB (default).
97 extern unsigned long task_size
;
99 #define TASK_SIZE (task_size)
101 /* This decides where the kernel will search for a free chunk of vm
102 * space during mmap's.
104 #define TASK_UNMAPPED_BASE (0x40000000)
106 extern void start_thread(struct pt_regs
*regs
, unsigned long entry
,
107 unsigned long stack
);
110 unsigned long loops_per_jiffy
;
114 extern struct cpuinfo_um boot_cpu_data
;
116 #define my_cpu_data cpu_data[smp_processor_id()]
119 extern struct cpuinfo_um cpu_data
[];
120 #define current_cpu_data cpu_data[smp_processor_id()]
122 #define cpu_data (&boot_cpu_data)
123 #define current_cpu_data boot_cpu_data
127 #define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf)
128 #define get_wchan(p) (0)
This page took 0.041949 seconds and 5 git commands to generate.