ReactOS 0.4.16-dev-329-g9223134
mtdll.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _SIGNAL_LOCK   1
 
#define _IOB_SCAN_LOCK   2
 
#define _TMPNAM_LOCK   3
 
#define _INPUT_LOCK   4
 
#define _OUTPUT_LOCK   5
 
#define _CSCANF_LOCK   6
 
#define _CPRINTF_LOCK   7
 
#define _CONIO_LOCK   8
 
#define _HEAP_LOCK   9
 
#define _BHEAP_LOCK   10 /* No longer used? */
 
#define _TIME_LOCK   11
 
#define _ENV_LOCK   12
 
#define _EXIT_LOCK1   13
 
#define _EXIT_LOCK2   14
 
#define _THREADDATA_LOCK   15 /* No longer used? */
 
#define _POPEN_LOCK   16
 
#define _LOCKTAB_LOCK   17
 
#define _OSFHND_LOCK   18
 
#define _SETLOCALE_LOCK   19
 
#define _LC_COLLATE_LOCK   20 /* No longer used? */
 
#define _LC_CTYPE_LOCK   21 /* No longer used? */
 
#define _LC_MONETARY_LOCK   22 /* No longer used? */
 
#define _LC_NUMERIC_LOCK   23 /* No longer used? */
 
#define _LC_TIME_LOCK   24 /* No longer used? */
 
#define _MB_CP_LOCK   25
 
#define _NLG_LOCK   26
 
#define _TYPEINFO_LOCK   27
 
#define _STREAM_LOCKS   28
 
#define _IOB_ENTRIES   20
 
#define _LAST_STREAM_LOCK   (_STREAM_LOCKS+_IOB_ENTRIES-1)
 
#define _TOTAL_LOCKS   (_LAST_STREAM_LOCK+1)
 

Functions

void __cdecl _unlock (int locknum)
 
void __cdecl _lock (int locknum)
 

Macro Definition Documentation

◆ _BHEAP_LOCK

#define _BHEAP_LOCK   10 /* No longer used? */

Definition at line 34 of file mtdll.h.

◆ _CONIO_LOCK

#define _CONIO_LOCK   8

Definition at line 32 of file mtdll.h.

◆ _CPRINTF_LOCK

#define _CPRINTF_LOCK   7

Definition at line 31 of file mtdll.h.

◆ _CSCANF_LOCK

#define _CSCANF_LOCK   6

Definition at line 30 of file mtdll.h.

◆ _ENV_LOCK

#define _ENV_LOCK   12

Definition at line 36 of file mtdll.h.

◆ _EXIT_LOCK1

#define _EXIT_LOCK1   13

Definition at line 37 of file mtdll.h.

◆ _EXIT_LOCK2

#define _EXIT_LOCK2   14

Definition at line 38 of file mtdll.h.

◆ _HEAP_LOCK

#define _HEAP_LOCK   9

Definition at line 33 of file mtdll.h.

◆ _INPUT_LOCK

#define _INPUT_LOCK   4

Definition at line 28 of file mtdll.h.

◆ _IOB_ENTRIES

#define _IOB_ENTRIES   20

Definition at line 55 of file mtdll.h.

◆ _IOB_SCAN_LOCK

#define _IOB_SCAN_LOCK   2

Definition at line 26 of file mtdll.h.

◆ _LAST_STREAM_LOCK

#define _LAST_STREAM_LOCK   (_STREAM_LOCKS+_IOB_ENTRIES-1)

Definition at line 57 of file mtdll.h.

◆ _LC_COLLATE_LOCK

#define _LC_COLLATE_LOCK   20 /* No longer used? */

Definition at line 44 of file mtdll.h.

◆ _LC_CTYPE_LOCK

#define _LC_CTYPE_LOCK   21 /* No longer used? */

Definition at line 45 of file mtdll.h.

◆ _LC_MONETARY_LOCK

#define _LC_MONETARY_LOCK   22 /* No longer used? */

Definition at line 46 of file mtdll.h.

◆ _LC_NUMERIC_LOCK

#define _LC_NUMERIC_LOCK   23 /* No longer used? */

Definition at line 47 of file mtdll.h.

◆ _LC_TIME_LOCK

#define _LC_TIME_LOCK   24 /* No longer used? */

Definition at line 48 of file mtdll.h.

◆ _LOCKTAB_LOCK

#define _LOCKTAB_LOCK   17

Definition at line 41 of file mtdll.h.

◆ _MB_CP_LOCK

#define _MB_CP_LOCK   25

Definition at line 49 of file mtdll.h.

◆ _NLG_LOCK

#define _NLG_LOCK   26

Definition at line 50 of file mtdll.h.

◆ _OSFHND_LOCK

#define _OSFHND_LOCK   18

Definition at line 42 of file mtdll.h.

◆ _OUTPUT_LOCK

#define _OUTPUT_LOCK   5

Definition at line 29 of file mtdll.h.

◆ _POPEN_LOCK

#define _POPEN_LOCK   16

Definition at line 40 of file mtdll.h.

◆ _SETLOCALE_LOCK

#define _SETLOCALE_LOCK   19

Definition at line 43 of file mtdll.h.

◆ _SIGNAL_LOCK

#define _SIGNAL_LOCK   1

Definition at line 25 of file mtdll.h.

◆ _STREAM_LOCKS

#define _STREAM_LOCKS   28

Definition at line 52 of file mtdll.h.

◆ _THREADDATA_LOCK

#define _THREADDATA_LOCK   15 /* No longer used? */

Definition at line 39 of file mtdll.h.

◆ _TIME_LOCK

#define _TIME_LOCK   11

Definition at line 35 of file mtdll.h.

◆ _TMPNAM_LOCK

#define _TMPNAM_LOCK   3

Definition at line 27 of file mtdll.h.

◆ _TOTAL_LOCKS

#define _TOTAL_LOCKS   (_LAST_STREAM_LOCK+1)

Definition at line 59 of file mtdll.h.

◆ _TYPEINFO_LOCK

#define _TYPEINFO_LOCK   27

Definition at line 51 of file mtdll.h.

Function Documentation

◆ _lock()

void __cdecl _lock ( int  locknum)

Definition at line 97 of file lock.c.

98{
99 TRACE( "(%d)\n", locknum );
100
101 /* If the lock doesn't exist yet, create it */
102 if( lock_table[ locknum ].bInit == FALSE )
103 {
104 /* Lock while we're changing the lock table */
106
107 /* Check again if we've got a bit of a race on lock creation */
108 if( lock_table[ locknum ].bInit == FALSE )
109 {
110 TRACE( ": creating lock #%d\n", locknum );
111 msvcrt_initialize_mlock( locknum );
112 }
113
114 /* Unlock ourselves */
116 }
117
118 EnterCriticalSection( &(lock_table[ locknum ].crit) );
119}
#define FALSE
Definition: types.h:117
#define _LOCKTAB_LOCK
Definition: mtdll.h:54
static __inline void msvcrt_initialize_mlock(int locknum)
Definition: lock.c:35
static LOCKTABLEENTRY lock_table[_TOTAL_LOCKS]
Definition: lock.c:28
void _unlock(int locknum)
Definition: lock.c:126
void _lock(int locknum)
Definition: lock.c:97
#define TRACE(s)
Definition: solgame.cpp:4
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by _lock(), and _lock_file().

◆ _unlock()

void __cdecl _unlock ( int  locknum)

Definition at line 126 of file lock.c.

127{
128 TRACE( "(%d)\n", locknum );
129
130 LeaveCriticalSection( &(lock_table[ locknum ].crit) );
131}
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

Referenced by _lock(), and _unlock_file().