One, the limit of the thread
Sysconf values that can be viewed
Pthread_destructor_iterations the maximum number of times an operating system implementation attempts to destroy thread-specific data when a thread exits _sc_thread_destructor_iterations
The maximum number of keys that the Pthread_keys_max process can create _sc_thread_keys_max
Pthread_stack_min The minimum number of bytes available for a thread's stack _sc_thread_stack_min
The maximum number of threads that the Pthread_threads_max process can create _sc_thread_threads_max
Second, thread properties
1. Each object is associated with its own type of Property object.
2. There is an initialization function that sets the property to the default value.
3. The function that destroys the Property object.
4. The function that gets the value of the property.
5 Each property has a function that sets the value of the property.
#include <pthread.h>int pthread_attr_init (pthread_attr_t *attr); int Pthread_attr_destroy (pthread_attr_t *attr);
#include <pthread.h>int pthread_attr_getdetachstate (constint *detachstate); int int *detachstate);
#include <pthread.h>int pthread_attr_getstack (constvoid **restrict stackaddr, size _t *restrict stacksize); int void *stackaddr, size_t stacksize);
Apue Line Program Control system