c - thread stack pointer -
c - thread stack pointer -
in linux 2.6.32-32, there way find next info thread programmatically in pthreads
program? need: run count, stack pointer, stack start/end, stack size, stack usage. threadx, guess, within program. thanks.
pthread_getattr_np() should give pthread attributes of thread pthread_attr_getstack() returns stack address , size i don't know mean run count. for stack pointer of thread different current 1 might need utilize ptrace. 1 time have it, can utilize maths determining how much of stack used.
for obtaining own stack pointer can along lines of:
mword sp; asm volatile ("mov %esp, $0" : "=r"(sp));
c pthreads threadx
Comments
Post a Comment