qthread_readstate - Man Page

returns status information from the runtime

Synopsis

#include <qthread.h>

size_t
qthread_readstate (const enum introspective_state type);

Description

This function is for querying the runtime about itself. The type argument specifies what information is desired. The valid values of type include:

STACK_SIZE

This causes the function to return the size stack, measured in bytes, that all spawned qthreads receive.

RUNTIME_DATA_SIZE

This causes the function to return the size of the runtime data structure that all spawned qthreads require.

BUSYNESS

This causes the function to return the approximate number of threads available in the run queue of the current shepherd.

ACTIVE_SHEPHERDS

This causes the function to return the number of shepherds currently active and scheduling threads. This is equivalent to the function qthread_num_shepherds().

TOTAL_SHEPHERDS

This causes the funciton to return the total number of shepherds that exist, whether active or inactive.

ACTIVE_WORKERS

This causes the function to return the number of worker threads currently active and scheduling threads. This is equivalent to the function qthread_num_workers().

TOTAL_WORKERS

This causes the function to return the total number of worker threads that exist, whether active or inactive.

CURRENT_WORKER

This causes the function to return the ID of the current worker on which the task is executing. This is equivalent to the function qthread_worker().

CURRENT_TEAM

This causes the function to return the ID of the calling task's team. This is equivalent to the function qt_team_id().

PARENT_TEAM

This causes the function to return the ID of the calling task's team's parent-team, if it had one. This is equivalent to the function qt_team_parent_id().

See Also

qthread_id(3), qthread_num_shepherds(3), qthread_retloc(3), qthread_stackleft(3)

Info

APRIL 2011 libqthread