FreeRDP/winpr/libwinpr
Norbert Federa 6f9a8dbc1e winpr: greatly improved NtCurrentTeb performance
Use pthread_setspecific/pthread_getspecific to store/retrieve the thread
environment block (TEB). Use pthread_once to trigger the creation of that
data from within NtCurrentTeb.
This allows us to get rid of the process environment block stuff which
was only used to provide serialized access to a thread table in order to
retrieve the TEB.

NtCurrentTeb is currently only as a per-thread storage location for the
last error value used by SetLastError and GetLastError.

Also made the TestErrorSetLastError CTest a bit more demanding.
It makes sure the 4 threads run for at least 2 seconds.
Each thread constantly calls SetLastError with a random value and checks
if GetLastError returns the same value again. The total amount of
these iterations is calculated in order to measure the performance.

This change increases the NtCurrentTeb performance by roughly 50% on
linux and by several thousand percent (yes) on Mac OS X.

Thanks for watching.
2013-10-11 19:34:23 +02:00
..
asn1 libwinpr-library: improve library tests 2012-10-18 16:58:27 -04:00
bcrypt cmake: refactoring of MONOLITHIC_BUILD 2012-10-13 17:30:59 -04:00
com libwinpr-com: create empty module 2013-08-19 19:06:47 -04:00
credentials cmake: refactoring of MONOLITHIC_BUILD 2012-10-13 17:30:59 -04:00
credui Fixed formating build warnings (-Wformat) 2013-03-15 20:03:48 +01:00
crt Fixed issues found with clang-analyzer 2013-09-05 12:14:33 +02:00
crypto libfreerdp-core: change ReceiveCallback return values 2013-01-06 17:24:08 -05:00
dsparse winpr/dsparse: removed autogenerated test file 2013-03-15 23:15:59 +01:00
environment wfreerdp: fix build on Windows 2013-03-29 00:33:15 -04:00
error winpr: greatly improved NtCurrentTeb performance 2013-10-11 19:34:23 +02:00
file freerdp: merge with master 2013-09-16 17:10:27 -04:00
handle Fixed various memory leaks, allocation size issues and API misuse 2013-09-05 12:14:34 +02:00
heap cmake: refactoring of MONOLITHIC_BUILD 2012-10-13 17:30:59 -04:00
input Fixed various memory leaks, allocation size issues and API misuse 2013-09-05 12:14:34 +02:00
interlocked libwinpr-sync: New complete critical section code 2013-08-07 10:20:04 +02:00
io libwinpr-pipe: add support for overlapped i/o with named pipes (synchronous, compatible implementation) 2013-08-22 22:36:37 -04:00
library Replace printf(...) by fprintf(stderr, ...) 2013-03-28 23:06:34 +01:00
nt winpr: greatly improved NtCurrentTeb performance 2013-10-11 19:34:23 +02:00
path freerdp: merge with master 2013-09-16 17:10:27 -04:00
pipe freerdp: merge with master 2013-09-16 17:10:27 -04:00
pool Fixed compiler warnings (-Wall) 2013-03-15 20:41:10 +01:00
registry winpr/registry: Fixed double free 2013-09-16 17:23:26 +02:00
rpc Fixed issues found with clang-analyzer 2013-09-05 12:14:33 +02:00
sspi Fixed erroneous patch. 2013-09-05 12:14:34 +02:00
sspicli cmake: refactoring of MONOLITHIC_BUILD 2012-10-13 17:30:59 -04:00
synch build: link winpr-synch against winpr-sysinfo 2013-10-05 14:09:04 +02:00
sysinfo Fixed various memory leaks, allocation size issues and API misuse 2013-09-05 12:14:34 +02:00
thread mfreerdp: cleanup 2013-08-09 21:23:08 -04:00
timezone cmake: refactoring of MONOLITHIC_BUILD 2012-10-13 17:30:59 -04:00
utils libfreerdp-client: fix command-line parsing with .rdp file 2013-09-17 17:03:35 -04:00
winhttp cmake: refactoring of MONOLITHIC_BUILD 2012-10-13 17:30:59 -04:00
winsock cmake: refactoring of MONOLITHIC_BUILD 2012-10-13 17:30:59 -04:00
wtsapi freerdp: merge with master 2013-09-16 17:10:27 -04:00
CMakeLists.txt cmake: remove vendor-specific options 2013-09-10 14:03:15 -04:00
dummy.c freerdp: various missing link dependencies and symbol exports 2013-09-03 21:48:26 -04:00