minor clean up
authorGengbin Zheng <gzheng@illinois.edu>
Thu, 8 Mar 2012 06:59:05 +0000 (00:59 -0600)
committerGengbin Zheng <gzheng@illinois.edu>
Thu, 8 Mar 2012 06:59:05 +0000 (00:59 -0600)
src/arch/util/machine-pxshm.c

index bbe5645976f7402d2b09c8d22babafc071603a58..e698e6fe57010a525fe69604be51c01ce5d5fbe1 100644 (file)
@@ -649,9 +649,7 @@ void freeSharedBuffers(){
                if(shm_unlink(pxshmContext->recvBufNames[i]) < 0){
                    fprintf(stderr,"Error from shm_unlink %s \n",strerror(errno));
                }
                if(shm_unlink(pxshmContext->recvBufNames[i]) < 0){
                    fprintf(stderr,"Error from shm_unlink %s \n",strerror(errno));
                }
-               shm_unlink(pxshmContext->sendBufNames[i]);
 #if PXSHM_LOCK
 #if PXSHM_LOCK
-               sem_unlink(pxshmContext->sendBufNames[i]);
                sem_unlink(pxshmContext->recvBufNames[i]);
 #endif
            }
                sem_unlink(pxshmContext->recvBufNames[i]);
 #endif
            }
@@ -665,11 +663,9 @@ void tearDownSharedBuffers(){
                if(shm_unlink(pxshmContext->recvBufNames[i]) < 0){
                    fprintf(stderr,"Error from shm_unlink %s \n",strerror(errno));
                }
                if(shm_unlink(pxshmContext->recvBufNames[i]) < 0){
                    fprintf(stderr,"Error from shm_unlink %s \n",strerror(errno));
                }
-               shm_unlink(pxshmContext->sendBufNames[i]);
 #if PXSHM_LOCK
                sem_close(pxshmContext->recvBufs[i].mutex);
                sem_close(pxshmContext->sendBufs[i].mutex);
 #if PXSHM_LOCK
                sem_close(pxshmContext->recvBufs[i].mutex);
                sem_close(pxshmContext->sendBufs[i].mutex);
-               sem_unlink(pxshmContext->sendBufNames[i]);
                sem_unlink(pxshmContext->recvBufNames[i]);
                 pxshmContext->recvBufs[i].mutex = NULL;
                 pxshmContext->sendBufs[i].mutex = NULL;
                sem_unlink(pxshmContext->recvBufNames[i]);
                 pxshmContext->recvBufs[i].mutex = NULL;
                 pxshmContext->sendBufs[i].mutex = NULL;