6f9a8dbc1e
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. |
||
---|---|---|
channels | ||
client | ||
cmake | ||
cunit | ||
docs | ||
external | ||
include | ||
libfreerdp | ||
resources | ||
scripts | ||
server | ||
third-party | ||
winpr | ||
.gitignore | ||
ChangeLog | ||
CMakeCPack.cmake | ||
CMakeCPackOptions.cmake.in | ||
CMakeLists.txt | ||
config.h.in | ||
freerdp.pc.in | ||
freerdp.spec | ||
LICENSE | ||
README |
FreeRDP: A Remote Desktop Protocol Implementation ================================================= FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. Enjoy the freedom of using your software wherever you want, the way you want it, in a world where interoperability can finally liberate your computing experience. Resources --------- Project website: http://www.freerdp.com/ Issue tracker: https://github.com/FreeRDP/FreeRDP/issues Sources: https://github.com/FreeRDP/FreeRDP/ Wiki: https://github.com/FreeRDP/FreeRDP/wiki Downloads and other resources: http://pub.freerdp.com API doc: http://pub.freerdp.com/api/ IRC channel: #freerdp @ irc.freenode.net Mailing list: https://lists.sourceforge.net/lists/listinfo/freerdp-devel Microsoft Open Specifications ----------------------------- Information regarding the Microsoft Open Specifications can be found at: http://www.microsoft.com/openspecifications/ A list of reference documentation is maintained here: https://github.com/FreeRDP/FreeRDP/wiki/Reference-Documentation Compilation ----------- Instructions on how to get started compiling FreeRDP can be found on the wiki: https://github.com/FreeRDP/FreeRDP/wiki/Compilation