ReactOS 0.4.16-dev-853-g88d9285
locks.cpp
Go to the documentation of this file.
1//
2// locks.cpp
3//
4// Copyright (c) Microsoft Corporation. All rights reserved.
5//
6// Critical sections used for synchronization in the CoreCRT.
7//
8#include <corecrt_internal.h>
9
10
11
12// This table holds the locks used by the CoreCRT. It is indexed using the
13// enumerators of the __acrt_lock_id enumeration.
15
16// This variable stores the number of locks that have been successfully
17// initialized. Locks are initialized in order and are destroyed in reverse
18// order. The startup and exit code must ensure that initialization and
19// destruction is synchronized: these functions should never be executed
20// concurrently.
22
23
24
26{
27 for (unsigned i = 0; i < __acrt_lock_count; ++i)
28 {
30 {
32 return false;
33 }
34
36 }
37
38 return true;
39}
40
41extern "C" bool __cdecl __acrt_uninitialize_locks(bool const /* terminating */)
42{
43 for (unsigned i = __acrt_locks_initialized; i > 0; --i)
44 {
47 }
48
49 return true;
50}
51
52extern "C" void __cdecl __acrt_lock(_In_ __acrt_lock_id _Lock)
53{
55}
56
58{
60}
61
62extern "C" void __cdecl _lock_locales()
63{
66}
67
68extern "C" void __cdecl _unlock_locales()
69{
71}
#define __cdecl
Definition: accygwin.h:79
__acrt_lock_id
@ __acrt_lock_count
@ __acrt_locale_lock
#define _CORECRT_SPINCOUNT
void __cdecl __acrt_eagerly_load_locale_apis(void)
BOOL WINAPI __acrt_InitializeCriticalSectionEx(_Out_ LPCRITICAL_SECTION critical_section, _In_ DWORD spin_count, _In_ DWORD flags)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static unsigned __acrt_locks_initialized
Definition: locks.cpp:21
static CRITICAL_SECTION __acrt_lock_table[__acrt_lock_count]
Definition: locks.cpp:14
void __cdecl _lock_locales()
Definition: locks.cpp:62
bool __cdecl __acrt_initialize_locks()
Definition: locks.cpp:25
void __cdecl _unlock_locales()
Definition: locks.cpp:68
bool __cdecl __acrt_uninitialize_locks(bool const)
Definition: locks.cpp:41
void __cdecl __acrt_lock(_In_ __acrt_lock_id _Lock)
Definition: locks.cpp:52
void __cdecl __acrt_unlock(_In_ __acrt_lock_id _Lock)
Definition: locks.cpp:57
#define _In_
Definition: no_sal2.h:158
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)