Fix pthread to number converstion ^KT-52429
Merge-request: KT-MR-6918 Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
This commit is contained in:
committed by
Space
parent
45fc5fb76b
commit
58569f2eee
@@ -1,6 +1,7 @@
|
||||
#include "workerSignals.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
|
||||
@@ -21,7 +22,8 @@ extern "C" void setupSignalHandler(void) {
|
||||
|
||||
extern "C" void signalThread(uint64_t thread, int value) {
|
||||
pendingValue = value;
|
||||
auto t = reinterpret_cast<pthread_t>(thread);
|
||||
pthread_t t = {};
|
||||
memcpy(&t, &thread, sizeof(pthread_t));
|
||||
auto result = pthread_kill(t, SIGUSR1);
|
||||
assert(result == 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user