NAME
cthread_set_name, cthread_name, cthread_set_sched_info,
cthread_sched_info, cthread_set_data, cthread_data -
thread attribute manipulation
LIBRARY
C Threads Library (libcthreads.a)
SYNOPSIS
#include <cthread.h>
void cthread_set_name( cthread_t t, char *name);
char *cthread_name( cthread_t t);
void cthread_set_data( cthread_t t, any_t data);
any_t cthread_data( cthread_t t);
void cthread_set_sched_info( cthread_t t, void *info);
void *cthread_sched_info( cthread_t t);
PARAMETERS
t specifies a thread whose attributes are to be set or
returned
name specifies a string thread name.
data specifies user-defined data.
info specifies thread-specific scheduler information.
DESCRIPTION
These routines set and query thread attributes.
The "name" routines affect a string name for a thread.
cthread_fork() sets a default name for threads based upon
the name of the funtion being run. This name is used by the
monitoring and debugging routines. Users are encouraged to
set the name if the default is inappropriate or not unique.
The library copies the supplied name into private memory,
The "data" routines set and query a thread-specific field
set aside for user manipulation. This field is not used by
any threads routines and is provided to allow users to
easily associated data with particular threads.
The "sched_info" routines set and query a thread-specific
field set aside for use by custom schedulers. The default
cthreads scheduler does not use this field. It may be
interrogated by user-defined schedulers.
For the "sched_info" fields in particular as well as for the
other fields, it may be desirable to set thread attributes
before the thread starts running. If this is the case, use
the functions cthread_thread_alloc() and
cthread_thread_schedule() instead of cthread_fork(). Note
that unlike cthread_fork, these routines do not set a
default name.
DIAGNOSTICS
None.
SEE ALSO
cthread_intro(3), cthread_thread_alloc(3),
cthread_thread_schedule(3), cthread_fork(3)
AUTHOR
Cthreads was written and maintained by many people.
This man page written by Greg Eisenhauer.