Skip to content

Commit

Permalink
fixes #158 by flipping face orientation; also debugging messages for …
Browse files Browse the repository at this point in the history
…sync
  • Loading branch information
pyushkevich committed Jan 15, 2025
1 parent 6c6443c commit e6af460
Show file tree
Hide file tree
Showing 11 changed files with 340 additions and 213 deletions.
14 changes: 1 addition & 13 deletions Common/IPCHandler.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,8 @@
#include <cstring>
#include <iostream>
#include <cerrno>
#include <functional>
#include <sstream>
#include <chrono>

#if defined(WIN32)
#include <process.h>
#else
#include <unistd.h>
#endif

using namespace std;

IPCHandler::AttachStatus
Expand Down Expand Up @@ -222,11 +214,7 @@ IPCHandler::IPCHandler(AbstractSharedMemorySystemInterface *interface)
m_SharedData = NULL;

// Get the process ID
#ifdef WIN32
m_ProcessID = _getpid();
#else
m_ProcessID = getpid();
#endif
m_ProcessID = m_Interface->GetProcessID();
}

IPCHandler::~IPCHandler()
Expand Down
7 changes: 7 additions & 0 deletions Common/IPCHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class AbstractSharedMemorySystemInterface
virtual void* Data() = 0;
virtual bool Lock() = 0;
virtual bool Unlock() = 0;
virtual int GetProcessID() = 0;
};

/**
Expand Down Expand Up @@ -60,6 +61,12 @@ class IPCHandler
/** Broadcast a 'message' (i.e. replace shared memory contents */
bool Broadcast(const void *message_ptr);

/** Get the process Id */
long GetProcessID() { return m_ProcessID; };

/** Get the PID of last sender */
long GetLastMessageSenderProcessID() { return m_LastSender; }

protected:

struct Header
Expand Down
Loading

0 comments on commit e6af460

Please sign in to comment.