summaryrefslogtreecommitdiff
path: root/src/md/enc
diff options
context:
space:
mode:
authorKoundinya Veluri <kouvel@microsoft.com>2015-08-21 11:43:34 -0700
committerKoundinya Veluri <kouvel@microsoft.com>2015-08-26 21:35:47 -0700
commit96846758a0df94985aedc6c301a8576ee1f1da4b (patch)
tree45206616b8e94b745fdcca3a4a76f030443b2c4a /src/md/enc
parentb7d38a0ff5a4faa3ed6da5b8e0e375b9e91e6a77 (diff)
downloadcoreclr-96846758a0df94985aedc6c301a8576ee1f1da4b.tar.gz
coreclr-96846758a0df94985aedc6c301a8576ee1f1da4b.tar.bz2
coreclr-96846758a0df94985aedc6c301a8576ee1f1da4b.zip
Return error upon attemping to create named objects in PAL.
Update PAL APIs that create named objects (mutex, semaphore, event, file mapping) to return a not-supported error code. It was decided to not support cross-process synchronization in PAL at present time due to complexities involved in reliably emulating Windows' behavior. @stephentoub has already made changes on the FX side to throw PlatformNotSupportedException in these cases. Related to issue #1237.
Diffstat (limited to 'src/md/enc')
-rw-r--r--src/md/enc/stgio.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/md/enc/stgio.cpp b/src/md/enc/stgio.cpp
index 020cf66b05..6c665c88b9 100644
--- a/src/md/enc/stgio.cpp
+++ b/src/md/enc/stgio.cpp
@@ -112,7 +112,6 @@ void StgIO::CtorInit()
m_cbBuff = 0;
m_rgPageMap = 0;
m_FileType = FILETYPE_UNKNOWN;
- *m_rcShared = '\0';
m_cRef = 1;
m_mtMappedType = MTYPE_NOMAPPING;
}
@@ -787,10 +786,8 @@ HRESULT StgIO::MapFileToMem( // Return code.
// Check the size of the data we want to map. If it is small enough, then
// simply allocate a chunk of memory from a finer grained heap. This saves
// virtual memory space, page table entries, and should reduce overall working set.
- // Note that any shared memory objects will require the handles to be in place
- // and are not elligible. Also, open for read/write needs a full backing
- // store.
- if (!*m_rcShared && (m_cbData <= SMALL_ALLOC_MAP_SIZE) && (SMALL_ALLOC_MAP_SIZE > 0))
+ // Also, open for read/write needs a full backing store.
+ if ((m_cbData <= SMALL_ALLOC_MAP_SIZE) && (SMALL_ALLOC_MAP_SIZE > 0))
{
DWORD cbRead = m_cbData;
_ASSERTE(m_pData == 0);
@@ -854,8 +851,6 @@ HRESULT StgIO::MapFileToMem( // Return code.
// change for the life of the handle.
if ((m_fFlags & DBPROP_TMODEF_WRITE) == 0 && m_iType != STGIO_STREAM)
{
- _ASSERTE(!*m_rcShared);
-
// Create a mapping object for the file.
_ASSERTE(m_hMapping == 0);
@@ -869,7 +864,7 @@ HRESULT StgIO::MapFileToMem( // Return code.
#endif
if ((m_hMapping = WszCreateFileMapping(m_hFile, pAttributes, dwProtectionFlags,
- 0, 0, *m_rcShared ? m_rcShared : 0)) == 0)
+ 0, 0, nullptr)) == 0)
{
return (MapFileError(GetLastError()));
}