4 modified files
reactos/ntoskrnl/include/internal
diff -u -r1.67 -r1.68
--- ps.h 22 Sep 2004 14:53:26 -0000 1.67
+++ ps.h 22 Sep 2004 22:31:46 -0000 1.68
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: ps.h,v 1.67 2004/09/22 14:53:26 weiden Exp $
+/* $Id: ps.h,v 1.68 2004/09/22 22:31:46 weiden Exp $
*
* FILE: ntoskrnl/ke/kthread.c
* PURPOSE: Process manager definitions
@@ -641,6 +641,8 @@
} EJOB;
#include <poppack.h>
+VOID INIT_FUNCTION PsInitJobManagment(VOID);
+
#endif /* ASSEMBLER */
#endif /* __INCLUDE_INTERNAL_PS_H */
reactos/ntoskrnl
diff -u -r1.191 -r1.192
--- ntoskrnl.def 16 Sep 2004 11:46:17 -0000 1.191
+++ ntoskrnl.def 22 Sep 2004 22:31:46 -0000 1.192
@@ -1,4 +1,4 @@
-; $Id: ntoskrnl.def,v 1.191 2004/09/16 11:46:17 ekohl Exp $
+; $Id: ntoskrnl.def,v 1.192 2004/09/22 22:31:46 weiden Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@@ -920,7 +920,7 @@
PsIsSystemThread@4
PsIsThreadImpersonating@4
PsIsThreadTerminating@4
-;PsJobType DATA
+PsJobType DATA
PsLookupProcessByProcessId@8
PsLookupProcessThreadByCid@12
PsLookupThreadByThreadId@8
reactos/ntoskrnl/ps
diff -u -r1.4 -r1.5
--- job.c 22 Sep 2004 14:53:26 -0000 1.4
+++ job.c 22 Sep 2004 22:31:46 -0000 1.5
@@ -14,8 +14,63 @@
#include <ntoskrnl.h>
#include <internal/debug.h>
+/* GLOBALS *******************************************************************/
+
+POBJECT_TYPE EXPORTED PsJobType = NULL;
+
+LIST_ENTRY PsJobListHead;
+static KSPIN_LOCK PsJobListLock;
+
+static GENERIC_MAPPING PiJobMapping = {PROCESS_READ,
+ PROCESS_WRITE,
+ PROCESS_EXECUTE,
+ PROCESS_ALL_ACCESS};
+
/* FUNCTIONS *****************************************************************/
+VOID STDCALL
+PiDeleteJob(PVOID ObjectBody)
+{
+ KIRQL oldIrql;
+ PEJOB Job = (PEJOB)ObjectBody;
+
+ KeAcquireSpinLock(&PsJobListLock, &oldIrql);
+ RemoveEntryList(&Job->JobLinks);
+ KeReleaseSpinLock(&PsJobListLock, oldIrql);
+}
+
+VOID INIT_FUNCTION
+PsInitJobManagment(VOID)
+{
+ PsJobType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE));
+
+ PsJobType->Tag = TAG('E', 'J', 'O', 'B');
+ PsJobType->TotalObjects = 0;
+ PsJobType->TotalHandles = 0;
+ PsJobType->MaxObjects = ULONG_MAX;
+ PsJobType->MaxHandles = ULONG_MAX;
+ PsJobType->PagedPoolCharge = 0;
+ PsJobType->NonpagedPoolCharge = sizeof(EJOB);
+ PsJobType->Mapping = &PiJobMapping;
+ PsJobType->Dump = NULL;
+ PsJobType->Open = NULL;
+ PsJobType->Close = NULL;
+ PsJobType->Delete = PiDeleteJob;
+ PsJobType->Parse = NULL;
+ PsJobType->Security = NULL;
+ PsJobType->QueryName = NULL;
+ PsJobType->OkayToClose = NULL;
+ PsJobType->Create = NULL;
+ PsJobType->DuplicationNotify = NULL;
+
+ RtlRosInitUnicodeStringFromLiteral(&PsJobType->TypeName, L"Job");
+
+ ObpCreateTypeObject(PsJobType);
+
+ InitializeListHead(&PsJobListHead);
+ KeInitializeSpinLock(&PsJobListLock);
+}
+
/*
* @unimplemented
*/
reactos/ntoskrnl/ps
diff -u -r1.21 -r1.22
--- psmgr.c 15 Aug 2004 16:39:10 -0000 1.21
+++ psmgr.c 22 Sep 2004 22:31:46 -0000 1.22
@@ -1,4 +1,4 @@
-/* $Id: psmgr.c,v 1.21 2004/08/15 16:39:10 chorns Exp $
+/* $Id: psmgr.c,v 1.22 2004/09/22 22:31:46 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -25,6 +25,7 @@
VOID INIT_FUNCTION
PiInitProcessManager(VOID)
{
+ PsInitJobManagment();
PsInitProcessManagment();
PsInitThreadManagment();
PsInitIdleThread();
CVSspam 0.2.8