summaryrefslogtreecommitdiff
path: root/TSRM/tsrm_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'TSRM/tsrm_win32.c')
-rw-r--r--TSRM/tsrm_win32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index 6bf826e6fa..e3d311e418 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -722,10 +722,6 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
return (void*)-1;
}
- shm->descriptor->shm_atime = time(NULL);
- shm->descriptor->shm_lpid = getpid();
- shm->descriptor->shm_nattch++;
-
shm->addr = MapViewOfFileEx(shm->segment, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
err = GetLastError();
@@ -734,6 +730,10 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
return (void*)-1;
}
+ shm->descriptor->shm_atime = time(NULL);
+ shm->descriptor->shm_lpid = getpid();
+ shm->descriptor->shm_nattch++;
+
return shm->addr;
}