diff options
Diffstat (limited to 'src/pal/src/include/pal/cs.hpp')
-rw-r--r-- | src/pal/src/include/pal/cs.hpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/pal/src/include/pal/cs.hpp b/src/pal/src/include/pal/cs.hpp new file mode 100644 index 0000000000..76e268566b --- /dev/null +++ b/src/pal/src/include/pal/cs.hpp @@ -0,0 +1,54 @@ +// 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. + +/////////////////////////////////////////////////////////////////////////////// +// +// File: +// cs.cpp +// +// Purpose: +// Header file for critical sections implementation +// + +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _PAL_CS_HPP +#define _PAL_CS_HPP + +#include "corunix.hpp" +#include "critsect.h" + +namespace CorUnix +{ + void CriticalSectionSubSysInitialize(void); + + void InternalInitializeCriticalSectionAndSpinCount( + PCRITICAL_SECTION pCriticalSection, + DWORD dwSpinCount, + bool fInternal); + + void InternalEnterCriticalSection( + CPalThread *pThread, + CRITICAL_SECTION *pcs + ); + + void InternalLeaveCriticalSection( + CPalThread *pThread, + CRITICAL_SECTION *pcs + ); + + bool InternalTryEnterCriticalSection( + CPalThread * pThread, + PCRITICAL_SECTION pCriticalSection); + +#ifdef _DEBUG + void PALCS_ReportStatisticalData(void); + void PALCS_DumpCSList(); +#endif // _DEBUG + +} + +#endif // _PAL_CS_HPP + |