diff options
author | Bruce Cran <BCran@fusionio.com> | 2012-06-08 08:12:20 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-06-08 08:12:20 +0200 |
commit | d39879467ccb7f136815be0ba7fd283524c2dafb (patch) | |
tree | 42636bd685e5fab4605c0b90df7323469b4b79ad /os/windows/posix.c | |
parent | 47ea504af7710960e4019254cb910f69a32cb242 (diff) | |
download | fio-d39879467ccb7f136815be0ba7fd283524c2dafb.tar.gz fio-d39879467ccb7f136815be0ba7fd283524c2dafb.tar.bz2 |
Windows 32-bit fio fixes
Fix no-op shift in shmget by casting to 64-bit.
Generate a new Product GUID for fio 2.0.8.
Add the 32-bit MinGW-w64 compiler executable name in Makefile.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'os/windows/posix.c')
-rwxr-xr-x | os/windows/posix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/os/windows/posix.c b/os/windows/posix.c index 9ef369e1..41bcb2d4 100755 --- a/os/windows/posix.c +++ b/os/windows/posix.c @@ -393,7 +393,9 @@ HANDLE fileMappings[1024]; int shmget(key_t key, size_t size, int shmflg) { int mapid = -1; - HANDLE hMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, (PAGE_EXECUTE_READWRITE | SEC_RESERVE), size >> 32, size & 0xFFFFFFFF, NULL); + uint32_t size_low = size & 0xFFFFFFFF; + uint32_t size_high = ((uint64_t)size) >> 32; + HANDLE hMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, (PAGE_EXECUTE_READWRITE | SEC_RESERVE), size_high, size_low, NULL); if (hMapping != NULL) { fileMappings[nFileMappings] = hMapping; mapid = nFileMappings; |