aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-21 04:39:51 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-21 04:39:51 -0500
commit198030782cedf25391e67e7c88b04f87a5eb6563 (patch)
tree5b7368c6bf052bcb4bb273497a57900720d36f51 /kernel/signal.c
parent4ec71fa2d2c3f1040348f2604f4b8ccc833d1c2e (diff)
parent92181f190b649f7ef2b79cbf5c00f26ccc66da2a (diff)
Merge branch 'x86/mm' into core/percpu
Conflicts: arch/x86/mm/fault.c
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c59
1 files changed, 24 insertions, 35 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 3152ac3b62e2..e73759783dc8 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1961,7 +1961,7 @@ EXPORT_SYMBOL(unblock_all_signals);
1961 * System call entry points. 1961 * System call entry points.
1962 */ 1962 */
1963 1963
1964asmlinkage long sys_restart_syscall(void) 1964SYSCALL_DEFINE0(restart_syscall)
1965{ 1965{
1966 struct restart_block *restart = &current_thread_info()->restart_block; 1966 struct restart_block *restart = &current_thread_info()->restart_block;
1967 return restart->fn(restart); 1967 return restart->fn(restart);
@@ -2014,8 +2014,8 @@ int sigprocmask(int how, sigset_t *set, sigset_t *oldset)
2014 return error; 2014 return error;
2015} 2015}
2016 2016
2017asmlinkage long 2017SYSCALL_DEFINE4(rt_sigprocmask, int, how, sigset_t __user *, set,
2018sys_rt_sigprocmask(int how, sigset_t __user *set, sigset_t __user *oset, size_t sigsetsize) 2018 sigset_t __user *, oset, size_t, sigsetsize)
2019{ 2019{
2020 int error = -EINVAL; 2020 int error = -EINVAL;
2021 sigset_t old_set, new_set; 2021 sigset_t old_set, new_set;
@@ -2074,8 +2074,7 @@ out:
2074 return error; 2074 return error;
2075} 2075}
2076 2076
2077asmlinkage long 2077SYSCALL_DEFINE2(rt_sigpending, sigset_t __user *, set, size_t, sigsetsize)
2078sys_rt_sigpending(sigset_t __user *set, size_t sigsetsize)
2079{ 2078{
2080 return do_sigpending(set, sigsetsize); 2079 return do_sigpending(set, sigsetsize);
2081} 2080}
@@ -2146,11 +2145,9 @@ int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from)
2146 2145
2147#endif 2146#endif
2148 2147
2149asmlinkage long 2148SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese,
2150sys_rt_sigtimedwait(const sigset_t __user *uthese, 2149 siginfo_t __user *, uinfo, const struct timespec __user *, uts,
2151 siginfo_t __user *uinfo, 2150 size_t, sigsetsize)
2152 const struct timespec __user *uts,
2153 size_t sigsetsize)
2154{ 2151{
2155 int ret, sig; 2152 int ret, sig;
2156 sigset_t these; 2153 sigset_t these;
@@ -2223,8 +2220,7 @@ sys_rt_sigtimedwait(const sigset_t __user *uthese,
2223 return ret; 2220 return ret;
2224} 2221}
2225 2222
2226asmlinkage long 2223SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)
2227sys_kill(pid_t pid, int sig)
2228{ 2224{
2229 struct siginfo info; 2225 struct siginfo info;
2230 2226
@@ -2283,7 +2279,7 @@ static int do_tkill(pid_t tgid, pid_t pid, int sig)
2283 * exists but it's not belonging to the target process anymore. This 2279 * exists but it's not belonging to the target process anymore. This
2284 * method solves the problem of threads exiting and PIDs getting reused. 2280 * method solves the problem of threads exiting and PIDs getting reused.
2285 */ 2281 */
2286asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig) 2282SYSCALL_DEFINE3(tgkill, pid_t, tgid, pid_t, pid, int, sig)
2287{ 2283{
2288 /* This is only valid for single tasks */ 2284 /* This is only valid for single tasks */
2289 if (pid <= 0 || tgid <= 0) 2285 if (pid <= 0 || tgid <= 0)
@@ -2295,8 +2291,7 @@ asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig)
2295/* 2291/*
2296 * Send a signal to only one task, even if it's a CLONE_THREAD task. 2292 * Send a signal to only one task, even if it's a CLONE_THREAD task.
2297 */ 2293 */
2298asmlinkage long 2294SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig)
2299sys_tkill(pid_t pid, int sig)
2300{ 2295{
2301 /* This is only valid for single tasks */ 2296 /* This is only valid for single tasks */
2302 if (pid <= 0) 2297 if (pid <= 0)
@@ -2305,8 +2300,8 @@ sys_tkill(pid_t pid, int sig)
2305 return do_tkill(0, pid, sig); 2300 return do_tkill(0, pid, sig);
2306} 2301}
2307 2302
2308asmlinkage long 2303SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig,
2309sys_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t __user *uinfo) 2304 siginfo_t __user *, uinfo)
2310{ 2305{
2311 siginfo_t info; 2306 siginfo_t info;
2312 2307
@@ -2434,8 +2429,7 @@ out:
2434 2429
2435#ifdef __ARCH_WANT_SYS_SIGPENDING 2430#ifdef __ARCH_WANT_SYS_SIGPENDING
2436 2431
2437asmlinkage long 2432SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set)
2438sys_sigpending(old_sigset_t __user *set)
2439{ 2433{
2440 return do_sigpending(set, sizeof(*set)); 2434 return do_sigpending(set, sizeof(*set));
2441} 2435}
@@ -2446,8 +2440,8 @@ sys_sigpending(old_sigset_t __user *set)
2446/* Some platforms have their own version with special arguments others 2440/* Some platforms have their own version with special arguments others
2447 support only sys_rt_sigprocmask. */ 2441 support only sys_rt_sigprocmask. */
2448 2442
2449asmlinkage long 2443SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set,
2450sys_sigprocmask(int how, old_sigset_t __user *set, old_sigset_t __user *oset) 2444 old_sigset_t __user *, oset)
2451{ 2445{
2452 int error; 2446 int error;
2453 old_sigset_t old_set, new_set; 2447 old_sigset_t old_set, new_set;
@@ -2497,11 +2491,10 @@ out:
2497#endif /* __ARCH_WANT_SYS_SIGPROCMASK */ 2491#endif /* __ARCH_WANT_SYS_SIGPROCMASK */
2498 2492
2499#ifdef __ARCH_WANT_SYS_RT_SIGACTION 2493#ifdef __ARCH_WANT_SYS_RT_SIGACTION
2500asmlinkage long 2494SYSCALL_DEFINE4(rt_sigaction, int, sig,
2501sys_rt_sigaction(int sig, 2495 const struct sigaction __user *, act,
2502 const struct sigaction __user *act, 2496 struct sigaction __user *, oact,
2503 struct sigaction __user *oact, 2497 size_t, sigsetsize)
2504 size_t sigsetsize)
2505{ 2498{
2506 struct k_sigaction new_sa, old_sa; 2499 struct k_sigaction new_sa, old_sa;
2507 int ret = -EINVAL; 2500 int ret = -EINVAL;
@@ -2531,15 +2524,13 @@ out:
2531/* 2524/*
2532 * For backwards compatibility. Functionality superseded by sigprocmask. 2525 * For backwards compatibility. Functionality superseded by sigprocmask.
2533 */ 2526 */
2534asmlinkage long 2527SYSCALL_DEFINE0(sgetmask)
2535sys_sgetmask(void)
2536{ 2528{
2537 /* SMP safe */ 2529 /* SMP safe */
2538 return current->blocked.sig[0]; 2530 return current->blocked.sig[0];
2539} 2531}
2540 2532
2541asmlinkage long 2533SYSCALL_DEFINE1(ssetmask, int, newmask)
2542sys_ssetmask(int newmask)
2543{ 2534{
2544 int old; 2535 int old;
2545 2536
@@ -2559,8 +2550,7 @@ sys_ssetmask(int newmask)
2559/* 2550/*
2560 * For backwards compatibility. Functionality superseded by sigaction. 2551 * For backwards compatibility. Functionality superseded by sigaction.
2561 */ 2552 */
2562asmlinkage unsigned long 2553SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler)
2563sys_signal(int sig, __sighandler_t handler)
2564{ 2554{
2565 struct k_sigaction new_sa, old_sa; 2555 struct k_sigaction new_sa, old_sa;
2566 int ret; 2556 int ret;
@@ -2577,8 +2567,7 @@ sys_signal(int sig, __sighandler_t handler)
2577 2567
2578#ifdef __ARCH_WANT_SYS_PAUSE 2568#ifdef __ARCH_WANT_SYS_PAUSE
2579 2569
2580asmlinkage long 2570SYSCALL_DEFINE0(pause)
2581sys_pause(void)
2582{ 2571{
2583 current->state = TASK_INTERRUPTIBLE; 2572 current->state = TASK_INTERRUPTIBLE;
2584 schedule(); 2573 schedule();
@@ -2588,7 +2577,7 @@ sys_pause(void)
2588#endif 2577#endif
2589 2578
2590#ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND 2579#ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND
2591asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize) 2580SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize)
2592{ 2581{
2593 sigset_t newset; 2582 sigset_t newset;
2594 2583