aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c2182b53dace..0655570c67eb 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2182,7 +2182,6 @@ extern struct sigqueue *sigqueue_alloc(void);
2182extern void sigqueue_free(struct sigqueue *); 2182extern void sigqueue_free(struct sigqueue *);
2183extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); 2183extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group);
2184extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); 2184extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *);
2185extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long);
2186 2185
2187static inline void restore_saved_sigmask(void) 2186static inline void restore_saved_sigmask(void)
2188{ 2187{
@@ -2228,6 +2227,17 @@ static inline int sas_ss_flags(unsigned long sp)
2228 : on_sig_stack(sp) ? SS_ONSTACK : 0); 2227 : on_sig_stack(sp) ? SS_ONSTACK : 0);
2229} 2228}
2230 2229
2230static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig)
2231{
2232 if (unlikely((ksig->ka.sa.sa_flags & SA_ONSTACK)) && ! sas_ss_flags(sp))
2233#ifdef CONFIG_STACK_GROWSUP
2234 return current->sas_ss_sp;
2235#else
2236 return current->sas_ss_sp + current->sas_ss_size;
2237#endif
2238 return sp;
2239}
2240
2231/* 2241/*
2232 * Routines for handling mm_structs 2242 * Routines for handling mm_structs
2233 */ 2243 */