-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
pmm wrote:
hi all ,
I am working on a router which is Coded in ansi C ,it uses number of
semaphores,threads
Then, it isn't really ANSI C, is it? (Considering that ANSI C doesn't include
semaphores or threads; those are add-ons, and outside of ANSI C's purvue)
I want to know that how can we know what threads are currently alive
in a program being executed ,I do not have the support of <bold> GDB on
my target board ,not even gdbserver,</bold> my way is very crude by
placing print stmts in between the line and knowing the status.
kindly suggest me a way to know what threads are alive as one of then
throwing a segfault I am not able to determine which one
thanks in advance
You'll have to check with the creator/supplier of the semaphore and threading
library add-on. Perhaps they can help.
FWIW, you are in a bit of a bind. Assuming that your platform doesn't support
any independant external method of checking thread status (like using process
statistics gathered by the OS, for instance), and you don't have access to any
third-party diagnostics (like gdb), then you are entirely dependant on the
tools that your vendor has provided you. You really should check with them as
to how they enable or facilitate problem diagnosis in their threading package.
Certainly, there's nothing in ANSI C that will help you, beyond those tools
that you've already found (print statements, etc.).
- --
Lew Pitcher
Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (
http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
iD8DBQFDtiklagVFX4UWr64RAouTAJ43tEHmb1UCM+396j/pzYlULhWCqwCgq0Z5
8P+GCEgsAvaFnmZEZtN2cW4=
=4fy0
-----END PGP SIGNATURE-----