| | |
| | | |
| | | namespace |
| | | { |
| | | std::unique_ptr<TopicNode> &ProcNodePtr() |
| | | { |
| | | static bool init = GlobalInit(BHomeShm()); |
| | | static std::unique_ptr<TopicNode> ptr(new TopicNode(BHomeShm())); |
| | | return ptr; |
| | | } |
| | | TopicNode &ProcNode() |
| | | { |
| | | static bool init_bind_msg_shm = MsgI::BindShm(BHomeShm()); |
| | | static TopicNode node(BHomeShm()); |
| | | return node; |
| | | return *ProcNodePtr(); |
| | | } |
| | | |
| | | class TmpPtr : private boost::noncopyable |
| | |
| | | free(data); |
| | | } |
| | | |
| | | int BHCleanup() |
| | | { |
| | | ProcNodePtr().reset(); |
| | | return 0; |
| | | } |
| | | |
| | | int BHGetLastError(void **msg, int *msg_len) |
| | | { |
| | | int ec = 0; |