Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

111 lines
1.4 KiB

/*++
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;
#ifdef ALLOC_PRAGMA
#pragma alloc_text( INIT, MsInitializeData )
#pragma alloc_text( PAGE, MsUninitializeData )
#endif
NTSTATUS
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 = MsAllocateNonPagedPool (sizeof(ERESOURCE), 'gFsM');
if (MsGlobalResource == NULL) {
return STATUS_INSUFFICIENT_RESOURCES;
}
ExInitializeResourceLite ( MsGlobalResource );
return STATUS_SUCCESS;
}
VOID
MsUninitializeData(
VOID
)
/*++
Routine Description:
This function uninitializes all MSFS global data.
Arguments:
None.
Return Value:
None.
--*/
{
ExDeleteResourceLite ( MsGlobalResource );
ExFreePool ( MsGlobalResource );
MsGlobalResource = NULL;
}