Some shmem Windows updates. I'm not sure if this makes a difference. Shiqing - can you please test?.
This commit was SVN r25591.
Этот коммит содержится в:
родитель
076db435cd
Коммит
dcb965e60e
@ -247,7 +247,6 @@ static void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ////////////////////////////////////////////////////////////////////////// */
|
/* ////////////////////////////////////////////////////////////////////////// */
|
||||||
/* SKG will not compile, but it's a start */
|
|
||||||
static int
|
static int
|
||||||
segment_create(opal_shmem_ds_t *ds_buf,
|
segment_create(opal_shmem_ds_t *ds_buf,
|
||||||
const char *file_name,
|
const char *file_name,
|
||||||
@ -282,7 +281,7 @@ segment_create(opal_shmem_ds_t *ds_buf,
|
|||||||
*temp2 = '/';
|
*temp2 = '/';
|
||||||
}
|
}
|
||||||
/* update path change in ds_buf */
|
/* update path change in ds_buf */
|
||||||
memcpy(ds_buf->seg_name, temp1, OPAL_PATH_MAX);
|
memcpy(ds_buf->seg_name, file_name, OPAL_PATH_MAX);
|
||||||
/* relase the temporary file name */
|
/* relase the temporary file name */
|
||||||
free(temp1); /* relase the temporary file name */
|
free(temp1); /* relase the temporary file name */
|
||||||
|
|
||||||
@ -297,7 +296,7 @@ segment_create(opal_shmem_ds_t *ds_buf,
|
|||||||
/* size: low 32-bits */
|
/* size: low 32-bits */
|
||||||
(DWORD)real_size,
|
(DWORD)real_size,
|
||||||
/* name of map object */
|
/* name of map object */
|
||||||
ds_buf->seg_name);
|
temp1);
|
||||||
if (NULL == hMapObject) {
|
if (NULL == hMapObject) {
|
||||||
rc = GetLastError();
|
rc = GetLastError();
|
||||||
goto out;
|
goto out;
|
||||||
@ -495,16 +494,6 @@ segment_unlink(opal_shmem_ds_t *ds_buf)
|
|||||||
ds_buf->seg_name)
|
ds_buf->seg_name)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (-1 == unlink(ds_buf->seg_name)) {
|
|
||||||
int err = errno;
|
|
||||||
char hn[MAXHOSTNAMELEN];
|
|
||||||
gethostname(hn, MAXHOSTNAMELEN - 1);
|
|
||||||
hn[MAXHOSTNAMELEN - 1] = '\0';
|
|
||||||
opal_show_help("help-opal-shmem-windows.txt", "sys call fail", 1, hn,
|
|
||||||
"unlink(2)", ds_buf->seg_name, strerror(err), err);
|
|
||||||
return OPAL_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* don't completely reset the opal_shmem_ds_t. in particular, only reset
|
/* don't completely reset the opal_shmem_ds_t. in particular, only reset
|
||||||
* the id and flip the invalid bit. size and name values will remain valid
|
* the id and flip the invalid bit. size and name values will remain valid
|
||||||
* across unlinks. other information stored in flags will remain untouched.
|
* across unlinks. other information stored in flags will remain untouched.
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user