The presence of thread support as a whole is controlled by the the
CYGPKG_POSIX_PTHREAD configuration option. Note that disabling
this will also disable many other features of the POSIX package,
since these are intimately bound up with the thread mechanism.
The default (non-scheduling) thread attributes are:
Dynamic thread stack allocation is only provided if there is an
implementation of
malloc() configured (i.e. a package
implements the
CYGINT_MEMALLOC_MALLOC_ALLOCATORS
interface). If there is no malloc() available, then the thread
creator must supply a stack. If only a stack address is supplied
then the stack is assumed to be PTHREAD_STACK_MIN
bytes long. This size is seldom useful for any but the most
trivial of threads. If a different sized stack is used, both
the stack address and stack size must be supplied.
The value of PTHREAD_THREADS_MAX is supplied by
the CYGNUM_POSIX_PTHREAD_THREADS_MAX
option. This defines the maximum number of threads allowed. The
POSIX standard requires this value to be at least 64, and this
is the default value set.
When the POSIX package is installed, the thread that calls
main() is initialized as a POSIX thread. The
priority of that thread is controlled by the
CYGNUM_POSIX_MAIN_DEFAULT_PRIORITY option.