blob: 56d158fe80e420507d1a53a8662551b020537774 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
/*++
Copyright (c) 1989 Microsoft Corporation
Module Name:
msdata.c
Abstract:
This module declares the global variable used by the mailslot
file system.
Author:
Manny Weiser (mannyw) 7-Jan-1991
Revision History:
--*/
#include "mailslot.h"
#ifdef MSDBG
//
// Debugging variables
//
LONG MsDebugTraceLevel;
LONG MsDebugTraceIndent;
#endif
//
// This lock protects access to reference counts.
//
PERESOURCE MsGlobalResource;
//
// This lock protects access to mailslot prefix table
//
PERESOURCE MsPrefixTableResource;
//
// This lock protects access to the per FCB, CCB list
//
PERESOURCE MsCcbListResource;
#ifdef ALLOC_PRAGMA
#pragma alloc_text( PAGE, MsInitializeData )
#endif
VOID
MsInitializeData(
VOID
)
/*++
Routine Description:
This function initializes all MSFS global data.
Arguments:
None.
Return Value:
None.
--*/
{
PAGED_CODE();
#ifdef MSDBG
MsDebugTraceLevel = 0;
MsDebugTraceIndent = 0;
#endif
MsGlobalResource = FsRtlAllocatePoolWithTag (NonPagedPoolMustSucceed,
sizeof(ERESOURCE) * 3,
'sFsM');
MsPrefixTableResource = MsGlobalResource + 1;
MsCcbListResource = MsGlobalResource + 2;
ExInitializeResource ( MsGlobalResource );
ExInitializeResource ( MsPrefixTableResource );
ExInitializeResource ( MsCcbListResource );
}
|