Home >Common Problem >Threads in the same process can share the following

Threads in the same process can share the following

尚
Original
2019-10-24 11:03:4610319browse

Threads in the same process can share the following

Can threads under the same process share the following? (BD)
A. stack B. data section C. register set D. file fd

Thread shared content includes:

1, process code segment

2, process public data (using these shared data, Threads can easily communicate with each other)

3. File descriptor opened by the process

4. Signal processor

5. Current directory of the process

6. Process user ID and process group ID

Thread-unique content includes:

1, Thread ID

2 , Register group value

3, Thread stack

4, Error return code

5, Thread signal mask code

The above is the detailed content of Threads in the same process can share the following. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is a network wormNext article:What is a network worm