Commit Graph

253 Commits

Author SHA1 Message Date
Marc-André Moreau
c149ede6f2 libwinpr-utils: add support for variable size buffer pool 2013-08-15 00:01:42 -04:00
Marc-André Moreau
b972830841 libfreerdp-codec: make use of ObjectPool for tiles 2013-08-13 09:34:15 -04:00
Marc-André Moreau
f8e870a258 libwinpr-utils: implement asynchronous mode for ListDictionary 2013-08-12 17:48:32 -04:00
Marc-André Moreau
34f9985add freerdp: merge with master 2013-08-07 15:48:57 -04: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
richterger
505facbb6f Fix off by one problem in StreamPool allocation 2013-08-07 08:01:33 +02:00
Marc-André Moreau
13872f33bf libwinpr-utils: implement doubly-linked list 2013-08-05 17:29:14 -04: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
Marc-André Moreau
b3265b6958 libwinpr-utils: implement ListDictionary 2013-07-05 18:23:26 -04:00
Marc-André Moreau
3fbc4f899f libwinpr-utils: fix deadlock in PubSub 2013-06-27 14:16:50 -04:00
Marc-André Moreau
fbf3208b0a libwinpr-utils: rename certain PubSub functions 2013-06-18 21:23:26 -04:00
Marc-André Moreau
508bae674b libwinpr-utils: improve PubSub with automatic strongly-typed helpers 2013-06-18 00:39:48 -04:00
Marc-André Moreau
e77d4657e4 libwinpr-utils: add PubSub multiplexing and synchronized access 2013-06-15 18:18:02 -04:00
Marc-André Moreau
8ad532a9d4 libwinpr-utils: implement basic Publisher/Subscriber pattern 2013-06-15 13:32:13 -04:00
Marc-André Moreau
174d1bdd71 libwinpr-utils: start implementing Publisher/Subscriber pattern 2013-06-14 16:55:05 -04:00
Marc-André Moreau
2bd6808432 freerdp: merge with master 2013-06-05 10:31:01 -04:00
Daryl Poe
86156ce61f fix memory errors due to too-large memcpy in ArrayList 2013-06-03 09:30:14 -06:00
Marc-André Moreau
367ebf32a3 freerdp: make use of stream macros to access members 2013-05-15 12:14:26 -04:00
Marc-André Moreau
c49c235c93 libwinpr-utils: fix stream pool 2013-04-30 00:36:16 -04:00
Marc-André Moreau
83af4266bf libfreerdp-core: refactor fastpath fragmentation 2013-04-29 23:55:44 -04:00
Marc-André Moreau
51715636a5 freerdp: remove some deprecated stream utils 2013-04-29 22:35:15 -04:00
Marc-André Moreau
d04b76d005 libfreerdp-core: use stream pool 2013-04-12 13:44:23 -04:00
Marc-André Moreau
0fded8c2d0 winpr-utils: fix StreamPool 2013-04-12 12:20:20 -04:00
Marc-André Moreau
f94f90c08b winpr-utils: initial stream pool implementation 2013-04-11 21:59:02 -04:00
Hardening
7701c9d934 Replace printf(...) by fprintf(stderr, ...) 2013-03-28 23:06:34 +01:00
Marc-André Moreau
8b9ea43d78 libfreerdp-core: fix locking with TS Gateway 2013-03-27 20:06:10 -04:00
Christian Hofstaedtler
8833c14eac fix ArrayList_Shift for args (al, 0, -1)
As a result, this should fix #1051.
2013-03-12 23:21:42 +01:00
Marc-André Moreau
fe34a529d5 freerdp: fix build and warnings on Mac OS X 2013-02-21 21:09:42 -05:00
Marc-André Moreau
082e069913 libwinpr-utils: initial MessagePipe implementation 2013-02-20 14:48:32 -05:00
Marc-André Moreau
5e8d35c4ac channels/rdpsnd: use MessageQueue 2013-02-19 22:36:04 -05:00
Marc-André Moreau
e42b1272ef libfreerdp-core: added ObjectPool 2013-02-14 20:39:56 -05:00
Marc-André Moreau
47a7d54370 xfreerdp: stabilize asynchronous X11 event handling 2013-02-11 20:38:19 -05:00
Marc-André Moreau
4269ac5c14 xfreerdp: improve asynchronicity 2013-02-09 17:13:53 -05:00
Marc-André Moreau
64160af3a8 libfreerdp-core: added more message definitions 2013-02-04 14:56:54 -05:00
Marc-André Moreau
d9ac2cca39 libfreerdp-gdi: fix 8bpp FillRect color 2013-02-03 15:16:37 -05:00
Marc-André Moreau
470defa4af libwinpr-utils: test MessageQueue 2013-01-24 15:08:49 -05:00
Marc-André Moreau
fa30eeaef9 libwinpr-utils: started implementing asynchronous MessageQueue 2013-01-24 14:09:44 -05:00
Marc-André Moreau
f5d9b06252 libwinpr-utils: added buffer pool 2013-01-22 20:36:08 -05:00
Marc-André Moreau
d4d19d6473 libwinpr-pool: implement WaitForThreadpoolWorkCallbacks 2013-01-21 19:22:08 -05:00
Marc-André Moreau
9a7bcbb084 libfreerdp-codec: remove old RemoteFX tile pool 2013-01-20 20:44:30 -05:00
Marc-André Moreau
5b4aaf276f libfreerdp-core: added reference counter for receive buffers 2013-01-18 13:50:35 -05:00
Vic Lee
48c0c4b090 libwinpr-utils/queue: fix a memory corruption in Queue_Clear. 2012-12-24 12:45:55 +08:00
Marc-André Moreau
7ff2be09b2 libfreerdp-core: more TSG memory cleanup 2012-12-12 22:03:40 -05:00
Marc-André Moreau
d3e0537d0d libfreerdp-core: more TSG memory cleanup 2012-12-12 00:49:15 -05:00
Marc-André Moreau
3aeb9eb197 libfreerdp-core: TSG partial cleanup 2012-12-11 23:34:51 -05:00
Marc-André Moreau
db91555564 libfreerdp-core: improved TSG asynchronicity 2012-12-10 18:56:53 -05:00
Marc-André Moreau
731e606c15 libfreerdp-core: start handling client call state 2012-12-07 21:09:55 -05:00
Marc-André Moreau
be98cffbd2 libwinpr-utils: fix ArrayList 2012-12-07 19:40:44 -05:00
Marc-André Moreau
b92d2cf30f libwinpr-utils/collections: stubbed more classes 2012-12-05 19:36:45 -05:00
Marc-André Moreau
5a131688e4 libwinpr-utils: implement ArrayList 2012-12-05 17:24:01 -05:00
Marc-André Moreau
875c556d13 libfreerdp-core: change interlocked singly-linked list to synchronized Queue 2012-12-05 16:04:01 -05:00
Marc-André Moreau
9416e7355e libwinpr-utils: implement queue 2012-11-30 17:23:36 -05:00
Marc-André Moreau
c06c0fe665 libwinpr-utils: stubbed Queue, Stack and ArrayList 2012-11-30 16:13:19 -05:00