This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
LinuxThreads questions...
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Subject: LinuxThreads questions...
- From: "Philip J. Mucci" <mucci at cs dot utk dot edu>
- Date: Tue, 02 Nov 1999 22:25:50 -0500
- Organization: The University of Tennessee, http://www.cs.utk.edu/~mucci
- References: <Pine.LNX.4.10.9911021542590.4559-100000@ashi.FootPrints.net>
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
Hi all,
According to clone(), the signal handlers are cloned. However, my tests
demonstrate that itimers do not appear to be. I'm writing performance
tools on various platforms, and on other machines, SIGPROF is delivered
to any bound thread in the process. On Linux, the itimer must be
registered for each thread in order to have the desired effect. So I
have two options to get this to work:
1) Hack the kernel to clone the timers. This is ugly, I already have a
big enough patching adding support for hardware counters. I'd rather not
touch any of the task handling code.
2) Be able to detect anytime someone does a pthread_create() or a
clone()?
Linux doesn't seem to have any kernel mechanism to detect new threads
(like IRIX atsproc()) or weak thread initialization symbols (like Unicos
__thr_init())
Any ideas? There must be a way to do this...
Thanks for any help,
-Phil