:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[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 }
37
38
39 /**********************************************************************
40  * NAME                                                 EXPORTED
41  *      PsGetVersion
42  *
43  * DESCRIPTION
44  *      Retrieves the current OS version.
45  *
46  * ARGUMENTS
47  *      MajorVersion    Pointer to a variable that will be set to the
48  *                      major version of the OS. Can be NULL.
49  *
50  *      MinorVersion    Pointer to a variable that will be set to the
51  *                      minor version of the OS. Can be NULL.
52  *
53  *      BuildNumber     Pointer to a variable that will be set to the
54  *                      build number of the OS. Can be NULL.
55  *
56  *      CSDVersion      Pointer to a variable that will be set to the
57  *                      CSD string of the OS. Can be NULL.
58  *
59  * RETURN VALUE
60  *      TRUE    OS is a checked build.
61  *      FALSE   OS is a free build.
62  *
63  * NOTES
64  *      The DDK docs say something about a 'CmCSDVersionString'.
65  *      How do we determine in the build is checked or free??
66  */
67
68 BOOLEAN
69 STDCALL
70 PsGetVersion (
71         PULONG          MajorVersion    OPTIONAL,
72         PULONG          MinorVersion    OPTIONAL,
73         PULONG          BuildNumber     OPTIONAL,
74         PUNICODE_STRING CSDVersion      OPTIONAL
75         )
76 {
77         if (MajorVersion)
78                 *MajorVersion = KERNEL_VERSION_MAJOR;
79
80         if (MinorVersion)
81                 *MinorVersion = KERNEL_VERSION_MINOR;
82
83         if (BuildNumber)
84                 *BuildNumber = NtBuildNumber;
85
86         if (CSDVersion)
87         {
88                 CSDVersion->Length = 0;
89                 CSDVersion->MaximumLength = 0;
90                 CSDVersion->Buffer = NULL;
91 #if 0
92                 CSDVersion->Length = CmCSDVersionString.Length;
93                 CSDVersion->MaximumLength = CmCSDVersionString.Maximum;
94                 CSDVersion->Buffer = CmCSDVersionString.Buffer;
95 #endif
96         }
97
98         /* FIXME: How do we determine if build is checked or free? */
99         return FALSE;
100 }
101
102 /* EOF */