update for HEAD-2003091401
[reactos.git] / ntoskrnl / ps / psmgr.c
1 /* $Id$
2  *
3  * COPYRIGHT:               See COPYING in the top level directory
4  * PROJECT:                 ReactOS kernel
5  * FILE:                    ntoskrnl/ps/psmgr.c
6  * PURPOSE:                 Process management
7  * PROGRAMMER:              David Welch (welch@mcmail.com)
8  */
9
10 /* INCLUDES **************************************************************/
11
12 #include <ddk/ntddk.h>
13 #include <internal/ke.h>
14 #include <internal/ps.h>
15 #include <reactos/version.h>
16
17 #define NDEBUG
18 #include <internal/debug.h>
19
20 /* FUNCTIONS ***************************************************************/
21
22 VOID PiShutdownProcessManager(VOID)
23 {
24    DPRINT("PiShutdownMemoryManager()\n");
25    
26    PiKillMostProcesses();
27 }
28
29 VOID PiInitProcessManager(VOID)
30 {
31    PsInitProcessManagment();
32    PsInitThreadManagment();
33    PsInitIdleThread();
34    PiInitApcManagement();
35    PsInitialiseSuspendImplementation();
36    PsInitialiseW32Call();
37 }
38
39
40 /**********************************************************************
41  * NAME                                                 EXPORTED
42  *      PsGetVersion
43  *
44  * DESCRIPTION
45  *      Retrieves the current OS version.
46  *
47  * ARGUMENTS
48  *      MajorVersion    Pointer to a variable that will be set to the
49  *                      major version of the OS. Can be NULL.
50  *
51  *      MinorVersion    Pointer to a variable that will be set to the
52  *                      minor version of the OS. Can be NULL.
53  *
54  *      BuildNumber     Pointer to a variable that will be set to the
55  *                      build number of the OS. Can be NULL.
56  *
57  *      CSDVersion      Pointer to a variable that will be set to the
58  *                      CSD string of the OS. Can be NULL.
59  *
60  * RETURN VALUE
61  *      TRUE    OS is a checked build.
62  *      FALSE   OS is a free build.
63  *
64  * NOTES
65  *      The DDK docs say something about a 'CmCSDVersionString'.
66  *      How do we determine in the build is checked or free??
67  *
68  * @unimplemented
69  */
70
71 BOOLEAN
72 STDCALL
73 PsGetVersion (
74         PULONG          MajorVersion    OPTIONAL,
75         PULONG          MinorVersion    OPTIONAL,
76         PULONG          BuildNumber     OPTIONAL,
77         PUNICODE_STRING CSDVersion      OPTIONAL
78         )
79 {
80         if (MajorVersion)
81                 *MajorVersion = KERNEL_VERSION_MAJOR;
82
83         if (MinorVersion)
84                 *MinorVersion = KERNEL_VERSION_MINOR;
85
86         if (BuildNumber)
87                 *BuildNumber = NtBuildNumber;
88
89         if (CSDVersion)
90         {
91                 CSDVersion->Length = 0;
92                 CSDVersion->MaximumLength = 0;
93                 CSDVersion->Buffer = NULL;
94 #if 0
95                 CSDVersion->Length = CmCSDVersionString.Length;
96                 CSDVersion->MaximumLength = CmCSDVersionString.Maximum;
97                 CSDVersion->Buffer = CmCSDVersionString.Buffer;
98 #endif
99         }
100
101         /* FIXME: How do we determine if build is checked or free? */
102         return FALSE;
103 }
104
105 /* EOF */