Apue Line Program Control system

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.