|
|
@@ -1,6 +1,6 @@
|
|
|
//
|
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
|
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
//
|
|
|
|
|
|
/*++
|
|
|
@@ -23,6 +23,7 @@ Abstract:
|
|
|
#define _CORUNIX_H
|
|
|
|
|
|
#include "palinternal.h"
|
|
|
+#include "CCSpinLock.hpp"
|
|
|
|
|
|
namespace CorUnix
|
|
|
{
|
|
|
@@ -55,8 +56,8 @@ namespace CorUnix
|
|
|
//
|
|
|
// Length of string, not including terminating NULL
|
|
|
//
|
|
|
-
|
|
|
- DWORD m_dwStringLength;
|
|
|
+
|
|
|
+ DWORD m_dwStringLength;
|
|
|
|
|
|
//
|
|
|
// Length of buffer backing string; must be at least 1+dwStringLength
|
|
|
@@ -73,7 +74,7 @@ namespace CorUnix
|
|
|
m_dwMaxLength(0)
|
|
|
{
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
CPalString(
|
|
|
const WCHAR *pwsz
|
|
|
)
|
|
|
@@ -126,7 +127,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_dwMaxLength;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
};
|
|
|
|
|
|
//
|
|
|
@@ -212,7 +213,7 @@ namespace CorUnix
|
|
|
// persist security information for the object type (as would be the case
|
|
|
// for, say, files) eSecurityPersistence should be set to
|
|
|
// OSPersistedSecurityInfo.
|
|
|
- //
|
|
|
+ //
|
|
|
// If the object may have a name eObjectNameSupport should be
|
|
|
// ObjectCanHaveName. A named object can be opened in more than one
|
|
|
// process.
|
|
|
@@ -301,14 +302,14 @@ namespace CorUnix
|
|
|
NoOwner,
|
|
|
OwnershipNotApplicable
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
private:
|
|
|
|
|
|
//
|
|
|
// Array that maps object type IDs to the corresponding
|
|
|
// CObjectType instance
|
|
|
//
|
|
|
-
|
|
|
+
|
|
|
static CObjectType* s_rgotIdMapping[];
|
|
|
|
|
|
PalObjectTypeId m_eTypeId;
|
|
|
@@ -383,7 +384,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_eTypeId;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
OBJECTCLEANUPROUTINE
|
|
|
GetObjectCleanupRoutine(
|
|
|
void
|
|
|
@@ -391,7 +392,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_pCleanupRoutine;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
OBJECTINITROUTINE
|
|
|
GetObjectInitRoutine(
|
|
|
void
|
|
|
@@ -399,7 +400,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_pInitRoutine;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
DWORD
|
|
|
GetImmutableDataSize(
|
|
|
void
|
|
|
@@ -407,7 +408,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_dwImmutableDataSize;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
DWORD
|
|
|
GetProcessLocalDataSize(
|
|
|
void
|
|
|
@@ -415,7 +416,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_dwProcessLocalDataSize;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
DWORD
|
|
|
GetSharedDataSize(
|
|
|
void
|
|
|
@@ -423,7 +424,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_dwSharedDataSize;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
DWORD
|
|
|
GetSupportedAccessRights(
|
|
|
void
|
|
|
@@ -431,7 +432,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_dwSupportedAccessRights;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
// Generic access rights mapping
|
|
|
|
|
|
SecuritySupport
|
|
|
@@ -441,7 +442,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_eSecuritySupport;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
SecurityPersistence
|
|
|
GetSecurityPersistence(
|
|
|
void
|
|
|
@@ -449,7 +450,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_eSecurityPersistence;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
ObjectNameSupport
|
|
|
GetObjectNameSupport(
|
|
|
void
|
|
|
@@ -457,7 +458,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_eObjectNameSupport;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
HandleDuplicationSupport
|
|
|
GetHandleDuplicationSupport(
|
|
|
void
|
|
|
@@ -465,7 +466,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_eHandleDuplicationSupport;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
SynchronizationSupport
|
|
|
GetSynchronizationSupport(
|
|
|
void
|
|
|
@@ -473,7 +474,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_eSynchronizationSupport;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
SignalingSemantics
|
|
|
GetSignalingSemantics(
|
|
|
void
|
|
|
@@ -481,7 +482,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_eSignalingSemantics;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
ThreadReleaseSemantics
|
|
|
GetThreadReleaseSemantics(
|
|
|
void
|
|
|
@@ -489,7 +490,7 @@ namespace CorUnix
|
|
|
{
|
|
|
return m_eThreadReleaseSemantics;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
OwnershipSemantics
|
|
|
GetOwnershipSemantics(
|
|
|
void
|
|
|
@@ -556,7 +557,7 @@ namespace CorUnix
|
|
|
class CObjectAttributes
|
|
|
{
|
|
|
public:
|
|
|
-
|
|
|
+
|
|
|
CPalString sObjectName;
|
|
|
LPSECURITY_ATTRIBUTES pSecurityAttributes;
|
|
|
|
|
|
@@ -692,7 +693,7 @@ namespace CorUnix
|
|
|
// not possible for the wait to be immediately satisfied.
|
|
|
//
|
|
|
|
|
|
- virtual
|
|
|
+ virtual
|
|
|
PAL_ERROR
|
|
|
CanThreadWaitWithoutBlocking(
|
|
|
bool *pfCanWaitWithoutBlocking, // OUT
|
|
|
@@ -759,7 +760,7 @@ namespace CorUnix
|
|
|
|
|
|
//
|
|
|
// The following two enums are part of the local object
|
|
|
- // optimizations
|
|
|
+ // optimizations
|
|
|
//
|
|
|
|
|
|
enum ObjectDomain
|
|
|
@@ -894,7 +895,7 @@ namespace CorUnix
|
|
|
GetObjectSynchData(
|
|
|
VOID **ppvSynchData // OUT
|
|
|
) = 0;
|
|
|
-
|
|
|
+
|
|
|
};
|
|
|
|
|
|
class IPalProcess
|
|
|
@@ -906,7 +907,7 @@ namespace CorUnix
|
|
|
void
|
|
|
) = 0;
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
class IPalObjectManager
|
|
|
{
|
|
|
public:
|
|
|
@@ -969,7 +970,7 @@ namespace CorUnix
|
|
|
// is needed for the OpenXXX routines and DuplicateHandle.
|
|
|
//
|
|
|
|
|
|
- virtual
|
|
|
+ virtual
|
|
|
PAL_ERROR
|
|
|
LocateObject(
|
|
|
CPalThread *pThread, // IN, OPTIONAL
|
|
|
@@ -987,7 +988,7 @@ namespace CorUnix
|
|
|
//
|
|
|
|
|
|
virtual
|
|
|
- PAL_ERROR
|
|
|
+ PAL_ERROR
|
|
|
ObtainHandleForObject(
|
|
|
CPalThread *pThread, // IN, OPTIONAL
|
|
|
IPalObject *pObject,
|
|
|
@@ -1057,7 +1058,7 @@ namespace CorUnix
|
|
|
DWORD dwRightsRequired,
|
|
|
IPalObject **ppObject // OUT
|
|
|
) = 0;
|
|
|
-
|
|
|
+
|
|
|
};
|
|
|
|
|
|
extern IPalObjectManager *g_pObjectManager;
|
|
|
@@ -1336,11 +1337,11 @@ namespace CorUnix
|
|
|
IFileLockController **ppLockController // OUT
|
|
|
) = 0;
|
|
|
|
|
|
- //
|
|
|
+ //
|
|
|
// Gets the share mode for the file
|
|
|
- // (returns SHARE_MODE_NOT_INITIALIZED if file lock controller
|
|
|
+ // (returns SHARE_MODE_NOT_INITIALIZED if file lock controller
|
|
|
// not found)
|
|
|
- //
|
|
|
+ //
|
|
|
virtual
|
|
|
PAL_ERROR
|
|
|
GetFileShareModeForFile(
|
|
|
@@ -1352,4 +1353,3 @@ namespace CorUnix
|
|
|
}
|
|
|
|
|
|
#endif // _CORUNIX_H
|
|
|
-
|