diff options
Diffstat (limited to 'include/asm-mips/processor.h')
-rw-r--r-- | include/asm-mips/processor.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 0c47c2580..c4c0e849b 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h @@ -164,11 +164,15 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long #define USES_USER_TIME(regs) (!((regs)->cp0_status & 0x18)) /* Allocation and freeing of basic task resources. */ -#define alloc_task_struct() kmalloc(sizeof(struct task_struct), GFP_KERNEL) -#define free_task_struct(p) kfree(p) +/* + * NOTE! The task struct and the stack go together + */ +#define alloc_task_struct() \ + ((struct task_struct *) __get_free_pages(GFP_KERNEL,1,0)) +#define free_task_struct(p) free_pages((unsigned long)(p),1) -#define init_task (init_task_union.task) -#define init_stack (init_task_union.stack) +#define init_task (init_task_union.task) +#define init_stack (init_task_union.stack) #endif /* !defined (__LANGUAGE_ASSEMBLY__) */ #endif /* __KERNEL__ */ |