Date: Fri, 25 Jan 2008 05:52:04 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 134064 for review Message-ID: <200801250552.m0P5q4AJ077771@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=134064 Change 134064 by jb@jb_freebsd1 on 2008/01/25 05:51:49 Allow a DTrace program to send a signal to a process and stop it too. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#26 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#26 (text) ==== @@ -5393,6 +5393,7 @@ return; } +#if defined(sun) /* * raise() has a queue depth of 1 -- we ignore all subsequent * invocations of the raise() action. @@ -5400,10 +5401,13 @@ if (curthread->t_dtrace_sig == 0) curthread->t_dtrace_sig = (uint8_t)sig; -printf("%s(%d): DOODAD\n",__func__,__LINE__); -#ifdef DOODAD curthread->t_sig_check = 1; aston(curthread); +#else + struct proc *p = curproc; + PROC_LOCK(p); + psignal(p, sig); + PROC_UNLOCK(p); #endif } @@ -5413,14 +5417,18 @@ if (dtrace_destructive_disallow) return; +#if defined(sun) if (!curthread->t_dtrace_stop) { curthread->t_dtrace_stop = 1; -printf("%s(%d): DOODAD\n",__func__,__LINE__); -#ifdef DOODAD curthread->t_sig_check = 1; aston(curthread); + } +#else + struct proc *p = curproc; + PROC_LOCK(p); + psignal(p, SIGSTOP); + PROC_UNLOCK(p); #endif - } } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801250552.m0P5q4AJ077771>