Table of Contents

Name

qthread_stackleft - returns the amount of space left in the thread’s allocated stack

Synopsis

#include <qthread/qthread.h>

size_t
qthread_stackleft(qthread_t *t);

Description

This function returns the number of bytes left in the stack. The argument, t, MUST be the current qthread for the answer to make sense.

This function is intended primarily for debugging, and the answer is often imprecise and unreliable.

Return Value

If t is non-null, it returns the number of bytes left in the stack, accurate to a small margin (on the order of 10 bytes). If t is NULL, qthread_stackleft() returns 0.

See Also

qthread_id(3) , qthread_retloc(3) , qthread_self(3) , qthread_shep(3)


Table of Contents