created datatype for the denormalized process data block

svn path=/trunk/; revision=2679
This commit is contained in:
KJK::Hyperion 2002-03-07 05:48:35 +00:00
parent b9dbbc8eb8
commit eb3d1a3163

View file

@ -1,4 +1,4 @@
/* $Id: pdata.h,v 1.2 2002/02/20 09:17:55 hyperion Exp $ /* $Id: pdata.h,v 1.3 2002/03/07 05:48:35 hyperion Exp $
*/ */
/* /*
* psx/pdata.h * psx/pdata.h
@ -35,13 +35,46 @@
/* TYPES */ /* TYPES */
typedef struct __tagPDX_PDATA typedef struct __tagPDX_PDATA
{ {
UNICODE_STRING NativePathBuffer; BOOL Spawned; /* TRUE if process has been created through __PdxSpawnPosixProcess() */
UNICODE_STRING CurDir; int ArgCount; /* count of arguments passed to exec() */
UNICODE_STRING RootPath; char **ArgVect; /* array of arguments passed to exesc() */
HANDLE RootHandle; char ***Environment; /* pointer to user-provided environ variable */
__fdtable_t *FdTable; UNICODE_STRING NativePathBuffer; /* static buffer used by low-level calls for pathname conversions */
UNICODE_STRING CurDir; /* current working directory */
UNICODE_STRING RootPath; /* NT path to the process's root directory */
HANDLE RootHandle; /* handle to the process's root directory */
__fdtable_t FdTable; /* file descriptors table */
} __PDX_PDATA, * __PPDX_PDATA; } __PDX_PDATA, * __PPDX_PDATA;
/* serialized process data block, used by __PdxSpawnPosixProcess() and __PdxExecThunk().
The layout of buffers inside the Buffer byte array is as following:
ArgVect[0] + null byte
ArgVect[1] + null byte
...
ArgVect[ArgCount - 1] + null byte
Environment[0] + null byte
Environment[1] + null byte
...
Environment[n - 1] + null byte (NOTE: the value of n is stored in ProcessData.Environment)
CurDir.Buffer
RootPath.Buffer
FdTable.Descriptors[0]
FdTable.Descriptors[1]
...
FdTable.Descriptors[FdTable.AllocatedDescriptors - 1]
FdTable.Descriptors[x].ExtraData
FdTable.Descriptors[y].ExtraData
...
padding for page boundary alignment
*/
typedef struct __tagPDX_SERIALIZED_PDATA
{
__PDX_PDATA ProcessData;
ULONG AllocSize;
BYTE Buffer[1];
} __PDX_SERIALIZED_PDATA, *__PPDX_SERIALIZED_PDATA;
/* CONSTANTS */ /* CONSTANTS */
/* PROTOTYPES */ /* PROTOTYPES */