Emmanuel Ledoux
6f5de27081
winpr-thread:
...
- added the unit test: TestThreadExitThread
- fix: ensure thread_list to be up to date before to call ExitThread()
- possibly resolved: Problems with serial redirection #2389
2015-05-22 18:28:10 +02:00
Marc-André Moreau
b9c1cddc2e
Merge pull request #2583 from bceverly/OpenBSD-cleanup
...
Two minor source code changes to remove warnings
2015-05-21 10:17:54 -04:00
Bryan Everly
a3a3efe31e
Fixed mistake with bitwise operator in previous two commits
2015-05-20 12:17:05 -04:00
Bryan Everly
80af54b169
Moved thread code to OpenBSD only
2015-05-20 10:52:24 -04:00
Hardening
f8120919af
Add checks for some XXX_New and XXX_Add functions
...
Based on PR #2616
2015-05-18 11:28:00 +02:00
Norbert Federa
1eff1a345e
free can handle NULL perfectly fine
2015-05-11 09:07:39 +02:00
Bryan Everly
9865854f3c
Simplified random byte stream generation code to use SSL RAND_bytes() and also eliminated two more compiler warnings.
2015-05-05 12:33:44 -04:00
Armin Novak
b3ea02a777
Removed INVALID_HANDLE_VALUE from types not using it.
2015-03-31 15:18:45 +02:00
Armin Novak
afe8bd2a86
Fixed missing checks for invalid handle.
2015-03-31 15:18:45 +02:00
Bernhard Miklautz
1d7b3694a9
Integrate feedback from pull request ( #2492 )
...
* shell: add missing NULL checks
* thread: handle case where HAVE_EVENTFD_H isn't defined
* wlog: return NULL instead of 0
* wlog: use g_RootLog instead of WLog_GetRoot
otherwise a new root might be initialized on uninit
* indentation and style fixes
2015-03-25 17:38:21 +01:00
Bernhard Miklautz
3c7662517c
hardening
...
Start to add missing checks for:
* *alloc
* *_New
2015-03-25 17:38:21 +01:00
David FORT
52bd4469d9
Make handle operations static
...
This patch moves the handle operations in a static struct.
2015-03-16 10:31:26 +01:00
Armin Novak
9153af6a3e
Using new handle cleanup structure
2015-03-11 17:57:01 +01:00
Emmanuel Ledoux
4aeaffa286
libwinpr: better indentation
2015-01-28 12:43:20 +01:00
Emmanuel Ledoux
ab4a744b08
libwinpr: attempt to fix TerminateThread(...).
...
The following sequence should not hang forever anymore: TerminateThread(thread, 0); WaitForSingleObject(thread, INFINTE);
2015-01-27 21:05:40 +01:00
Armin Novak
122d1c43f4
Prettiefied WLog messages.
2015-01-20 11:04:23 +01:00
Armin Novak
44904ad5d2
Fixed a race condition at thread creation
...
The thread structure was incorrectly updated after the thread
function was already running. This caused a race condition with
thread exiting. When the thread function returned before the structure
was correctly updated, the exit routine cleaned up the handle as
it was incorrectly marked not started.
2015-01-16 11:26:31 +01:00
Marc-André Moreau
0818846d7c
winpr: fix build warnings
2014-11-21 15:12:49 -05:00
Marc-André Moreau
871339da88
Merge branch 'master' of github.com:awakecoding/FreeRDP
...
Conflicts:
winpr/libwinpr/thread/thread.c
2014-11-20 11:51:18 -05:00
Marc-André Moreau
2afcac7838
libwinpr-thread: fix non-blocking internal pipe-based event on OS X
2014-11-20 11:48:02 -05:00
Armin Novak
fb5d20f338
Fixed NULL pointer dereference.
2014-11-16 16:51:04 +01:00
Armin Novak
51cb07b0f4
Fixed use after free.
2014-11-16 15:21:13 +01:00
Armin Novak
f5a78d9c98
Fixed use after free.
2014-11-16 14:44:30 +01:00
Marc-André Moreau
68ee5df7d9
winpr: fix build warnings
2014-11-11 11:21:34 -05:00
Armin Novak
5bf25fd87c
Fixed missing includes and typo.
2014-10-27 11:45:39 +01:00
Armin Novak
8f98f28ce8
Fixed merge errors.
2014-10-27 11:39:02 +01:00
Armin Novak
a6eff65259
Fixed ExitThread, now running pthread_exit and setting event.
2014-10-27 11:28:13 +01:00
Armin Novak
02a4d77da1
Setting exited flag in TerminateThread now to allow setting return code.
2014-10-27 11:28:12 +01:00
Armin Novak
5122ce939a
Added funcion name to debug messages.
...
Fixed setting of started flag for threads.
pthred_exit now used correct return value argument.
Return value now also set when terminating thread.
2014-10-27 11:23:18 +01:00
Armin Novak
56ae609943
Removed WaitForSingleObject in reset_event, joining thread when not allowed.
2014-10-27 11:23:17 +01:00
Armin Novak
8a352c6f63
Fixed thread cleanup, now saving state of started flag, setting event and
...
then cleaning up the thread resources.
2014-10-27 11:23:17 +01:00
Armin Novak
f80f5621ac
Fixed thread handle cleanup, checking for resource cleanup now before resetting flags.
2014-10-27 11:23:17 +01:00
Armin Novak
8de2868281
Preferring exit code from ExitThread now over thread function return.
2014-10-27 11:23:16 +01:00
Armin Novak
3d7b65a430
Now using thread_launcher function to properly clean up thread resources at exit.
2014-10-27 11:23:15 +01:00
Armin Novak
c304f457cf
Implemented thread handling for WaitForMultipleObjects.
...
Implemented thread specific functions.
2014-10-27 11:23:15 +01:00
Bernhard Miklautz
6a49bcfe40
winpr: always build "monolitic"
...
winpr is now always build as single library.
The build option MONOLITHIC_BUILD doesn't influence this behavior anymore.
The only exception is winpr-makecert-tool which is still build as extra
library.
This obsoletes complex_libraries for winpr.
2014-07-10 11:10:58 +02:00
Marc-André Moreau
cd35b2772f
libwinpr-thread: fix compilation on Android
2014-05-22 15:32:49 -04:00
Marc-André Moreau
ae6c778eb7
libwinpr-smartcard: modifying threading
2014-05-11 05:23:30 -04:00
Hardening
1d1844aabd
Treat OOM cases
2014-04-09 16:07:06 +02:00
Marc-André Moreau
c0160b8015
libwinpr-handle: reduce usage of unneeded handle management functions
2013-05-16 18:27:26 -04:00
Marc-André Moreau
72e9087d1f
winpr: unify handle types
2013-05-16 17:32:58 -04:00
Marc-André Moreau
022ceec22a
xfreerdp: split client into executable and library
2013-04-02 16:22:30 -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
74bba0e767
libwinpr-pool: improve thread pool API on Linux
2013-01-22 16:19:32 -05:00
Marc-André Moreau
025b5bab68
libwinpr-pool: start implementing scheduling of asynchronous calls
2013-01-21 18:33:00 -05:00
Marc-André Moreau
151c2a63e4
libfreerdp-primitives: fix build on Mac OS X
2013-01-19 20:32:14 -05:00
Marc-André Moreau
7ff2be09b2
libfreerdp-core: more TSG memory cleanup
2012-12-12 22:03:40 -05:00
Marc-André Moreau
e764c81ad5
freerdp: fix building of libraries for Android
2012-10-13 20:31:01 -04:00
Marc-André Moreau
a11a69c70f
channels/rdpdr/disk: replace thread utils by WinPR thread API
2012-09-23 13:54:14 -04:00
Marc-André Moreau
9c41865fa7
libwinpr: stubbed a couple more modules of interest
2012-09-19 21:42:46 -04:00