mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-27 04:52:50 -05:00
dll: major overhaul of FSP_FILE_SYSTEM dispatching
This commit is contained in:
@@ -553,13 +553,15 @@ static FSP_FILE_SYSTEM_INTERFACE MemfsInterface =
|
||||
Rename,
|
||||
};
|
||||
|
||||
static VOID MemfsEnterOperation(FSP_FILE_SYSTEM *FileSystem, FSP_FSCTL_TRANSACT_REQ *Request)
|
||||
static VOID MemfsEnterOperation(FSP_FILE_SYSTEM *FileSystem,
|
||||
FSP_FSCTL_TRANSACT_REQ *Request, FSP_FSCTL_TRANSACT_RSP *Response)
|
||||
{
|
||||
MEMFS *Memfs = (MEMFS *)FileSystem->UserContext;
|
||||
EnterCriticalSection(&Memfs->Lock);
|
||||
}
|
||||
|
||||
static VOID MemfsLeaveOperation(FSP_FILE_SYSTEM *FileSystem, FSP_FSCTL_TRANSACT_REQ *Request)
|
||||
static VOID MemfsLeaveOperation(FSP_FILE_SYSTEM *FileSystem,
|
||||
FSP_FSCTL_TRANSACT_REQ *Request, FSP_FSCTL_TRANSACT_RSP *Response)
|
||||
{
|
||||
MEMFS *Memfs = (MEMFS *)FileSystem->UserContext;
|
||||
LeaveCriticalSection(&Memfs->Lock);
|
||||
@@ -618,11 +620,9 @@ NTSTATUS MemfsCreate(ULONG Flags, ULONG FileInfoTimeout,
|
||||
|
||||
InitializeCriticalSection(&Memfs->Lock);
|
||||
|
||||
if (Flags & MemfsThreadPool)
|
||||
FspFileSystemSetDispatcher(Memfs->FileSystem,
|
||||
FspFileSystemPoolDispatcher,
|
||||
MemfsEnterOperation,
|
||||
MemfsLeaveOperation);
|
||||
FspFileSystemSetOperationGuard(Memfs->FileSystem,
|
||||
MemfsEnterOperation,
|
||||
MemfsLeaveOperation);
|
||||
|
||||
/*
|
||||
* Create root directory.
|
||||
@@ -661,6 +661,16 @@ VOID MemfsDelete(MEMFS *Memfs)
|
||||
free(Memfs);
|
||||
}
|
||||
|
||||
NTSTATUS MemfsStart(MEMFS *Memfs)
|
||||
{
|
||||
return FspFileSystemStartDispatcher(Memfs->FileSystem, 0);
|
||||
}
|
||||
|
||||
VOID MemfsStop(MEMFS *Memfs)
|
||||
{
|
||||
FspFileSystemStopDispatcher(Memfs->FileSystem);
|
||||
}
|
||||
|
||||
FSP_FILE_SYSTEM *MemfsFileSystem(MEMFS *Memfs)
|
||||
{
|
||||
return Memfs->FileSystem;
|
||||
|
Reference in New Issue
Block a user