Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislavs Sokurenko <vladislavs.sokurenko@zabbix.com>2021-06-19 14:40:32 +0300
committerVladislavs Sokurenko <vladislavs.sokurenko@zabbix.com>2021-06-19 14:40:32 +0300
commit7ac57110533c3a6ab546afc30180f1e208fab4f6 (patch)
treecd708e736309086f2b2c81fe2b5f9d645233026a
parentdea9781bc443251b910f73e9795c85af9fb1f165 (diff)
...G...... [ZBXNEXT-6674] fixed compilation on Windows
-rw-r--r--include/threads.h14
-rw-r--r--src/libs/zbxsys/threads.c2
2 files changed, 9 insertions, 7 deletions
diff --git a/include/threads.h b/include/threads.h
index a926cd8c9d3..57c5c7890dc 100644
--- a/include/threads.h
+++ b/include/threads.h
@@ -26,10 +26,12 @@
/* the ZBXEndThread function is implemented in service.c file */
void CALLBACK ZBXEndThread(ULONG_PTR dwParam);
- #define ZBX_THREAD_ERROR 0
+ #define ZBX_THREAD_ERROR 0
- #define ZBX_THREAD_HANDLE HANDLE
- #define ZBX_THREAD_HANDLE_NULL NULL
+ #define ZBX_THREAD_HANDLE HANDLE
+ #define ZBX_THREAD_HANDLE_NULL NULL
+
+ #define ZBX_THREAD_PRIORITY_NONE 0
#define ZBX_THREAD_ENTRY_POINTER(pointer_name) \
unsigned (__stdcall *pointer_name)(void *)
@@ -50,10 +52,10 @@
int zbx_fork(void);
void zbx_child_fork(pid_t *pid);
- #define ZBX_THREAD_ERROR -1
+ #define ZBX_THREAD_ERROR -1
- #define ZBX_THREAD_HANDLE pid_t
- #define ZBX_THREAD_HANDLE_NULL 0
+ #define ZBX_THREAD_HANDLE pid_t
+ #define ZBX_THREAD_HANDLE_NULL 0
#define ZBX_THREAD_PRIORITY_NONE 0
#define ZBX_THREAD_PRIORITY_FIRST 1
diff --git a/src/libs/zbxsys/threads.c b/src/libs/zbxsys/threads.c
index ace1fe4dcd4..d13ac89ce3c 100644
--- a/src/libs/zbxsys/threads.c
+++ b/src/libs/zbxsys/threads.c
@@ -292,7 +292,7 @@ void zbx_threads_wait(ZBX_THREAD_HANDLE *threads, const int *threads_flags, int
#else
/* wait for threads to finish first. although listener threads will never end */
WaitForMultipleObjectsEx(threads_num, threads, TRUE, 1000, FALSE);
- threads_kill(threads, threads_num, ret);
+ threads_kill(threads, threads_num, threads_flags, ZBX_THREAD_PRIORITY_NONE, ret);
#endif
for (i = 0; i < threads_num; i++)