2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: services/fs/ms/msfs.h
5 * PURPOSE: Mailslot filesystem
6 * PROGRAMMER: Eric Kohl
9 #ifndef __DRIVERS_FS_MS_MSFS_H
10 #define __DRIVERS_FS_MS_MSFS_H
16 * FIXME: GCC doesn't have a working option for defaulting to a calling
17 * convention. It will always default to cdecl. The MS DDK was designed
18 * for compilers which support this option, and thus some of their headers
19 * do not specify STDCALL or NTAPI everywhere. As such, callbacks will be
20 * interpreted as cdecl on gcc, while they should be stdcall. Defining
21 * NTAPI manually won't work either, since msvc will realize that the
22 * two definitions are different. So we have to use something to close
23 * the compatibility gap, until someone fixes gcc.
28 #define DEFAULTAPI __stdcall
31 typedef struct _MSFS_DEVICE_EXTENSION
33 LIST_ENTRY FcbListHead
;
35 } MSFS_DEVICE_EXTENSION
, *PMSFS_DEVICE_EXTENSION
;
38 typedef struct _MSFS_FCB
40 FSRTL_COMMON_FCB_HEADER RFCB
;
42 LIST_ENTRY FcbListEntry
;
43 KSPIN_LOCK CcbListLock
;
44 LIST_ENTRY CcbListHead
;
45 struct _MSFS_CCB
*ServerCcb
;
47 LARGE_INTEGER TimeOut
;
51 KSPIN_LOCK MessageListLock
;
52 LIST_ENTRY MessageListHead
;
53 } MSFS_FCB
, *PMSFS_FCB
;
56 typedef struct _MSFS_CCB
58 LIST_ENTRY CcbListEntry
;
60 } MSFS_CCB
, *PMSFS_CCB
;
63 typedef struct _MSFS_MESSAGE
65 LIST_ENTRY MessageListEntry
;
68 } MSFS_MESSAGE
, *PMSFS_MESSAGE
;
71 #define KeLockMutex(x) KeWaitForSingleObject(x, \
77 #define KeUnlockMutex(x) KeReleaseMutex(x, FALSE);
79 DRIVER_DISPATCH MsfsCreate
;
80 NTSTATUS DEFAULTAPI
MsfsCreate(PDEVICE_OBJECT DeviceObject
, PIRP Irp
);
82 DRIVER_DISPATCH MsfsCreateMailslot
;
83 NTSTATUS DEFAULTAPI
MsfsCreateMailslot(PDEVICE_OBJECT DeviceObject
, PIRP Irp
);
85 DRIVER_DISPATCH MsfsClose
;
86 NTSTATUS DEFAULTAPI
MsfsClose(PDEVICE_OBJECT DeviceObject
, PIRP Irp
);
88 DRIVER_DISPATCH MsfsQueryInformation
;
89 NTSTATUS DEFAULTAPI
MsfsQueryInformation(PDEVICE_OBJECT DeviceObject
, PIRP Irp
);
91 DRIVER_DISPATCH MsfsSetInformation
;
92 NTSTATUS DEFAULTAPI
MsfsSetInformation(PDEVICE_OBJECT DeviceObject
, PIRP Irp
);
94 DRIVER_DISPATCH MsfsRead
;
95 NTSTATUS DEFAULTAPI
MsfsRead(PDEVICE_OBJECT DeviceObject
, PIRP Irp
);
97 DRIVER_DISPATCH MsfsWrite
;
98 NTSTATUS DEFAULTAPI
MsfsWrite(PDEVICE_OBJECT DeviceObject
, PIRP Irp
);
100 DRIVER_DISPATCH MsfsFileSystemControl
;
101 NTSTATUS DEFAULTAPI
MsfsFileSystemControl(PDEVICE_OBJECT DeviceObject
, PIRP Irp
);
104 DriverEntry(PDRIVER_OBJECT DriverObject
,
105 PUNICODE_STRING RegistryPath
);
107 #endif /* __DRIVERS_FS_MS_MSFS_H */