Commit Graph

4914 Commits

Author SHA1 Message Date
Marc-André Moreau
ebee0d3f21 Merge pull request #1402 from nfedera/fix-2013-08-07-03
codec/rfx: added multithreaded encoder
2013-08-07 12:36:19 -07:00
Marc-André Moreau
331933635c Merge pull request #1401 from nfedera/fix-2013-08-07-02
libwinpr-utils: Use criticalsection with spincount
2013-08-07 12:35:46 -07:00
Marc-André Moreau
ecad3aa416 Merge pull request #1397 from nfedera/fix-2013-08-07-01
libwinpr-sync: New complete critical section code
2013-08-07 12:35:06 -07:00
Norbert Federa
0d916527bc codec/rfx: added multithreaded encoder 2013-08-07 18:22:42 +02:00
Norbert Federa
3a58934eb2 libwinpr-utils: Use criticalsection with spincount
Use InitializeCriticalSectionAndSpinCount instead of IntializeCriticalSection.
Using spin counts for critical sections of short duration enables the calling
thread to avoid the wait operation in most situations which can dramatically
improve the overall performance on multiprocessor systems.

On Linux this change has no effect because the new winpr critical section
implementation does not use the SpinCount field under Linux because the NPTL
synchronization primitives are implemented using the extremely performant
futex system calls which have this magic already built in.

However, on Mac OS X this change improved the overall performance of the
multithreaded RemoteFX decoder by 25 percent.

I've used a SpinCount of 4000 which avoided 99 percent of the wait calls.
This value is also used by Microsoft's heap manager for its per-heap
critical sections.

Note: This change requires pull request #1397 to be merged.
2013-08-07 18:16:01 +02:00
Norbert Federa
2b25b4a520 libwinpr-sync: New complete critical section code
- Complete implementation including recursion support
- Added an intensive ctest (TestSynchCritical)
- Struct members are used exactly as Windows does it internally:
  LockCount starts at -1, RecursionCount at 0
- Same performance optimizations as internally on Windows:
    - Fast lock acquisition path using CAS -> SpinCount -> wait
    - SpinCount automatically disabled on uniprocessor systems
- On Linux SpinCount is disabled because it provided no advantage over NPTL/futex in all tests

Support for CRITICAL_SECTION's DebugInfo is not yet included (but trivial to add).
2013-08-07 10:20:04 +02:00
Armin Novak
d8bd4397e9 Added generated documentation files to gitignore. 2013-08-07 09:19:16 +02:00
richterger
505facbb6f Fix off by one problem in StreamPool allocation 2013-08-07 08:01:33 +02:00
richterger
3246dcff22 Fixed memory corruption problems within client redirect
- set freed pointers to NULL to avoid double free
- realloc mppc to cleanly restart compression
- avoid releaseing StreamPool from already freed transport after client redirect
2013-08-07 07:58:34 +02:00
Armin Novak
9b95c55574 Replaced xmlto with xsltproc to word around a bug preventing manpages
to be build, when there are spaces in the build path.
2013-08-06 15:02:36 +02:00
Armin Novak
ef574c0fcc Added missing dependency for custom command generating manpage. 2013-08-06 12:40:48 +02:00
Armin Novak
6c676e8795 Removed placeholder for channel documentation until it is available. 2013-08-06 12:25:38 +02:00
Armin Novak
68511fc7d4 Added better formatting of commands in manpage. 2013-08-06 12:23:31 +02:00
Armin Novak
21d7e433c9 Merge remote-tracking branch 'upstream/master' 2013-08-06 11:58:21 +02:00
Armin Novak
be37b91e3d Minor adjustments in naming. 2013-08-06 11:54:37 +02:00
Armin Novak
e80effa2a8 Added examples with short description to manpage.
Added placeholder for channel documentation.
2013-08-06 11:54:37 +02:00
Armin Novak
38be366a67 Fixed generation of configure header, now replacing date fields
with current date.
Added CMake script to generate a variable containing the current
date.
Removed last argument (the terminating NULL element) from output.
2013-08-06 11:54:37 +02:00
Armin Novak
3fa1407c09 Removed extended text field. 2013-08-06 11:54:37 +02:00
Armin Novak
9295838f81 Added simple converter generating docbook XML from command line
argument struct.
Modified xfreerdp.1.xml to include generated documentation.
Modified CMake to regenerate manpages correctly using the generator.
2013-08-06 11:54:37 +02:00
Marc-André Moreau
7b80b19306 cmake: add FindPixman.cmake 2013-08-05 20:50:23 -04:00
Marc-André Moreau
13872f33bf libwinpr-utils: implement doubly-linked list 2013-08-05 17:29:14 -04:00
Vic Lee
21796ad73d libfreerdp-core/fastpath: fix memory leak when sending large packet. 2013-08-04 17:23:32 +08:00
Marc-André Moreau
190ed85a3d libwinpr-synch: add detection of timerfd support 2013-08-03 19:50:17 -04:00
Marc-André Moreau
9be33f83ea channels/rdpei: make use of critical section 2013-08-03 16:45:53 -04:00
Marc-André Moreau
ecc543d87d Merge branch 'master' of github.com:FreeRDP/FreeRDP into multitouch 2013-08-03 16:22:09 -04:00
Marc-André Moreau
dcd4cd9183 Merge pull request #1379 from nfedera/fix-2013-07-30-01
codec/rfx: removed unnecessary WaitForSingleObject
2013-08-03 13:20:17 -07:00
Marc-André Moreau
c9d46dc5ad Merge pull request #1386 from akallabeth/master
Added proper find_feature check for JPEG library.
2013-08-03 13:18:27 -07:00
Marc-André Moreau
36f361b2d5 Merge pull request #1389 from akallabeth/urbdrc_cmake_fixes
Urbdrc cmake fixes
2013-08-03 13:18:04 -07:00
Marc-André Moreau
144f20f579 Merge pull request #1388 from nfedera/fix-2013-08-02-01
winpr: improve and fix locking for data structures
2013-08-03 13:16:51 -07:00
Marc-André Moreau
68b254014e xfreerdp: fix cursor hidding/showing with multitouch 2013-08-03 16:13:39 -04:00
Armin Novak
71ec4e5a32 Added libusb detection CMake script. 2013-08-02 15:49:53 +02:00
Armin Novak
e1ca852e00 Fixed linking with libusb, now linking against correct library. 2013-08-02 15:49:53 +02:00
Armin Novak
bb1e6ce5e0 Now using libraries detected by CMake for linking against libusb. 2013-08-02 15:49:53 +02:00
Armin Novak
3e56dd108a Added proper CMake checks for libraries linked with urbdrc 2013-08-02 15:49:53 +02:00
Armin Novak
6d23c5f6ab Added proper CMake checks for libraries linked with urbdrc 2013-08-02 14:02:21 +02:00
Norbert Federa
81ef251fc8 winpr: improve and fix locking for data structures
- Improved/completed(almost) winpr's critical section implementation
- Replaced WaitForSingleObject locking with critical sections

Note:
WaitForSingleObject should _never_ be used for granular low-contention
locks as it _always_ enters the kernel.

Just replacing WaitForSingleObject locking in Bufferpool with
EnterCriticalSection boosts the multithreaded rfx decoder
performance by almost 400% on win32.
2013-08-02 12:07:05 +02:00
Armin Novak
4d13b27a02 Added proper find_feature check for JPEG library. 2013-08-02 10:04:58 +02:00
Marc-André Moreau
913d532e0d winpr: fix build on Linux 2013-07-30 10:57:54 -04:00
Daryl Poe
8b621518b6 careful with passwd in compatibility.c
(cherry picked from commit a4a5baf0da)
2013-07-30 14:11:29 +02:00
Norbert Federa
938a0890a3 codec/rfx: removed unnecessary WaitForSingleObject
The WaitForSingleObject call on TilePool's event is called with a zero time-out
interval and the event is a manual reset event ... thus no locking or waiting
is involved anyways and Queue_Dequeue may very well return NULL independently
of calling WaitForSingleObject which is already correctly handled.
2013-07-30 13:02:43 +02:00
Marc-André Moreau
4d2bc6ba46 libwinpr-synch: add unit tests, initial waitable timer support 2013-07-29 13:07:39 -04:00
Daryl Poe
174f2114dc fix segfault due to pulse input race condition
(cherry picked from commit be51676541)
2013-07-29 18:19:47 +02:00
Marc-André Moreau
007bd87ff4 libwinpr-synch: start implementing waitable timers 2013-07-29 11:57:29 -04:00
Marc-André Moreau
7246cf1f8f libfreerdp-core: reduce usage of update_force_flush in server-side update code 2013-07-29 10:21:32 -04:00
Marc-André Moreau
3e884984f2 libfreerdp-codec: added RDP6 bitmap compression test data 2013-07-28 21:07:28 -04:00
Marc-André Moreau
ea51dfc0b4 libfreerdp-core: fix server-side secondary drawing orders encoding bugs 2013-07-28 20:21:43 -04:00
Marc-André Moreau
3ec5be7624 libfreerdp-core: improve server-side capabilities parsing 2013-07-28 19:11:41 -04:00
Marc-André Moreau
8a4e83bdfb libfreerdp-core: fix server-side update encoding edge case 2013-07-28 16:31:38 -04:00
Marc-André Moreau
fdcf3a75be wfreerdp: fix build warnings 2013-07-26 15:43:55 -04:00
Marc-André Moreau
1307026a94 freerdp: fix build warnings with MSVC 2013-07-26 15:21:19 -04:00