Date: Wed, 5 Nov 2008 20:53:49 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 152547 for review Message-ID: <200811052053.mA5KrnD5010397@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152547 Change 152547 by peter@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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811052053.mA5KrnD5010397>