PERFORCE change 133836 for review

John Birrell jb at FreeBSD.org
Mon Jan 21 17:47:36 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=133836

Change 133836 by jb at jb_freebsd1 on 2008/01/22 01:47:26

	Safe the last per-thread syscall error status. The DTrace test suite
	wants to get it.

Affected files ...

.. //depot/projects/dtrace/src/sys/amd64/amd64/trap.c#21 edit
.. //depot/projects/dtrace/src/sys/i386/i386/trap.c#26 edit
.. //depot/projects/dtrace/src/sys/sys/proc.h#31 edit

Differences ...

==== //depot/projects/dtrace/src/sys/amd64/amd64/trap.c#21 (text+ko) ====

@@ -899,6 +899,9 @@
 		error = (*callp->sy_call)(td, argp);
 		AUDIT_SYSCALL_EXIT(error, td);
 
+		/* Save the latest error return value. */
+		td->td_errno = error;
+
 #ifdef KDTRACE_HOOKS
 		/* Save the error return variable for DTrace to reference. */
 		args[0] = error;

==== //depot/projects/dtrace/src/sys/i386/i386/trap.c#26 (text+ko) ====

@@ -1082,6 +1082,9 @@
 		error = (*callp->sy_call)(td, args);
 		AUDIT_SYSCALL_EXIT(error, td);
 
+		/* Save the latest error return value. */
+		td->td_errno = error;
+
 #ifdef KDTRACE_HOOKS
 		/* Save the error return variable for DTrace to reference. */
 		args[0] = error;

==== //depot/projects/dtrace/src/sys/sys/proc.h#31 (text+ko) ====

@@ -303,6 +303,7 @@
 	int		td_syscalls;	/* per-thread syscall count (used by NFS :)) */
 	struct lpohead	td_lprof[2];	/* (a) lock profiling objects. */
 	struct kdtrace_thread	*td_dtrace; /* (*) DTrace-specific data. */
+	int		td_errno;	/* Error returned by last syscall. */
 };
 
 struct mtx *thread_lock_block(struct thread *);


More information about the p4-projects mailing list