diff --git a/reactos/include/ddk/exfuncs.h b/reactos/include/ddk/exfuncs.h index f4e31bea7e8..af12a353ddf 100644 --- a/reactos/include/ddk/exfuncs.h +++ b/reactos/include/ddk/exfuncs.h @@ -3,12 +3,30 @@ /* EXECUTIVE ROUTINES ******************************************************/ -VOID ExReleaseResourceLite(PERESOURCE Resource); -VOID ExAcquireFastMutex (PFAST_MUTEX FastMutex); -VOID ExAcquireFastMutexUnsafe (PFAST_MUTEX FastMutex); -BOOLEAN ExAcquireResourceExclusive (PERESOURCE Resource, BOOLEAN Wait); -BOOLEAN ExAcquireResourceExclusiveLite (PERESOURCE Resource, BOOLEAN Wait); -BOOLEAN ExAcquireResourceSharedLite ( +VOID +ExReleaseResourceLite ( + PERESOURCE Resource + ); +VOID +ExAcquireFastMutex ( + PFAST_MUTEX FastMutex + ); +VOID +ExAcquireFastMutexUnsafe ( + PFAST_MUTEX FastMutex + ); +BOOLEAN +ExAcquireResourceExclusive ( + PERESOURCE Resource, + BOOLEAN Wait + ); +BOOLEAN +ExAcquireResourceExclusiveLite ( + PERESOURCE Resource, + BOOLEAN Wait + ); +BOOLEAN +ExAcquireResourceSharedLite ( PERESOURCE Resource, BOOLEAN Wait ); @@ -34,37 +52,40 @@ PVOID ExAllocateFromZone ( PZONE_HEADER Zone ); - /* * FUNCTION: Allocates memory from the nonpaged pool * ARGUMENTS: - * size = minimum size of the block to be allocated + * NumberOfBytes = minimum size of the block to be allocated * PoolType = the type of memory to use for the block (ignored) * RETURNS: * the address of the block if it succeeds */ PVOID +STDCALL ExAllocatePool ( - POOL_TYPE PoolType, - ULONG size + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes ); PVOID +STDCALL ExAllocatePoolWithQuota ( - POOL_TYPE PoolType, - ULONG NumberOfBytes + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes ); PVOID +STDCALL ExAllocatePoolWithQuotaTag ( - POOL_TYPE PoolType, - ULONG NumberOfBytes, - ULONG Tag + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes, + IN ULONG Tag ); PVOID +STDCALL ExAllocatePoolWithTag ( - POOL_TYPE PoolType, - ULONG NumberOfBytes, - ULONG Tag + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes, + IN ULONG Tag ); VOID ExConvertExclusiveToSharedLite ( diff --git a/reactos/include/ddk/fsfuncs.h b/reactos/include/ddk/fsfuncs.h index 5cb4ffd7f54..fb4f0b66573 100644 --- a/reactos/include/ddk/fsfuncs.h +++ b/reactos/include/ddk/fsfuncs.h @@ -1,6 +1,6 @@ #ifndef __INCLUDE_DDK_FSFUNCS_H #define __INCLUDE_DDK_FSFUNCS_H -/* $Id: fsfuncs.h,v 1.6 2000/02/26 16:21:34 ea Exp $ */ +/* $Id: fsfuncs.h,v 1.7 2000/03/01 22:52:25 ea Exp $ */ VOID STDCALL FsRtlAddLargeMcbEntry ( @@ -20,6 +20,32 @@ FsRtlAddMcbEntry ( DWORD Unknown2, DWORD Unknown3 ); +PVOID +STDCALL +FsRtlAllocatePool ( + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes + ); +PVOID +STDCALL +FsRtlAllocatePoolWithQuota ( + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes + ); +PVOID +STDCALL +FsRtlAllocatePoolWithQuotaTag ( + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes, + IN ULONG Tag + ); +PVOID +STDCALL +FsRtlAllocatePoolWithTag ( + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes, + IN ULONG Tag + ); DWORD STDCALL FsRtlAllocateResource ( diff --git a/reactos/include/ddk/ntddk.h b/reactos/include/ddk/ntddk.h index 996bfdd9298..1e0fcfadf31 100644 --- a/reactos/include/ddk/ntddk.h +++ b/reactos/include/ddk/ntddk.h @@ -1,4 +1,5 @@ -/* +/* $Id: ntddk.h,v 1.13 2000/03/01 22:52:25 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: include/ddk/ntddk.h diff --git a/reactos/include/internal/ifs.h b/reactos/include/internal/ifs.h new file mode 100644 index 00000000000..45370e4a289 --- /dev/null +++ b/reactos/include/internal/ifs.h @@ -0,0 +1,8 @@ +#ifndef __INCLUDE_INTERNAL_IFS_H +#define __INCLUDE_INTERNAL_IFS_H +/* $Id: ifs.h,v 1.1 2000/03/01 22:52:27 ea Exp $ */ + +/* Look for "FSrt" in mem view */ +#define IFS_POOL_TAG 0x74725346 + +#endif diff --git a/reactos/include/internal/pool.h b/reactos/include/internal/pool.h index f1018cb2ad8..e3b7da588e8 100644 --- a/reactos/include/internal/pool.h +++ b/reactos/include/internal/pool.h @@ -3,10 +3,20 @@ #include -PVOID ExAllocateNonPagedPoolWithTag(ULONG type, - ULONG size, - ULONG Tag, - PVOID Caller); -PVOID ExAllocatePagedPoolWithTag(POOL_TYPE Type, ULONG size, ULONG Tag); +PVOID +__stdcall +ExAllocateNonPagedPoolWithTag ( + POOL_TYPE type, + ULONG size, + ULONG Tag, + PVOID Caller + ); +PVOID +__stdcall +ExAllocatePagedPoolWithTag ( + POOL_TYPE Type, + ULONG size, + ULONG Tag + ); #endif /* __INTERNAL_POOL_H */ diff --git a/reactos/ntoskrnl/fs/pool.c b/reactos/ntoskrnl/fs/pool.c new file mode 100644 index 00000000000..48149e97c3c --- /dev/null +++ b/reactos/ntoskrnl/fs/pool.c @@ -0,0 +1,151 @@ +/* $Id: pool.c,v 1.1 2000/03/01 22:52:27 ea Exp $ + * + * reactos/ntoskrnl/fs/pool.c + * + */ +#include +#include +#include + + +/********************************************************************** + * NAME EXPORTED + * FsRtlAllocatePool@8 + * + * DESCRIPTION + * + * ARGUMENTS + * + * RETURN VALUE + * + * NOTE + * IFS_POOL_TAG is "FSrt" in mem view. + * + */ +PVOID +STDCALL +FsRtlAllocatePool ( + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes + ) +{ + PVOID Address; + + Address = ExAllocatePoolWithTag ( + PoolType, + NumberOfBytes, + IFS_POOL_TAG + ); + if (NULL == Address) + { + ExRaiseStatus (STATUS_INSUFFICIENT_RESOURCES); + } + return Address; +} + + +/********************************************************************** + * NAME EXPORTED + * FsRtlAllocatePoolWithQuota@8 + * + * DESCRIPTION + * + * ARGUMENTS + * + * RETURN VALUE + * + * NOTE + * IFS_POOL_TAG is "FSrt" in mem view. + */ +PVOID +STDCALL +FsRtlAllocatePoolWithQuota ( + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes + ) +{ + PVOID Address; + + Address = ExAllocatePoolWithQuotaTag ( + PoolType, + NumberOfBytes, + IFS_POOL_TAG + ); + if (NULL == Address) + { + ExRaiseStatus (STATUS_INSUFFICIENT_RESOURCES); + } + return Address; +} + + +/********************************************************************** + * NAME EXPORTED + * FsRtlAllocatePoolWithQuotaTag@12 + * + * DESCRIPTION + * + * ARGUMENTS + * + * RETURN VALUE + * + */ +PVOID +STDCALL +FsRtlAllocatePoolWithQuotaTag ( + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes, + IN ULONG Tag + ) +{ + PVOID Address; + + Address = ExAllocatePoolWithQuotaTag ( + PoolType, + NumberOfBytes, + Tag + ); + if (NULL == Address) + { + ExRaiseStatus (STATUS_INSUFFICIENT_RESOURCES); + } + return Address; +} + + +/********************************************************************** + * NAME EXPORTED + * FsRtlAllocatePoolWithTag@12 + * + * DESCRIPTION + * + * ARGUMENTS + * + * RETURN VALUE + * + */ +PVOID +STDCALL +FsRtlAllocatePoolWithTag ( + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes, + IN ULONG Tag + ) +{ + PVOID Address; + + Address = ExAllocatePoolWithTag ( + PoolType, + NumberOfBytes, + Tag + ); + if (NULL == Address) + { + ExRaiseStatus (STATUS_INSUFFICIENT_RESOURCES); + } + return Address; +} + + + +/* EOF */ diff --git a/reactos/ntoskrnl/makefile_rex b/reactos/ntoskrnl/makefile_rex index a3fdbb00c6a..98828385739 100644 --- a/reactos/ntoskrnl/makefile_rex +++ b/reactos/ntoskrnl/makefile_rex @@ -1,4 +1,4 @@ -# $Id: makefile_rex,v 1.54 2000/02/26 16:22:27 ea Exp $ +# $Id: makefile_rex,v 1.55 2000/03/01 22:52:27 ea Exp $ # # ReactOS Operating System # @@ -57,7 +57,7 @@ EX_OBJECTS = ex/work.o ex/fmutex.o ex/resource.o ex/time.o ex/interlck.o \ ex/stamp.o ex/init.o FS_OBJECTS = fs/dbcsname.o fs/name.o fs/mcb.o fs/unc.o fs/util.o \ - fs/filelock.o + fs/filelock.o fs/pool.o SE_OBJECTS = se/semgr.o se/acl.o se/sid.o se/sd.o se/token.o se/luid.o \ se/priv.o diff --git a/reactos/ntoskrnl/mm/npool.c b/reactos/ntoskrnl/mm/npool.c index b56d181240a..eb193273353 100644 --- a/reactos/ntoskrnl/mm/npool.c +++ b/reactos/ntoskrnl/mm/npool.c @@ -1,4 +1,5 @@ -/* +/* $Id: npool.c,v 1.26 2000/03/01 22:52:28 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/pool.c @@ -23,6 +24,7 @@ #include #include #include +#include #define NDEBUG #include @@ -625,7 +627,7 @@ asmlinkage VOID ExFreePool(PVOID block) KeReleaseSpinLock(&MmNpoolLock, oldIrql); } -PVOID ExAllocateNonPagedPoolWithTag(ULONG type, +PVOID STDCALL ExAllocateNonPagedPoolWithTag(ULONG type, ULONG size, ULONG Tag, PVOID Caller) @@ -697,3 +699,5 @@ PVOID ExAllocateNonPagedPoolWithTag(ULONG type, return(block); } + +/* EOF */ diff --git a/reactos/ntoskrnl/mm/pool.c b/reactos/ntoskrnl/mm/pool.c index 3a905da7177..fb76b72adf8 100644 --- a/reactos/ntoskrnl/mm/pool.c +++ b/reactos/ntoskrnl/mm/pool.c @@ -1,4 +1,5 @@ -/* +/* $Id: pool.c,v 1.10 2000/03/01 22:52:28 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/pool.c @@ -21,7 +22,9 @@ /* FUNCTIONS ***************************************************************/ -PVOID ExAllocatePool(POOL_TYPE PoolType, ULONG NumberOfBytes) +PVOID +STDCALL +ExAllocatePool (POOL_TYPE PoolType, ULONG NumberOfBytes) /* * FUNCTION: Allocates pool memory of a specified type and returns a pointer * to the allocated block. This routine is used for general purpose allocation @@ -52,7 +55,10 @@ PVOID ExAllocatePool(POOL_TYPE PoolType, ULONG NumberOfBytes) return(Block); } -PVOID ExAllocatePoolWithTag(ULONG PoolType, ULONG NumberOfBytes, ULONG Tag) + +PVOID +STDCALL +ExAllocatePoolWithTag (ULONG PoolType, ULONG NumberOfBytes, ULONG Tag) { PVOID Block; @@ -90,9 +96,35 @@ PVOID ExAllocatePoolWithTag(ULONG PoolType, ULONG NumberOfBytes, ULONG Tag) } return(Block); } - -PVOID ExAllocatePoolWithQuota(POOL_TYPE PoolType, ULONG NumberOfBytes) + + +PVOID +STDCALL +ExAllocatePoolWithQuota (POOL_TYPE PoolType, ULONG NumberOfBytes) { // return(ExAllocatePoolWithQuotaTag(PoolType,NumberOfBytes,TAG_NONE)); - UNIMPLEMENTED; + UNIMPLEMENTED; } + + +PVOID +STDCALL +ExAllocatePoolWithQuotaTag ( + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes, + IN ULONG Tag + ) +{ + PVOID Address = NULL; + + UNIMPLEMENTED; /* FIXME */ + + if (NULL == Address) + { + ExRaiseStatus (STATUS_INSUFFICIENT_RESOURCES); + } + return Address; +} + + +/* EOF */ diff --git a/reactos/ntoskrnl/mm/ppool.c b/reactos/ntoskrnl/mm/ppool.c index e53ecc848c3..b7c258fbce8 100644 --- a/reactos/ntoskrnl/mm/ppool.c +++ b/reactos/ntoskrnl/mm/ppool.c @@ -1,4 +1,5 @@ -/* +/* $Id: ppool.c,v 1.2 2000/03/01 22:52:28 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/ppool.c @@ -17,7 +18,35 @@ /* FUNCTIONS *****************************************************************/ -PVOID ExAllocatePagedPoolWithTag(ULONG type, ULONG size, ULONG Tag) + +/********************************************************************** + * NAME INTERNAL + * ExAllocatePagedPoolWithTag@12 + * + * DESCRIPTION + * + * ARGUMENTS + * + * RETURN VALUE + */ +PVOID +STDCALL +ExAllocatePagedPoolWithTag ( + IN POOL_TYPE PoolType, + IN ULONG NumberOfBytes, + IN ULONG Tag + ) { - UNIMPLEMENTED; + PVOID Address = NULL; + + UNIMPLEMENTED; /* FIXME: */ + + if (NULL == Address) + { + ExRaiseStatus (STATUS_INSUFFICIENT_RESOURCES); + } + return Address; } + + +/* EOF */ diff --git a/reactos/ntoskrnl/ntoskrnl.def b/reactos/ntoskrnl/ntoskrnl.def index 12a5f06a67d..c6ec1bddc69 100644 --- a/reactos/ntoskrnl/ntoskrnl.def +++ b/reactos/ntoskrnl/ntoskrnl.def @@ -1,4 +1,4 @@ -; $Id: ntoskrnl.def,v 1.47 2000/02/27 02:08:12 ekohl Exp $ +; $Id: ntoskrnl.def,v 1.48 2000/03/01 22:52:27 ea Exp $ ; ; reactos/ntoskrnl/ntoskrnl.def ; @@ -19,10 +19,10 @@ ExAcquireSharedWaitForExclusive ExAllocateFromNPagedLookasideList ExAllocateFromPagedLookasideList ExAllocateFromZone -ExAllocatePool -ExAllocatePoolWithQuota -;ExAllocatePoolWithQuotaTag -ExAllocatePoolWithTag +ExAllocatePool@8 +ExAllocatePoolWithQuota@8 +ExAllocatePoolWithQuotaTag@12 +ExAllocatePoolWithTag@12 ExConvertExclusiveToSharedLite ExDeleteNPagedLookasideList ExDeletePagedLookasideList @@ -77,6 +77,10 @@ ExSystemTimeToLocalTime ExTryToAcquireResourceExclusiveLite FsRtlAddLargeMcbEntry@28 FsRtlAddMcbEntry@16 +FsRtlAllocatePool@8 +FsRtlAllocatePoolWithQuota@8 +FsRtlAllocatePoolWithQuotaTag@12 +FsRtlAllocatePoolWithTag@12 FsRtlAllocateResource@0 FsRtlAreNamesEqual@16 FsRtlBalanceReads@4 diff --git a/reactos/ntoskrnl/ntoskrnl.edf b/reactos/ntoskrnl/ntoskrnl.edf index 2e76a8a4447..f1764b4b396 100644 --- a/reactos/ntoskrnl/ntoskrnl.edf +++ b/reactos/ntoskrnl/ntoskrnl.edf @@ -1,4 +1,4 @@ -; $Id: ntoskrnl.edf,v 1.34 2000/02/27 02:08:12 ekohl Exp $ +; $Id: ntoskrnl.edf,v 1.35 2000/03/01 22:52:27 ea Exp $ ; ; reactos/ntoskrnl/ntoskrnl.def ; @@ -19,10 +19,10 @@ ExAcquireSharedWaitForExclusive ExAllocateFromNPagedLookasideList ExAllocateFromPagedLookasideList ExAllocateFromZone -ExAllocatePool -ExAllocatePoolWithQuota -;ExAllocatePoolWithQuotaTag -ExAllocatePoolWithTag +ExAllocatePool=ExAllocatePool@8 +ExAllocatePoolWithQuota=ExAllocatePoolWithQuota@8 +ExAllocatePoolWithQuotaTag=ExAllocatePoolWithQuotaTag@12 +ExAllocatePoolWithTag=ExAllocatePoolWithTag@12 ExConvertExclusiveToSharedLite ExDeleteNPagedLookasideList ExDeletePagedLookasideList @@ -77,6 +77,10 @@ ExSystemTimeToLocalTime ExTryToAcquireResourceExclusiveLite FsRtlAddLargeMcbEntry=FsRtlAddLargeMcbEntry@28 FsRtlAddMcbEntry=FsRtlAddMcbEntry@16 +FsRtlAllocatePool=FsRtlAllocatePool@8 +FsRtlAllocatePoolWithQuota=FsRtlAllocatePoolWithQuota@8 +FsRtlAllocatePoolWithQuotaTag=FsRtlAllocatePoolWithQuotaTag@12 +FsRtlAllocatePoolWithTag=FsRtlAllocatePoolWithTag@12 FsRtlAllocateResource=FsRtlAllocateResource@0 FsRtlAreNamesEqual=FsRtlAreNamesEqual@16 FsRtlBalanceReads=FsRtlBalanceReads@4