[asterisk-dev] [Code Review] Add LWP for core show threads output
Jeff Peeler
reviewboard at asterisk.org
Sat Dec 4 21:50:09 UTC 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/886/
-----------------------------------------------------------
(Updated 2010-12-04 15:50:09.727020)
Review request for Asterisk Developers.
Changes
-------
Updated code to obtain LWP properly on FreeBSD, Mac, Linux, and Solaris. Removed the old fall back code to use process ID if thread ID could not be obtained. I started with 1.4 since I thought originally the changes would be trivial, but maybe this should just go in trunk. I tested on FreeBSD 8.1, Mac OS X 10.5, and of course Linux (Solaris should be fine).
Summary
-------
I've run into this problem before and couldn't manage to translate the pthread id to the LWP. I'm not sure if such a mapping exists or not, but let's make debugging easier and just include it.
Diffs (updated)
-----
/branches/1.4/configure.ac 297580
/branches/1.4/include/asterisk/autoconfig.h.in 297580
/branches/1.4/include/asterisk/utils.h 297580
/branches/1.4/main/asterisk.c 297580
/branches/1.4/main/logger.c 297580
/branches/1.4/main/utils.c 297580
Diff: https://reviewboard.asterisk.org/r/886/diff
Testing
-------
Tested creating a thread and verified that core show threads output matched gdb output. I do not know if this will work on non-Linux platforms, hence the review.
Thanks,
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20101204/fad6bd7d/attachment.htm
More information about the asterisk-dev
mailing list