1
1

Use the common SM component to unmap the shared memory file.

This commit was SVN r8623.
Этот коммит содержится в:
George Bosilca 2005-12-31 15:07:48 +00:00
родитель 3baf36c6d9
Коммит 479d510eaf
3 изменённых файлов: 4 добавлений и 7 удалений

Просмотреть файл

@ -180,8 +180,7 @@ int mca_btl_sm_component_close(void)
/* unmap the shared memory control structure */ /* unmap the shared memory control structure */
if(mca_btl_sm_component.mmap_file != NULL) { if(mca_btl_sm_component.mmap_file != NULL) {
return_value=munmap(mca_btl_sm_component.mmap_file->map_addr, return_value = mca_common_sm_mmap_fini( mca_btl_sm_component.mmap_file );
mca_btl_sm_component.mmap_file->map_size);
if(-1 == return_value) { if(-1 == return_value) {
return_value=OMPI_ERROR; return_value=OMPI_ERROR;
opal_output(0," munmap failed :: file - %s :: errno - %d \n", opal_output(0," munmap failed :: file - %s :: errno - %d \n",
@ -192,7 +191,7 @@ int mca_btl_sm_component_close(void)
/* unlink file, so that it will be deleted when all references /* unlink file, so that it will be deleted when all references
* to it are gone - no error checking, since we want all procs * to it are gone - no error checking, since we want all procs
* to call this, so that in an abnormal termination scanario, * to call this, so that in an abnormal termination scenario,
* this file will still get cleaned up */ * this file will still get cleaned up */
unlink(mca_btl_sm_component.mmap_file->map_path); unlink(mca_btl_sm_component.mmap_file->map_path);
} }

Просмотреть файл

@ -787,8 +787,7 @@ int mca_coll_sm_bootstrap_finalize(void)
anything in here -- all data structures are referencing anything in here -- all data structures are referencing
within the bootstrap area, so the one top-level unmap does within the bootstrap area, so the one top-level unmap does
it all) */ it all) */
mca_common_sm_mmap_fini( meta );
munmap(meta->map_seg, meta->map_size);
} }
return OMPI_SUCCESS; return OMPI_SUCCESS;

Просмотреть файл

@ -199,8 +199,7 @@ int mca_ptl_sm_component_close(void)
/* unmap the shared memory control structure */ /* unmap the shared memory control structure */
if(mca_ptl_sm_component.mmap_file != NULL) { if(mca_ptl_sm_component.mmap_file != NULL) {
return_value=munmap(mca_ptl_sm_component.mmap_file->map_addr, return_value = mca_common_sm_mmap_fini( mca_ptl_sm_component.mmap_file );
mca_ptl_sm_component.mmap_file->map_size);
if(-1 == return_value) { if(-1 == return_value) {
return_value=OMPI_ERROR; return_value=OMPI_ERROR;
opal_output(0," munmap failed :: file - %s :: errno - %d \n", opal_output(0," munmap failed :: file - %s :: errno - %d \n",