PERFORCE change 152547 for review
Peter Wemm
peter at FreeBSD.org
Wed Nov 5 12:53:49 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=152547
Change 152547 by peter at peter_daintree on 2008/11/05 20:53:33
Tidy up thr_exit wrapper a little.
Affected files ...
.. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#26 edit
Differences ...
==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#26 (text+ko) ====
@@ -168,6 +168,7 @@
reallocation. We need to make sure we don't touch the stack
between marking it Empty and exiting. Hence the
assembler. */
+ /* QQQ might have to use thr_exit here */
#if defined(VGP_x86_freebsd) /* FreeBSD has args on the stack */
asm volatile (
"movl %1, %0\n" /* set tst->status = VgTs_Empty */
@@ -1765,13 +1766,15 @@
{
ThreadState *tst;
+ PRINT( "sys_thr_exit ( %#lx )", ARG1 );
+ PRE_REG_READ1(long, "thr_exit", long *, "status");
+
+ if (ARG1)
+ PRE_MEM_WRITE( "thr_exit(status)", ARG1, sizeof(long) );
tst = VG_(get_ThreadState)(tid);
tst->exitreason = VgSrc_ExitThread;
-
+ tst->os_state.exitcode = 0;
VG_(exit_thread)(tid);
- PRINT( "sys_thr_exit ( %#lx )", ARG1 );
- PRE_REG_READ1(long, "thr_exit", long *, "status");
-// PRE_MEM_WRITE( "thr_exit()", ARG1, sizeof(long));
}
PRE(sys_thr_set_name)
More information about the p4-projects
mailing list