Threads can visit all the data in the process memory, even the stack of other threads (if it knows the thread's stack address, rarely), but the actual use of the threads also has its own private storage space:
1, stack (although not completely inaccessible by other threads, it can still be considered private data in general)
2, the thread Local storage solution (thread local storage). Thread-local storage is a private space that some OSes provide separately for a thread, but usually has only a limited amount of capacity.
3,register (including PC registers), the register is the level data that executes the stream, which is private to the thread.
=
From the point of view of the C programmer, whether the data thread is private is as follows:
Shared between thread private threads (process-owned)
Local Variables Global variables
Data on the parameter heap of the function
The static in the TLS data function
program code, any thread has the right to read and execute any code
Open files, a thread open files can be read and written by the B thread
========
Thread scheduling is total, and threads usually have three states to know, namely:
Running: the thread is executing
Ready: The thread can now execute, but the CPU and the occupied
Wait: At this point the thread waits for an event to occur and cannot be executed.
Links-loading-Libraries, reading notes