16 #include <ace/Lib_Find.h>
28 m_pAccessMutex(nullptr),
29 m_pWaitDataMutex(nullptr),
60 char temp_dir_path[1024];
62 if (ACE::get_temp_dir(temp_dir_path, 1024) == -1) {
67 #ifdef ACE_LACKS_SYSV_SHMEM
69 snprintf(obj_name, 2048,
"%sSHMEM_FILE_%d_%d", temp_dir_path, port, 0);
71 m_pMap =
new ACE_Shared_Memory_MM(obj_name,
74 ACE_DEFAULT_FILE_PERMS,
87 #ifdef _ACE_USE_SV_SEM
88 snprintf(obj_name, 2048,
"%sSHMEM_ACCESS_MUTEX_%d", temp_dir_path, port);
90 snprintf(obj_name, 2048,
"%sSHMEM_WAITDATA_MUTEX_%d", temp_dir_path, port);
93 snprintf(obj_name, 2048,
"SHMEM_ACCESS_MUTEX_%d", port);
95 snprintf(obj_name, 2048,
"SHMEM_WAITDATA_MUTEX_%d", port);
110 ACE_Shared_Memory* pNewMap;
114 #ifdef ACE_LACKS_SYSV_SHMEM
116 char file_path[1024];
118 if (ACE::get_temp_dir(file_path, 1024) == -1) {
123 char file_name[2048];
126 pNewMap =
new ACE_Shared_Memory_MM(file_name,
129 ACE_DEFAULT_FILE_PERMS,
147 char* pNewData = (
char*)(pNewHeader + 1);
182 memcpy((
void*)(data + first_block_size), (
void*)
m_pData, len - first_block_size);
205 char* data = b.
get();
210 while (!(
ret =
read(data, (
int)len))) {
211 #ifdef _ACE_USE_SV_SEM
213 tv.sec(tv.sec() + 1);