akallabeth
5a4a1a40ad
fix declaration and implementation parameter names
2024-09-03 12:24:53 +02:00
akallabeth
190929c018
[warnings] fix function pointer casts
2024-08-30 15:40:01 +02:00
akallabeth
6a3564407e
[warnings] fix clang-tidy issues in winpr
2024-08-29 15:20:39 +02:00
akallabeth
9c9d74e920
[warnings] fix redundant casts
2024-08-29 12:03:09 +02:00
akallabeth
1d33095500
[warnings] fix cert-err33-c
...
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +02:00
Armin Novak
d71af44bb1
[warnings] disable warnings for generated code
...
* Disable clang-tidy in test build directories
* Disable compiler warnings for test binary directories.
These contain generated code we can not change, so the warnings are just noise
2024-08-28 09:18:30 +02:00
akallabeth
ef4c1766d2
[winpr,thread] implement SetThreadPriority
2024-05-24 15:44:17 +02:00
akallabeth
f4b7c59915
[cmake] move platform defines to common include
...
* Move platform specific settings to a common CMake include
2024-03-20 09:11:08 +01:00
akallabeth
d87d598305
[winpr] add WINPR_ALIGN64 defines
...
Add defines to aling struct members to 8 bytes
2024-03-12 14:24:36 +01:00
akallabeth
d7ebec5a65
[tidy] move loop variable declaration to loop
2024-02-22 12:31:50 +01:00
akallabeth
0ba995655d
[clang-tidy] cppcoreguidelines-init-variables
2024-02-15 11:49:16 +01:00
akallabeth
207def5c56
[clang-tidy] readability-isolate-declaration
2024-02-15 11:49:16 +01:00
akallabeth
2fffcd64b9
[winpr] use winpr_strerror instead of strerror
...
use the wrapper from WinPR to use the best implementation available.
2024-02-06 15:45:47 +01:00
akallabeth
1b31852d32
[git] remove .gitignore
...
we do no longer allow in source builds, so remove all the .gitignore
files just hiding generated files
2023-11-28 12:14:55 +01:00
David Fort
56324906a2
TestThreadExitThread: fix messages and wait timeout for the windows CI
...
Looks like for the windows x86_86 CI host 100ms is too small for a thread to terminate
so let's wait for longer and decrease the number of loops.
2023-08-12 09:24:08 -04:00
Rubycat
cec88e53bd
don't log an error when running GetCurrentThread from non winpr thread
...
Since 7c4a774e4e
this can legitimately happen in WaitForMultipleObjectsEx and is not
actually an error.
2023-04-07 11:03:56 +02:00
Armin Novak
641022b795
[logging] remove __FUNCTION__ from actual message
...
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
akallabeth
92d3e3c64a
[winpr] use WINPR_ prefix for conditional includes
2023-01-10 17:38:00 +01:00
akallabeth
43c5289928
Replaced memset/ZeroMemory with initializer
...
* Addes WINPR_ASSERT on many occations
* Replaced memset with array initializer
* Replaced ZeroMemory with array initializer
2022-10-14 12:11:01 +02:00
David Fort
c5c2e37f6d
More winpr fixes ( #8255 )
...
* Fix build with mingw
4a71cab2e7
broke wf_events.c.
The drive channel was not building because of missing definitions.
* winpr: make functions return False when not implemented
2022-09-28 16:07:04 +02:00
David Fort
e944d8d243
winpr: improve WaitForSingleObject and WaitForMultipleObject with processes
...
This patch improves waiting on process handles:
* under linux we take advantage of pidfd if available, when it can be used it
allows to have one or more process in the objects that are WaitForMultipleObject-ed.
* the patch also make the code honor the timeout parameter during a WaitForSingleObject and
possibly run completion when WaitForSingleObjectEx is executed with alertable set to true
2022-09-26 12:08:00 +02:00
David Fort
56204164fe
core: check the kind of object for events and threads functions
...
This patch adds some checks for the type of object in Event and Thread functions,
this may help to find bugs where a handle with the wrong type is used as argument
of these functions.
2022-09-21 16:04:02 +02:00
David Fort
da10710cf9
winpr: complement thread tests and fix some asserts ( #8105 )
2022-08-02 11:40:55 +02:00
akallabeth
bc8b4ade1c
reformatted
2022-06-23 08:48:39 +02:00
David Fort
a612ca4ba2
winpr: fix unitary test when CreateProcess is CreateProcessW
...
As the second argument of CreateProcessW is modified to split with spaces and so
this can not be a const arg.
2022-05-05 13:11:18 +02:00
akallabeth
ec699f6c75
scanbuild fixes
2022-04-28 12:37:19 +02:00
akallabeth
1dcc5a180a
Fixed warnings
2022-04-28 11:24:51 +02:00
Armin Novak
e1b4b4aee0
Replaced WINPR_HANDLE_DEF with a struct type
2022-04-28 08:42:09 +02:00
Armin Novak
833a445e4e
Refactor thread condition logic
...
* Add better return value checks
* Combine logic blocks in structs
* Add (easier to read) static functions for blocks
* Use condition variables only in combination with BOOL
2022-04-27 18:12:37 +02:00
akallabeth
752ac3b479
Fix #7793 : Do not expose internal input API ( #7794 )
...
* Fixed GetFileInformationByHandle initializers
* Fix #7793 : Do not expose internal input API
Slow-Path input uses UINT16 for scancodes on wire, but only the
lower byte is actually used. (the extended fields are sent in
keyboardFlags field)
Hide this implementation detail and adjust the API to use UINT8
for the code instead just like the corresponding Fast-Path PDU
* Added a warning for problematic slow path keyCodes
2022-04-13 09:34:05 +02:00
Mike Gabriel
d337ea9c16
winpr/{libwinpr/thread/thread.c,include/winpr/thread.h}: Keep DumpThreadHandles as a symbol even if WITH_DEBUG_THREADS is OFF.
2022-03-08 09:16:10 +01:00
Armin Novak
6ed50b4b1d
Refactored WinPR includes
2022-03-03 11:26:48 +01:00
akallabeth
8cc6582044
Unify struct definitions ( #7633 )
...
* Unified enum/struct definitions, fixed include issues
* Fixed mac compilation issues
* Added missing include
* Fixed windows server build warnings
* Fixed VS2010 build issue
* Removed unnecessary library linking
* Fixed ThreadPool WinXP compatibility
* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
akallabeth
bd42b34776
Decreased NTLM debug log verbosity
2022-01-13 17:20:48 +01:00
Armin Novak
ed9cc8c1cc
Removed heap module from WinPR
2021-12-23 14:27:12 +01:00
Armin Novak
b05eb8d834
Fixed thread related changes:
...
* Fixed typo
* Fixed wrong #ifdef
2021-09-20 10:59:59 +02:00
akallabeth
cb5ccec212
Cleaned up some possible race conditions with threads
...
* ExitThread no longer NORETURN, this eases handling of threads.
* Fixed a (rare) race condition when starting a thread
* Made global thread_list optional (you lose the exit code from
ExitThread)
2021-09-20 10:59:59 +02:00
Armin Novak
68f24477f6
Fixed compilation warnings on mac
2021-08-26 15:08:28 +02:00
Armin Novak
5afa592244
Fixed cast-qual warnings
2021-08-24 11:10:51 +02:00
Armin Novak
5eea7fc12d
WINPR_UNUSED argc, argv for unit tests
2021-08-24 10:45:57 +02:00
Armin Novak
610396e197
Fixed compilation warnings
...
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
akallabeth
8d82adb28a
Fixed warnings
2021-06-17 10:35:22 +02:00
Armin Novak
1af7ef2f1b
Fixed compilation warnings and typos
2021-06-16 15:21:56 +02:00
Armin Novak
d36d94766e
Replaced assert with WINPR_ASSERT
2021-06-14 09:37:07 +02:00
Armin Novak
c5fded2d83
Improved runtime of unit tests
2021-06-08 08:21:47 +02:00
akallabeth
6b36c6d417
Replace fopen and path functions with wrappers ( #7043 )
...
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.
2021-05-31 11:42:03 +02:00
David Fort
aeba30a505
winpr: correctly implement APC
...
This patch implements APC functions and fixes waitable timers with completions.
2021-04-07 08:15:16 +02:00
akallabeth
e2fd9db0b5
Added const to function arguments
2021-02-17 11:29:56 +01:00
Kobi Mizrachi
8c3054851c
winpr: thread: fix wrong log level in ThreadCloseHandle
2020-01-08 11:59:34 +01:00
Armin Novak
7c243da6e1
Remove symbols exported by accident.
2019-12-02 10:57:31 +01:00