Lines Matching refs:current
141 spin_lock_irq(¤t->sigmask_lock); in _sigpause_common()
142 saveset = current->blocked; in _sigpause_common()
143 siginitset(¤t->blocked, set); in _sigpause_common()
144 recalc_sigpending(current); in _sigpause_common()
145 spin_unlock_irq(¤t->sigmask_lock); in _sigpause_common()
155 current->state = TASK_INTERRUPTIBLE; in _sigpause_common()
198 spin_lock_irq(¤t->sigmask_lock); in do_rt_sigsuspend()
199 oldset = current->blocked; in do_rt_sigsuspend()
200 current->blocked = set; in do_rt_sigsuspend()
201 recalc_sigpending(current); in do_rt_sigsuspend()
202 spin_unlock_irq(¤t->sigmask_lock); in do_rt_sigsuspend()
212 current->state = TASK_INTERRUPTIBLE; in do_rt_sigsuspend()
231 if (current->flags & PF_USEDFPU) in restore_fpu_state()
234 if (current == last_task_used_math) { in restore_fpu_state()
239 current->used_math = 1; in restore_fpu_state()
240 current->flags &= ~PF_USEDFPU; in restore_fpu_state()
245 err = __copy_from_user(¤t->thread.float_regs[0], &fpu->si_float_regs[0], in restore_fpu_state()
247 err |= __get_user(current->thread.fsr, &fpu->si_fsr); in restore_fpu_state()
248 err |= __get_user(current->thread.fpqdepth, &fpu->si_fpqdepth); in restore_fpu_state()
249 if (current->thread.fpqdepth != 0) in restore_fpu_state()
250 err |= __copy_from_user(¤t->thread.fpqueue[0], in restore_fpu_state()
304 spin_lock_irq(¤t->sigmask_lock); in do_new_sigreturn()
305 current->blocked = set; in do_new_sigreturn()
306 recalc_sigpending(current); in do_new_sigreturn()
307 spin_unlock_irq(¤t->sigmask_lock); in do_new_sigreturn()
323 if (current->thread.new_signal) in do_sigreturn()
351 spin_lock_irq(¤t->sigmask_lock); in do_sigreturn()
352 current->blocked = set; in do_sigreturn()
353 recalc_sigpending(current); in do_sigreturn()
354 spin_unlock_irq(¤t->sigmask_lock); in do_sigreturn()
373 send_sig(SIGSEGV, current, 1); in do_sigreturn()
421 spin_lock_irq(¤t->sigmask_lock); in do_rt_sigreturn()
422 current->blocked = set; in do_rt_sigreturn()
423 recalc_sigpending(current); in do_rt_sigreturn()
424 spin_unlock_irq(¤t->sigmask_lock); in do_rt_sigreturn()
427 send_sig(SIGSEGV, current, 1); in do_rt_sigreturn()
450 if (!on_sig_stack(sp) && !((current->sas_ss_sp + current->sas_ss_size) & 7)) in get_sigframe()
451 sp = current->sas_ss_sp + current->sas_ss_size; in get_sigframe()
472 current->comm, current->pid); in setup_frame()
496 err |= __put_user(current->thread.w_saved, &sc->sigc_oswins); in setup_frame()
497 if(current->thread.w_saved) in setup_frame()
498 for(window = 0; window < current->thread.w_saved; window++) { in setup_frame()
500 (char *)current->thread.rwbuf_stkptrs[window]; in setup_frame()
502 ¤t->thread.reg_window[window], in setup_frame()
509 current->thread.w_saved = 0; /* So process is allowed to execute. */ in setup_frame()
588 if (current->flags & PF_USEDFPU) { in save_fpu_state()
590 fpsave(¤t->thread.float_regs[0], ¤t->thread.fsr, in save_fpu_state()
591 ¤t->thread.fpqueue[0], ¤t->thread.fpqdepth); in save_fpu_state()
593 current->flags &= ~(PF_USEDFPU); in save_fpu_state()
596 if (current == last_task_used_math) { in save_fpu_state()
598 fpsave(¤t->thread.float_regs[0], ¤t->thread.fsr, in save_fpu_state()
599 ¤t->thread.fpqueue[0], ¤t->thread.fpqdepth); in save_fpu_state()
604 err |= __copy_to_user(&fpu->si_float_regs[0], ¤t->thread.float_regs[0], in save_fpu_state()
606 err |= __put_user(current->thread.fsr, &fpu->si_fsr); in save_fpu_state()
607 err |= __put_user(current->thread.fpqdepth, &fpu->si_fpqdepth); in save_fpu_state()
608 if (current->thread.fpqdepth != 0) in save_fpu_state()
609 err |= __copy_to_user(&fpu->si_fpqueue[0], ¤t->thread.fpqueue[0], in save_fpu_state()
612 current->used_math = 0; in save_fpu_state()
627 if (!current->used_math) in new_setup_frame()
635 if (current->thread.w_saved != 0) { in new_setup_frame()
638 "signal delivery.\n", current->comm, current->pid); in new_setup_frame()
648 if (current->used_math) { in new_setup_frame()
688 flush_sig_insns(current->mm, (unsigned long) &(sf->insns[0])); in new_setup_frame()
709 if(!current->used_math) in new_setup_rt_frame()
714 if(current->thread.w_saved != 0) in new_setup_rt_frame()
721 if(current->used_math) in new_setup_rt_frame()
736 err |= __put_user(current->sas_ss_sp, &sf->stack.ss_sp); in new_setup_rt_frame()
738 err |= __put_user(current->sas_ss_size, &sf->stack.ss_size); in new_setup_rt_frame()
770 flush_sig_insns(current->mm, (unsigned long) &(sf->insns[0])); in new_setup_rt_frame()
838 err |= __put_user(current->sas_ss_sp, &uc->stack.sp); in setup_svr4_frame()
840 err |= __put_user(current->sas_ss_size, &uc->stack.size); in setup_svr4_frame()
848 err |= __put_user(current->thread.w_saved, &gw->count); in setup_svr4_frame()
861 for(window = 0; window < current->thread.w_saved; window++) { in setup_svr4_frame()
864 ¤t->thread.reg_window [window], in setup_svr4_frame()
870 current->thread.w_saved = 0; /* So process is allowed to execute. */ in setup_svr4_frame()
920 if (current->thread.w_saved) in svr4_getcontext()
931 setv.sigbits[0] = current->blocked.sig[0]; in svr4_getcontext()
932 setv.sigbits[1] = current->blocked.sig[1]; in svr4_getcontext()
934 setv.sigbits[2] = current->blocked.sig[2]; in svr4_getcontext()
935 setv.sigbits[3] = current->blocked.sig[3]; in svr4_getcontext()
951 err |= __put_user(current->sas_ss_sp, &uc->stack.sp); in svr4_getcontext()
953 err |= __put_user(current->sas_ss_size, &uc->stack.size); in svr4_getcontext()
967 struct thread_struct *tp = ¤t->thread; in svr4_setcontext()
1024 spin_lock_irq(¤t->sigmask_lock); in svr4_setcontext()
1025 current->blocked = set; in svr4_setcontext()
1026 recalc_sigpending(current); in svr4_setcontext()
1027 spin_unlock_irq(¤t->sigmask_lock); in svr4_setcontext()
1056 else if (current->thread.new_signal) in handle_signal()
1064 spin_lock_irq(¤t->sigmask_lock); in handle_signal()
1065 sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); in handle_signal()
1066 sigaddset(¤t->blocked, signr); in handle_signal()
1067 recalc_sigpending(current); in handle_signal()
1068 spin_unlock_irq(¤t->sigmask_lock); in handle_signal()
1106 for (map = current->mm->mmap ; map ; map = next ) { in read_maps()
1168 int svr4_signal = current->personality == PER_SVR4; in do_signal()
1172 oldset = ¤t->blocked; in do_signal()
1175 spin_lock_irq(¤t->sigmask_lock); in do_signal()
1176 signr = dequeue_signal(¤t->blocked, &info); in do_signal()
1177 spin_unlock_irq(¤t->sigmask_lock); in do_signal()
1182 if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { in do_signal()
1195 current->exit_code = signr; in do_signal()
1196 current->state = TASK_STOPPED; in do_signal()
1201 notify_parent(current, SIGCHLD); in do_signal()
1203 if (!(signr = current->exit_code)) in do_signal()
1205 current->exit_code = 0; in do_signal()
1214 info.si_pid = current->p_pptr->pid; in do_signal()
1215 info.si_uid = current->p_pptr->uid; in do_signal()
1219 if (sigismember(¤t->blocked, signr)) { in do_signal()
1220 send_sig_info(signr, &info, current); in do_signal()
1225 ka = ¤t->sig->action[signr-1]; in do_signal()
1243 if (current->pid == 1) in do_signal()
1254 if (is_orphaned_pgrp(current->pgrp)) in do_signal()
1258 if (current->ptrace & PT_PTRACED) in do_signal()
1260 current->state = TASK_STOPPED; in do_signal()
1261 current->exit_code = signr; in do_signal()
1264 if (!(current->p_pptr->sig->action[SIGCHLD-1].sa.sa_flags & in do_signal()
1266 notify_parent(current, SIGCHLD); in do_signal()
1277 printk ("Sig %ld going for %s[%d]...\n", signr, current->comm, current->pid); in do_signal()
1299 sigaddset(¤t->pending.signal, signr); in do_signal()
1300 recalc_sigpending(current); in do_signal()
1301 current->flags |= PF_SIGNALED; in do_signal()
1330 if (put_user(current->sas_ss_sp + current->sas_ss_size, &ossptr->the_stack) || in do_sys_sigstack()
1344 if (current->sas_ss_sp && on_sig_stack(sp)) in do_sys_sigstack()
1350 current->sas_ss_sp = (unsigned long)ss_sp - SIGSTKSZ; in do_sys_sigstack()
1351 current->sas_ss_size = SIGSTKSZ; in do_sys_sigstack()