/* * Copyright (C) 2013-2014 Altera Corporation * Copyright (C) 2011-2012 Tobias Klauser <tklauser@distanz.ch> * Copyright (C) 2004 Microtronix Datacom Ltd * Copyright (C) 1991, 1992 Linus Torvalds * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details.
*/
/* * If we were from a system call, check for system call restarting...
*/ if (regs->orig_r2 >= 0 && regs->r1) {
continue_addr = regs->ea;
restart_addr = continue_addr - 4;
retval = regs->r2;
/* * Prepare for system call restart. We do this here so that a * debugger will see the already changed PC.
*/ switch (retval) { case ERESTART_RESTARTBLOCK:
restart = -2;
fallthrough; case ERESTARTNOHAND: case ERESTARTSYS: case ERESTARTNOINTR:
restart++;
regs->r2 = regs->orig_r2;
regs->r7 = regs->orig_r7;
regs->ea = restart_addr; break;
}
regs->orig_r2 = -1;
}
/* * No handler present
*/ if (unlikely(restart) && regs->ea == restart_addr) {
regs->ea = continue_addr;
regs->r2 = __NR_restart_syscall;
}
/* * If there's no signal to deliver, we just put the saved sigmask back.
*/
restore_saved_sigmask();
return restart;
}
asmlinkage int do_notify_resume(struct pt_regs *regs)
{ /* * We want the common case to go fast, which is why we may in certain * cases get here from kernel mode. Just return without doing anything * if so.
*/ if (!user_mode(regs)) return 0;
if (test_thread_flag(TIF_SIGPENDING) ||
test_thread_flag(TIF_NOTIFY_SIGNAL)) { int restart = do_signal(regs);
if (unlikely(restart)) { /* * Restart without handlers. * Deal with it without leaving * the kernel space.
*/ return restart;
}
} elseif (test_thread_flag(TIF_NOTIFY_RESUME))
resume_user_mode_work(regs);
return 0;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.24 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.