Commit 9049863a authored by Ingo Molnar's avatar Ingo Molnar

sched/headers: Move kstack_end() from <linux/sched.h> to <linux/sched/task_stack.h>

This is a task-stack related API, not core scheduler functionality.
Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 28851755
...@@ -1360,16 +1360,6 @@ static inline struct thread_info *task_thread_info(struct task_struct *task) ...@@ -1360,16 +1360,6 @@ static inline struct thread_info *task_thread_info(struct task_struct *task)
# define task_thread_info(task) ((struct thread_info *)(task)->stack) # define task_thread_info(task) ((struct thread_info *)(task)->stack)
#endif #endif
#ifndef __HAVE_ARCH_KSTACK_END
static inline int kstack_end(void *addr)
{
/* Reliable end of stack detection:
* Some APM bios versions misalign the stack
*/
return !(((unsigned long)addr+sizeof(void*)-1) & (THREAD_SIZE-sizeof(void*)));
}
#endif
extern struct pid_namespace init_pid_ns; extern struct pid_namespace init_pid_ns;
/* /*
......
...@@ -108,4 +108,14 @@ static inline unsigned long stack_not_used(struct task_struct *p) ...@@ -108,4 +108,14 @@ static inline unsigned long stack_not_used(struct task_struct *p)
#endif #endif
extern void set_task_stack_end_magic(struct task_struct *tsk); extern void set_task_stack_end_magic(struct task_struct *tsk);
#ifndef __HAVE_ARCH_KSTACK_END
static inline int kstack_end(void *addr)
{
/* Reliable end of stack detection:
* Some APM bios versions misalign the stack
*/
return !(((unsigned long)addr+sizeof(void*)-1) & (THREAD_SIZE-sizeof(void*)));
}
#endif
#endif /* _LINUX_SCHED_TASK_STACK_H */ #endif /* _LINUX_SCHED_TASK_STACK_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment