Commit Graph

220 Commits

Author SHA1 Message Date
Norbert Federa
434ac77b83 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).
(cherry picked from commit 2b25b4a520)
2013-08-26 15:27:15 +02:00
Norbert Federa
f25f2e6055 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.
(pull #1388 - cherry picked from commit 81ef251fc8)
2013-08-26 12:53:43 +02:00
Marc-André Moreau
b3265b6958 libwinpr-utils: implement ListDictionary 2013-07-05 18:23:26 -04:00
Marc-André Moreau
77f5994e1c winpr: add _WINRT platform detection macro 2013-06-26 18:12:01 -04:00
Marc-André Moreau
c66b79ad46 winpr: extend stream api 2013-06-25 16:46:55 -04:00
Marc-André Moreau
31f68d0779 winpr: fix type conflict with X11 2013-06-24 23:58:31 -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
c76efec345 wfreerdp: update client with new API 2013-06-15 22:57:21 -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
6c9a3b8e64 freerdp: start using pubSub for client GUI events 2013-06-15 17:01:10 -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
72e9087d1f winpr: unify handle types 2013-05-16 17:32:58 -04:00
Marc-André Moreau
1b28ef5976 winpr: fix endian.h 2013-05-08 19:44:51 -04:00
Marc-André Moreau
d11752aa4b libwinpr-utils: started endianness utility macros 2013-05-08 18:29:41 -04:00
Marc-André Moreau
fdf3ddcf9e freerdp: purge deprecated stream utils 2013-05-08 17:48:30 -04:00
Marc-André Moreau
fd230443c5 freerdp: purge old stream utils 2013-05-08 16:27:21 -04:00
Marc-André Moreau
5b92413843 freerdp: purge deprecated stream utils 2013-05-08 16:09:16 -04:00
Marc-André Moreau
9bf924929c xfreerdp-server: use libwinpr-input for keyboard mapping 2013-05-02 01:34:54 -04:00
Marc-André Moreau
b4cac74136 xfreerdp-server: fix RemoteFX encoding 2013-05-01 18:15:55 -04:00
Marc-André Moreau
e88b59c32c libfreerdp-core: improve async-transport mode 2013-04-30 17:16:38 -04:00
Marc-André Moreau
51715636a5 freerdp: remove some deprecated stream utils 2013-04-29 22:35:15 -04:00
Hardening
dcdb411208 Fix winpr headers for C++ usage
This patch add missing extern "C" declaration to use the headers in
C++ projects.
2013-04-17 23:06:48 +02:00
Hardening
129614ff6c Merge branch 'master' of git://github.com/FreeRDP/FreeRDP 2013-04-14 15:46:23 +02:00
Hardening
4b9f61596b Fixed signed/unsigned warning 2013-04-14 15:41:04 +02:00
Hardening
fa5ee0a7dd Fixed external declaration for C++ 2013-04-14 15:40:34 +02:00
Marc-André Moreau
b4b0fb0642 Merge pull request #1188 from awakecoding/master
Android Translation, LoadBalanceInfo, StreamPool
2013-04-12 15:30:14 -07:00
Marc-André Moreau
0fded8c2d0 winpr-utils: fix StreamPool 2013-04-12 12:20:20 -04:00
Vic Lee
edaf5073e3 winpr: do not redefine UNICODE_STRING on Windows. 2013-04-11 20:52:54 -07:00
Marc-André Moreau
f94f90c08b winpr-utils: initial stream pool implementation 2013-04-11 21:59:02 -04:00
Marc-André Moreau
0be8a12d78 winpr: fix string.h for C++ 2013-04-11 16:27:12 -04:00
Marc-André Moreau
0cbdd6b641 freerdp: merge with master 2013-04-09 10:18:03 -04:00
Marc-André Moreau
6dfa196966 wfreerdp: unify client interface 2013-04-08 22:10:59 -04:00
Marc-André Moreau
7b2f70c0c7 xfreerdp: fix including from C++ 2013-04-03 18:48:59 -04:00
Marc-André Moreau
55fb73fc42 winpr: fix headers for C++ (VOID issue) 2013-04-03 16:54:09 -04:00
Marc-André Moreau
d13f89d359 xfreerdp: modify way to return thread exit code 2013-04-02 14:51:12 -04:00
Marc-André Moreau
3835fa8a35 Merge pull request #1152 from mfleisz/master
iOS: Got rid of .xcodeproj file and various compile fixes
2013-04-02 06:07:53 -07:00
Hardening
4a92e370e0 Fix includes + pkgconfig file
This patch fixes some winpr includes when used with C++.
It also fix the pkgconfig file as Stream_New has changed of
library.
2013-03-29 23:37:13 +01:00
Martin Fleisz
38446b5f2b iOS: got rid of xcode project file 2013-03-29 14:28:27 +01:00
Marc-André Moreau
3417a3aab5 freerdp: merge RDP_EVENT type with wMessage 2013-03-28 21:13:56 -04:00
Marc-André Moreau
8b9ea43d78 libfreerdp-core: fix locking with TS Gateway 2013-03-27 20:06:10 -04:00
Marc-André Moreau
6f69b8a22f wfreerdp: fix build 2013-03-26 15:02:33 -04:00
Marc-André Moreau
b4f70ed8fd libwinpr-path: rename known path constants 2013-03-22 16:03:42 -04:00
Marc-André Moreau
068f0de4d4 libfreerdp-utils: purge old file utils 2013-03-22 15:52:43 -04:00
Marc-André Moreau
edf6e7258d libwinpr-path: add path detection functions 2013-03-22 00:42:09 -04:00
Marc-André Moreau
8fb7e80919 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2013-03-21 16:46:35 -04:00
Vic Lee
1964a2e4f1 include/winpr/synch.h: add missing extern C decl. 2013-03-21 15:13:33 -07:00
Marc-André Moreau
a8201b0d1b libwinpr-utils: combine old and new stream utils 2013-03-21 15:19:33 -04:00
Bernhard Miklautz
3bac044825 winpr/sysinfo: fixes and detection for avx PCLMULQDQ added
- fixed defines for avx aes detection
- added detection for avx carry less multiplication (PF_EX_AVX_PCLMULQDQ)
2013-03-15 01:06:33 +01:00