summaryrefslogtreecommitdiffstats
path: root/winpr/libwinpr/thread
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:12 +0000
commit827a4c3faa27e0c186452585b15094eee1119085 (patch)
treee6a08b0c767863d66f7d4a9de80db5edc7db29be /winpr/libwinpr/thread
parentReleasing progress-linux version 3.3.0+dfsg1-1~progress7.99u1. (diff)
downloadfreerdp3-827a4c3faa27e0c186452585b15094eee1119085.tar.xz
freerdp3-827a4c3faa27e0c186452585b15094eee1119085.zip
Merging upstream version 3.5.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'winpr/libwinpr/thread')
-rw-r--r--winpr/libwinpr/thread/CMakeLists.txt4
-rw-r--r--winpr/libwinpr/thread/thread.h48
2 files changed, 19 insertions, 33 deletions
diff --git a/winpr/libwinpr/thread/CMakeLists.txt b/winpr/libwinpr/thread/CMakeLists.txt
index bfc04dd..2e9cd05 100644
--- a/winpr/libwinpr/thread/CMakeLists.txt
+++ b/winpr/libwinpr/thread/CMakeLists.txt
@@ -25,10 +25,6 @@ winpr_module_add(
thread.h
tls.c)
-if(${CMAKE_SYSTEM_NAME} MATCHES SunOS)
- winpr_library_add_private(rt)
-endif()
-
if(BUILD_TESTING)
add_subdirectory(test)
endif()
diff --git a/winpr/libwinpr/thread/thread.h b/winpr/libwinpr/thread/thread.h
index aef9bc9..92d05d3 100644
--- a/winpr/libwinpr/thread/thread.h
+++ b/winpr/libwinpr/thread/thread.h
@@ -32,49 +32,39 @@
#include "../synch/event.h"
#include "apc.h"
-#ifdef __GNUC__
-#define ALIGN64 __attribute__((aligned(8)))
-#else
-#ifdef _WIN32
-#define ALIGN64 __declspec(align(8))
-#else
-#define ALIGN64
-#endif
-#endif
-
typedef void* (*pthread_start_routine)(void*);
typedef struct winpr_APC_item WINPR_APC_ITEM;
typedef struct
{
- ALIGN64 pthread_mutex_t mux;
- ALIGN64 pthread_cond_t cond;
- ALIGN64 BOOL val;
+ WINPR_ALIGN64 pthread_mutex_t mux;
+ WINPR_ALIGN64 pthread_cond_t cond;
+ WINPR_ALIGN64 BOOL val;
} mux_condition_bundle;
struct winpr_thread
{
WINPR_HANDLE common;
- ALIGN64 BOOL started;
- ALIGN64 WINPR_EVENT_IMPL event;
- ALIGN64 BOOL mainProcess;
- ALIGN64 BOOL detached;
- ALIGN64 BOOL joined;
- ALIGN64 BOOL exited;
- ALIGN64 DWORD dwExitCode;
- ALIGN64 pthread_t thread;
- ALIGN64 SIZE_T dwStackSize;
- ALIGN64 LPVOID lpParameter;
- ALIGN64 pthread_mutex_t mutex;
+ WINPR_ALIGN64 BOOL started;
+ WINPR_ALIGN64 WINPR_EVENT_IMPL event;
+ WINPR_ALIGN64 BOOL mainProcess;
+ WINPR_ALIGN64 BOOL detached;
+ WINPR_ALIGN64 BOOL joined;
+ WINPR_ALIGN64 BOOL exited;
+ WINPR_ALIGN64 DWORD dwExitCode;
+ WINPR_ALIGN64 pthread_t thread;
+ WINPR_ALIGN64 SIZE_T dwStackSize;
+ WINPR_ALIGN64 LPVOID lpParameter;
+ WINPR_ALIGN64 pthread_mutex_t mutex;
mux_condition_bundle isRunning;
mux_condition_bundle isCreated;
- ALIGN64 LPTHREAD_START_ROUTINE lpStartAddress;
- ALIGN64 LPSECURITY_ATTRIBUTES lpThreadAttributes;
- ALIGN64 APC_QUEUE apc;
+ WINPR_ALIGN64 LPTHREAD_START_ROUTINE lpStartAddress;
+ WINPR_ALIGN64 LPSECURITY_ATTRIBUTES lpThreadAttributes;
+ WINPR_ALIGN64 APC_QUEUE apc;
#if defined(WITH_DEBUG_THREADS)
- ALIGN64 void* create_stack;
- ALIGN64 void* exit_stack;
+ WINPR_ALIGN64 void* create_stack;
+ WINPR_ALIGN64 void* exit_stack;
#endif
};