Remove thread_count from the Windows RTLs
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
The three Windows RTLs contain a variable thread_count which is increased/decreased when a thread attaches or detaches from a DLL. This information is basically useless, as more threads can detach from a DLL than attach (oh wow, we have -3 threads running... oh wait?!).
The variable is not used anywhere else in the RTL or in the packages.
Additional information:
Attached is an example which demonstrates the problem. The main application creates three threads, one before the DLL is loaded and one after. Then two threads are terminated and after a while the third one as well. During the run the thread count of the DLL is written to StdOut. The count looks like the following:
0
2
0
-1
Also attached is a patch which removes the variable.
Note: "Thread_count" is also declared in Native NT and Symbian system units as those were copies from the Win32 RTL originally.
Mantis conversion info:
- Mantis ID: 18089
- OS: Win32
- OS Build: NT 6.1 (7)
- Platform: i386
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 16472 (#a0c25dc0)