| | |
| | | #ifndef SHM_6CHO6D6C |
| | | #define SHM_6CHO6D6C |
| | | |
| | | #include "robust.h" |
| | | #include "log.h" |
| | | #include <atomic> |
| | | #include <boost/interprocess/managed_shared_memory.hpp> |
| | | #include <boost/interprocess/sync/interprocess_mutex.hpp> |
| | |
| | | if (Killed(old)) { |
| | | r = PidCas(old, pid()); |
| | | if (r) { |
| | | printf("PidCheck captured pid %d -> %d\n", old, pid()); |
| | | LOG_DEBUG() << "PidCheck captured pid " << old << " -> " << pid(); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | }; |
| | | |
| | | typedef robust::Mutex Mutex; |
| | | typedef robust::Guard<Mutex> Guard; |
| | | typedef interprocess_mutex Mutex; |
| | | typedef scoped_lock<Mutex> Guard; |
| | | // typedef robust::Guard<Mutex> Guard; |
| | | |
| | | class SharedMemory : public mshm_t |
| | | { |