| | |
| | | #include "defs.h" |
| | | #include "msg.h" |
| | | #include "shm_msg_queue.h" |
| | | #include "socket.h" |
| | | #include "shm_socket.h" |
| | | #include <boost/uuid/random_generator.hpp> |
| | | #include <boost/uuid/string_generator.hpp> |
| | | #include <boost/uuid/uuid.hpp> |
| | |
| | | // which node might crash inside and cause deadlock. |
| | | bool CenterInit(bhome_shm::SharedMemory &shm) |
| | | { |
| | | Mutex *mutex = shm.Create<Mutex>("shm_center_lock"); |
| | | Mutex *mutex = shm.FindOrCreate<Mutex>("shm_center_lock"); |
| | | if (!mutex || !mutex->try_lock()) { |
| | | return false; |
| | | } |
| | |
| | | { |
| | | ec = LastErrorStore().ec_; |
| | | msg = LastErrorStore().msg_; |
| | | } |
| | | } |
| | | |
| | | int NodeTimeoutSec() { return 60; } |