diff options
Diffstat (limited to 'src/pal/src/include/pal/corunix.inl')
-rw-r--r-- | src/pal/src/include/pal/corunix.inl | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/pal/src/include/pal/corunix.inl b/src/pal/src/include/pal/corunix.inl new file mode 100644 index 0000000000..ab0ac70462 --- /dev/null +++ b/src/pal/src/include/pal/corunix.inl @@ -0,0 +1,55 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +/*++ + + + +Module Name: + + + +--*/ + +#ifndef _CORUNIX_INL +#define _CORUNIX_INL + +#include "corunix.hpp" +#include "dbgmsg.h" + +namespace CorUnix +{ + + bool CAllowedObjectTypes::IsTypeAllowed(PalObjectTypeId eTypeId) + { + _ASSERTE(eTypeId != ObjectTypeIdCount); + return m_rgfAllowedTypes[eTypeId]; + }; + + CAllowedObjectTypes::CAllowedObjectTypes( + PalObjectTypeId rgAllowedTypes[], + DWORD dwAllowedTypeCount + ) + { + ZeroMemory(m_rgfAllowedTypes, sizeof(m_rgfAllowedTypes)); + for (DWORD dw = 0; dw < dwAllowedTypeCount; dw += 1) + { + _ASSERTE(rgAllowedTypes[dw] != ObjectTypeIdCount); + m_rgfAllowedTypes[rgAllowedTypes[dw]] = TRUE; + } + }; + + CAllowedObjectTypes::CAllowedObjectTypes( + PalObjectTypeId eAllowedType + ) + { + ZeroMemory(m_rgfAllowedTypes, sizeof(m_rgfAllowedTypes)); + + _ASSERTE(eAllowedType != ObjectTypeIdCount); + m_rgfAllowedTypes[eAllowedType] = TRUE; + }; +} + +#endif // _CORUNIX_H + |