Deleted Added
full compact
subr_syscall.c (209461) subr_syscall.c (209579)
1/*-
2 * Copyright (C) 1994, David Greenman
3 * Copyright (c) 1990, 1993
4 * The Regents of the University of California. All rights reserved.
5 * Copyright (c) 2007 The FreeBSD Foundation
6 *
7 * This code is derived from software contributed to Berkeley by
8 * the University of Utah, and William Jolitz.

--- 28 unchanged lines hidden (view full) ---

37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91
42 */
43
44#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 1994, David Greenman
3 * Copyright (c) 1990, 1993
4 * The Regents of the University of California. All rights reserved.
5 * Copyright (c) 2007 The FreeBSD Foundation
6 *
7 * This code is derived from software contributed to Berkeley by
8 * the University of Utah, and William Jolitz.

--- 28 unchanged lines hidden (view full) ---

37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91
42 */
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/sys/kern/subr_trap.c 209461 2010-06-23 11:12:58Z kib $");
45__FBSDID("$FreeBSD: head/sys/kern/subr_trap.c 209579 2010-06-28 18:06:46Z kib $");
46
47#include "opt_ktrace.h"
48#include "opt_kdtrace.h"
49#include "opt_sched.h"
50
51#include <sys/param.h>
52#include <sys/bus.h>
53#include <sys/kernel.h>

--- 239 unchanged lines hidden (view full) ---

293 error = (p->p_sysent->sv_fetch_syscall_args)(td, sa);
294#ifdef KTRACE
295 if (KTRPOINT(td, KTR_SYSCALL))
296 ktrsyscall(sa->code, sa->narg, sa->args);
297#endif
298 if (error != 0)
299 goto retval;
300 }
46
47#include "opt_ktrace.h"
48#include "opt_kdtrace.h"
49#include "opt_sched.h"
50
51#include <sys/param.h>
52#include <sys/bus.h>
53#include <sys/kernel.h>

--- 239 unchanged lines hidden (view full) ---

293 error = (p->p_sysent->sv_fetch_syscall_args)(td, sa);
294#ifdef KTRACE
295 if (KTRPOINT(td, KTR_SYSCALL))
296 ktrsyscall(sa->code, sa->narg, sa->args);
297#endif
298 if (error != 0)
299 goto retval;
300 }
301 error = syscall_thread_enter(td, sa->callp);
302 if (error != 0)
303 goto retval;
301
302#ifdef KDTRACE_HOOKS
303 /*
304 * If the systrace module has registered it's probe
305 * callback and if there is a probe active for the
306 * syscall 'entry', process the probe.
307 */
308 if (systrace_probe_func != NULL && sa->callp->sy_entry != 0)

--- 13 unchanged lines hidden (view full) ---

322 * If the systrace module has registered it's probe
323 * callback and if there is a probe active for the
324 * syscall 'return', process the probe.
325 */
326 if (systrace_probe_func != NULL && sa->callp->sy_return != 0)
327 (*systrace_probe_func)(sa->callp->sy_return, sa->code,
328 sa->callp, sa->args);
329#endif
304
305#ifdef KDTRACE_HOOKS
306 /*
307 * If the systrace module has registered it's probe
308 * callback and if there is a probe active for the
309 * syscall 'entry', process the probe.
310 */
311 if (systrace_probe_func != NULL && sa->callp->sy_entry != 0)

--- 13 unchanged lines hidden (view full) ---

325 * If the systrace module has registered it's probe
326 * callback and if there is a probe active for the
327 * syscall 'return', process the probe.
328 */
329 if (systrace_probe_func != NULL && sa->callp->sy_return != 0)
330 (*systrace_probe_func)(sa->callp->sy_return, sa->code,
331 sa->callp, sa->args);
332#endif
333 syscall_thread_exit(td, sa->callp);
330 CTR4(KTR_SYSC, "syscall: p=%p error=%d return %#lx %#lx",
331 p, error, td->td_retval[0], td->td_retval[1]);
332 }
333 retval:
334 if (traced) {
335 PROC_LOCK(p);
336 td->td_dbgflags &= ~TDB_SCE;
337 PROC_UNLOCK(p);

--- 59 unchanged lines hidden ---
334 CTR4(KTR_SYSC, "syscall: p=%p error=%d return %#lx %#lx",
335 p, error, td->td_retval[0], td->td_retval[1]);
336 }
337 retval:
338 if (traced) {
339 PROC_LOCK(p);
340 td->td_dbgflags &= ~TDB_SCE;
341 PROC_UNLOCK(p);

--- 59 unchanged lines hidden ---