Merge branch 'developer' into g225gui

This commit is contained in:
maliakal_d 2022-02-07 15:10:42 +01:00
commit 251f07a9ae
6 changed files with 36 additions and 0 deletions

View File

@ -6,6 +6,12 @@
#include <chrono>
#include <unistd.h>
// gettid added in glibc 2.30
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
#include <sys/syscall.h>
#define gettid() syscall(SYS_gettid)
#endif
void Arping::SetInterfacesAndIps(const int index, const std::string &interface,
const std::string &ip) {

View File

@ -27,6 +27,12 @@ using sls::RuntimeError;
using sls::SocketError;
using Interface = sls::ServerInterface;
// gettid added in glibc 2.30
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
#include <sys/syscall.h>
#define gettid() syscall(SYS_gettid)
#endif
ClientInterface::~ClientInterface() {
killTcpThread = true;
LOG(logINFO) << "Shutting down TCP Socket on port " << portNumber;

View File

@ -14,6 +14,12 @@
#include <sys/wait.h> //wait
#include <unistd.h>
// gettid added in glibc 2.30
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
#include <sys/syscall.h>
#define gettid() syscall(SYS_gettid)
#endif
/** Define Colors to print data call back in different colors for different
* recievers */
#define PRINT_IN_COLOR(c, f, ...) \

View File

@ -16,6 +16,12 @@
#include <string>
#include <unistd.h>
// gettid added in glibc 2.30
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
#include <sys/syscall.h>
#define gettid() syscall(SYS_gettid)
#endif
namespace sls {
Receiver::~Receiver() = default;

View File

@ -10,6 +10,12 @@
#include <semaphore.h>
#include <unistd.h>
// gettid added in glibc 2.30
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
#include <sys/syscall.h>
#define gettid() syscall(SYS_gettid)
#endif
sem_t semaphore;
void sigInterruptHandler(int p) { sem_post(&semaphore); }

View File

@ -10,6 +10,12 @@
#include <iostream>
#include <unistd.h>
// gettid added in glibc 2.30
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
#include <sys/syscall.h>
#define gettid() syscall(SYS_gettid)
#endif
ThreadObject::ThreadObject(int threadIndex, std::string threadType)
: index(threadIndex), type(threadType) {
LOG(logDEBUG) << type << " thread created: " << index;