[IBAT] allow simultaneous IBAT device access from user mode by adding RW sharing...
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 17 Aug 2009 23:11:00 +0000 (23:11 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 17 Aug 2009 23:11:00 +0000 (23:11 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2363 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/ibat/user/ibat.cpp

index 9d48972..69d9186 100644 (file)
@@ -98,7 +98,7 @@ Resolve(
         return E_INVALIDARG;\r
 \r
     H hIbatDev = CreateFileW( IBAT_WIN32_NAME,\r
-        MAXIMUM_ALLOWED, 0, NULL,\r
+        MAXIMUM_ALLOWED,(FILE_SHARE_READ|FILE_SHARE_WRITE), NULL,\r
         OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );\r
     if( hIbatDev == INVALID_HANDLE_VALUE )\r
         return HRESULT_FROM_WIN32( GetLastError() );\r
@@ -306,7 +306,7 @@ Resolve(
         return E_NOTIMPL;\r
 \r
     H hIbatDev = CreateFileW( IBAT_WIN32_NAME,\r
-        MAXIMUM_ALLOWED, 0, NULL,\r
+        MAXIMUM_ALLOWED,(FILE_SHARE_READ|FILE_SHARE_WRITE), NULL,\r
         OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );\r
     if( hIbatDev == INVALID_HANDLE_VALUE )\r
         return HRESULT_FROM_WIN32( GetLastError() );\r