Date: Tue, 22 Jan 2008 01:47:35 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 133836 for review Message-ID: <200801220147.m0M1lZSe047008@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133836 Change 133836 by jb@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 *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801220147.m0M1lZSe047008>