Major update of the build system:
[reactos.git] / reactos / ntoskrnl / include / internal / ps.h
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2000 David Welch <welch@cwcom.net>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19 /*
20 * FILE: ntoskrnl/ke/kthread.c
21 * PURPOSE: Process manager definitions
22 * PROGRAMMER: David Welch (welch@cwcom.net)
23 * UPDATE HISTORY:
24 * Created 22/05/98
25 */
26
27 #ifndef __INCLUDE_INTERNAL_PS_H
28 #define __INCLUDE_INTERNAL_PS_H
29
30 /*
31 * Defines for accessing KPCR and KTHREAD structure members
32 */
33 #define KTHREAD_INITIAL_STACK 0x18
34 #define KTHREAD_TEB 0x20
35 #define KTHREAD_KERNEL_STACK 0x28
36 #define KTHREAD_PREVIOUS_MODE 0x137
37 #define KTHREAD_TRAP_FRAME 0x128
38
39 #define ETHREAD_THREADS_PROCESS 0x258
40
41 #define KPROCESS_DIRECTORY_TABLE_BASE 0x18
42
43 #define KPCR_BASE 0xFF000000
44
45 #define KPCR_EXCEPTION_LIST 0x0
46 #define KPCR_SELF 0x18
47 #define KPCR_TSS 0x28
48 #define KPCR_CURRENT_THREAD 0x124
49
50 #ifndef __ASM__
51
52 #include <internal/mm.h>
53
54 struct _KTHREAD;
55 struct _KTRAPFRAME;
56
57 /* FIXME: This does not work if we have more than 24 IRQs (ie. more than one I/O APIC) */
58 #define VECTOR2IRQ(vector) (((vector) - 0x31) / 8)
59 #define VECTOR2IRQL(vector) (4 + VECTOR2IRQ(vector))
60
61 /*
62 * Processor Control Region
63 */
64 typedef struct _KPCR
65 {
66 PVOID ExceptionList; /* 00 */
67 PVOID StackBase; /* 04 */
68 PVOID StackLimit; /* 08 */
69 PVOID SubSystemTib; /* 0C */
70 PVOID Reserved1; /* 10 */
71 PVOID ArbitraryUserPointer; /* 14 */
72 struct _KPCR* Self; /* 18 */
73 UCHAR ProcessorNumber; /* 1C */
74 KIRQL Irql; /* 1D */
75 UCHAR Reserved2[0x2]; /* 1E */
76 PUSHORT IDT; /* 20 */
77 PUSHORT GDT; /* 24 */
78 KTSS* TSS; /* 28 */
79 UCHAR Reserved3[0xF8]; /* 2C */
80 struct _KTHREAD* CurrentThread; /* 124 */
81 } __attribute__((packed)) KPCR, *PKPCR;
82
83 static inline PKPCR KeGetCurrentKPCR(VOID)
84 {
85 ULONG value;
86
87 __asm__ __volatile__ ("movl %%fs:0x18, %0\n\t"
88 : "=r" (value)
89 : /* no inputs */
90 );
91 return((PKPCR)value);
92 }
93
94 #define KeGetCurrentProcessorNumber() (KeGetCurrentKPCR()->ProcessorNumber)
95
96 extern HANDLE SystemProcessHandle;
97
98 extern LCID PsDefaultThreadLocaleId;
99 extern LCID PsDefaultSystemLocaleId;
100
101
102 typedef struct _KAPC_STATE
103 {
104 LIST_ENTRY ApcListHead[2];
105 struct _KPROCESS* Process;
106 UCHAR KernelApcInProgress;
107 UCHAR KernelApcPending;
108 USHORT UserApcPending;
109 } __attribute__((packed)) KAPC_STATE, *PKAPC_STATE;
110
111 typedef struct _KTHREAD
112 {
113 /* For waiting on thread exit */
114 DISPATCHER_HEADER DispatcherHeader; /* 00 */
115
116 /* List of mutants owned by the thread */
117 LIST_ENTRY MutantListHead; /* 10 */
118 PVOID InitialStack; /* 18 */
119 ULONG StackLimit; /* 1C */
120
121 /* Pointer to the thread's environment block in user memory */
122 PTEB Teb; /* 20 */
123
124 /* Pointer to the thread's TLS array */
125 PVOID TlsArray; /* 24 */
126 PVOID KernelStack; /* 28 */
127 UCHAR DebugActive; /* 2C */
128
129 /* Thread state (one of THREAD_STATE_xxx constants below) */
130 UCHAR State; /* 2D */
131 UCHAR Alerted[2]; /* 2E */
132 UCHAR Iopl; /* 30 */
133 UCHAR NpxState; /* 31 */
134 UCHAR Saturation; /* 32 */
135 CHAR Priority; /* 33 */
136 KAPC_STATE ApcState; /* 34 */
137 ULONG ContextSwitches; /* 4C */
138 ULONG WaitStatus; /* 50 */
139 KIRQL WaitIrql; /* 54 */
140 UCHAR WaitMode; /* 55 */
141 UCHAR WaitNext; /* 56 */
142 UCHAR WaitReason; /* 57 */
143 PKWAIT_BLOCK WaitBlockList; /* 58 */
144 LIST_ENTRY WaitListEntry; /* 5C */
145 ULONG WaitTime; /* 64 */
146 CHAR BasePriority; /* 68 */
147 UCHAR DecrementCount; /* 69 */
148 UCHAR PriorityDecrement; /* 6A */
149 UCHAR Quantum; /* 6B */
150 KWAIT_BLOCK WaitBlock[4]; /* 6C */
151 PVOID LegoData; /* CC */
152 LONG KernelApcDisable; /* D0 */
153 KAFFINITY UserAffinity; /* D4 */
154 UCHAR SystemAffinityActive;/* D8 */
155 UCHAR Pad[7]; /* D9 */
156 PKQUEUE Queue; /* E0 */
157 KSPIN_LOCK ApcQueueLock; /* E4 */
158 KTIMER Timer; /* E8 */
159 LIST_ENTRY QueueListEntry; /* 110 */
160 KAFFINITY Affinity; /* 118 */
161 UCHAR Preempted; /* 11C */
162 UCHAR ProcessReadyQueue; /* 11D */
163 UCHAR KernelStackResident; /* 11E */
164 UCHAR NextProcessor; /* 11F */
165 PVOID CallbackStack; /* 120 */
166 BOOL Win32Thread; /* 124 */
167 struct _KTRAP_FRAME* TrapFrame; /* 128 */
168 PVOID ApcStatePointer[2]; /* 12C */
169 UCHAR EnableStackSwap; /* 134 */
170 UCHAR LargeStack; /* 135 */
171 UCHAR ResourceIndex; /* 136 */
172 UCHAR PreviousMode; /* 137 */
173 ULONG KernelTime; /* 138 */
174 ULONG UserTime; /* 13C */
175 KAPC_STATE SavedApcState; /* 140 */
176 UCHAR Alertable; /* 158 */
177 UCHAR ApcStateIndex; /* 159 */
178 UCHAR ApcQueueable; /* 15A */
179 UCHAR AutoAlignment; /* 15B */
180 PVOID StackBase; /* 15C */
181 KAPC SuspendApc; /* 160 */
182 KSEMAPHORE SuspendSemaphore; /* 190 */
183 LIST_ENTRY ThreadListEntry; /* 1A4 */
184 CHAR FreezeCount; /* 1AC */
185 UCHAR SuspendCount; /* 1AD */
186 UCHAR IdealProcessor; /* 1AE */
187 UCHAR DisableBoost; /* 1AF */
188
189 /*
190 * Below here are thread structure members that are specific to ReactOS
191 */
192
193 /* Added by Phillip Susi for list of threads in a process */
194 LIST_ENTRY ProcessThreadListEntry; /* 1B0 */
195
196 /* Added by Phillip Susi for internal KeAddThreadTimeout() implementation */
197 KDPC TimerDpc; /* 1B8 */
198
199 /* Record the last EIP value when the thread is suspended */
200 ULONG LastEip; /* 1D8 */
201 } __attribute__((packed)) KTHREAD, *PKTHREAD;
202
203 // According to documentation the stack should have a commited [ 1 page ] and
204 // a reserved part [ 1 M ] but can be specified otherwise in the image file.
205
206
207
208
209
210
211
212 // TopLevelIrp can be one of the following values:
213 // FIXME I belong somewhere else
214
215 #define FSRTL_FSP_TOP_LEVEL_IRP (0x01)
216 #define FSRTL_CACHE_TOP_LEVEL_IRP (0x02)
217 #define FSRTL_MOD_WRITE_TOP_LEVEL_IRP (0x03)
218 #define FSRTL_FAST_IO_TOP_LEVEL_IRP (0x04)
219 #define FSRTL_MAX_TOP_LEVEL_IRP_FLAG (0x04)
220
221 typedef struct _TOP_LEVEL_IRP
222 {
223 PIRP TopLevelIrp;
224 ULONG TopLevelIrpConst;
225 } TOP_LEVEL_IRP;
226
227 typedef struct
228 {
229 PACCESS_TOKEN Token; // 0x0
230 UCHAR Unknown1; // 0x4
231 UCHAR Unknown2; // 0x5
232 UCHAR Pad[2]; // 0x6
233 SECURITY_IMPERSONATION_LEVEL Level; // 0x8
234 } PS_IMPERSONATION_INFO, *PPS_IMPERSONATION_INFO;
235
236
237 typedef struct _W32THREAD
238 {
239 PVOID MessageQueue;
240 } __attribute__((packed)) W32THREAD, *PW32THREAD;
241
242
243 typedef struct _ETHREAD
244 {
245 KTHREAD Tcb; /* 000 */
246 TIME CreateTime; /* 1B0/1DC */
247 union
248 {
249 TIME ExitTime; /* 1B8/1E4 */
250 LIST_ENTRY LpcReplyChain; /* 1B8/1E4 */
251 } u1;
252 NTSTATUS ExitStatus; /* 1C0/1EC */
253 LIST_ENTRY PostBlockList; /* 1C4/1F0 */
254 LIST_ENTRY TerminationPortList; /* 1CC/1F8 */
255 KSPIN_LOCK ActiveTimerListLock; /* 1D4/200 */
256 LIST_ENTRY ActiveTimerListHead; /* 1D8/204 */
257 CLIENT_ID Cid; /* 1E0/20C */
258 KSEMAPHORE LpcReplySemaphore; /* 1E8/214 */
259 PVOID LpcReplyMessage; /* 1FC/228 */
260 PLARGE_INTEGER LpcReplyMessageId; /* 200/22C */
261 ULONG PerformanceCounterLow; /* 204/230 */
262 PPS_IMPERSONATION_INFO ImpersonationInfo; /* 208/234 */
263 LIST_ENTRY IrpList; /* 20C/238 */
264 TOP_LEVEL_IRP* TopLevelIrp; /* 214/240 */
265 PDEVICE_OBJECT DeviceToVerify; /* 218/244 */
266 ULONG ReadClusterSize; /* 21C/248 */
267 UCHAR ForwardClusterOnly; /* 220/24C */
268 UCHAR DisablePageFaultClustering; /* 221/24D */
269 UCHAR DeadThread; /* 222/24E */
270 UCHAR HasTerminated; /* 223/24F */
271 PVOID EventPair; /* 224/250 */
272 ACCESS_MASK GrantedAccess; /* 228/254 */
273 struct _EPROCESS* ThreadsProcess; /* 22C/258 */
274 PKSTART_ROUTINE StartAddress; /* 230/25C */
275 union
276 {
277 LPTHREAD_START_ROUTINE Win32StartAddress; /* 234/260 */
278 ULONG LpcReceiveMessageId; /* 234/260 */
279 } u2;
280 UCHAR LpcExitThreadCalled; /* 238/264 */
281 UCHAR HardErrorsAreDisabled; /* 239/265 */
282 UCHAR LpcReceivedMsgIdValid; /* 23A/266 */
283 UCHAR ActiveImpersonationInfo; /* 23B/267 */
284 ULONG PerformanceCountHigh; /* 23C/268 */
285
286 /*
287 * Added by David Welch (welch@cwcom.net)
288 */
289 struct _EPROCESS* OldProcess; /* 240/26C */
290
291 PW32THREAD Win32Thread;
292
293 } __attribute__((packed)) ETHREAD, *PETHREAD;
294
295
296 typedef struct _KPROCESS
297 {
298 /* So it's possible to wait for the process to terminate */
299 DISPATCHER_HEADER DispatcherHeader; /* 000 */
300 /*
301 * Presumably a list of profile objects associated with this process,
302 * currently unused.
303 */
304 LIST_ENTRY ProfileListHead; /* 010 */
305 /*
306 * We use the first member of this array to hold the physical address of
307 * the page directory for this process.
308 */
309 PVOID DirectoryTableBase[2]; /* 018 */
310 /*
311 * Presumably a descriptor for the process's LDT, currently unused.
312 */
313 ULONG LdtDescriptor[2]; /* 020 */
314 /*
315 * Presumably for processing int 0x21 from V86 mode DOS, currently
316 * unused.
317 */
318 ULONG Int21Descriptor[2]; /* 028 */
319 /* Don't know. */
320 USHORT IopmOffset; /* 030 */
321 /*
322 * Presumably I/O privilege level to be used for this process, currently
323 * unused.
324 */
325 UCHAR Iopl; /* 032 */
326 /* Set if this process is a virtual dos machine? */
327 UCHAR VdmFlag; /* 033 */
328 /* Bitmask of the processors being used by this process's threads? */
329 ULONG ActiveProcessors; /* 034 */
330 /* Aggregate of the time this process's threads have spent in kernel mode? */
331 ULONG KernelTime; /* 038 */
332 /* Aggregate of the time this process's threads have spent in user mode? */
333 ULONG UserTime; /* 03C */
334 /* List of this process's threads that are ready for execution? */
335 LIST_ENTRY ReadyListHead; /* 040 */
336 /* List of this process's threads that have their stacks swapped out? */
337 LIST_ENTRY SwapListEntry; /* 048 */
338 /* List of this process's threads? */
339 LIST_ENTRY ThreadListHead; /* 050 */
340 /* Maybe a lock for this data structure, the type is assumed. */
341 KSPIN_LOCK ProcessLock; /* 058 */
342 /* Default affinity mask for this process's threads? */
343 ULONG Affinity; /* 05C */
344 /* Count of the stacks allocated for this process's threads? */
345 USHORT StackCount; /* 060 */
346 /* Base priority for this process's threads? */
347 KPRIORITY BasePriority; /* 062 */
348 /* Default quantum for this process's threads */
349 UCHAR ThreadQuantum; /* 063 */
350 /* Unknown. */
351 UCHAR AutoAlignment; /* 064 */
352 /* Process execution state, currently either active or terminated. */
353 UCHAR State; /* 065 */
354 /* Seed for generating thread ids for this process's threads? */
355 UCHAR ThreadSeed; /* 066 */
356 /* Disable priority boosts? */
357 UCHAR DisableBoost; /* 067 */
358 } KPROCESS, *PKPROCESS;
359
360
361 typedef struct _W32PROCESS
362 {
363 } __attribute__((packed)) W32PROCESS, *PW32PROCESS;
364
365
366 struct _EPROCESS
367 {
368 /* Microkernel specific process state. */
369 KPROCESS Pcb; /* 000 */
370 /* Exit status of the process. */
371 NTSTATUS ExitStatus; /* 068 */
372 /* Unknown. */
373 KEVENT LockEvent; /* 06C */
374 /* Unknown. */
375 ULONG LockCount; /* 07C */
376 /* Time of process creation. */
377 TIME CreateTime; /* 080 */
378 /* Time of process exit. */
379 TIME ExitTime; /* 088 */
380 /* Unknown. */
381 PVOID LockOwner; /* 090 */
382 /* Process id. */
383 ULONG UniqueProcessId; /* 094 */
384 /* Unknown. */
385 LIST_ENTRY ActiveProcessLinks; /* 098 */
386 /* Unknown. */
387 ULONG QuotaPeakPoolUsage[2]; /* 0A0 */
388 /* Unknown. */
389 ULONG QuotaPoolUsage[2]; /* 0A8 */
390 /* Unknown. */
391 ULONG PagefileUsage; /* 0B0 */
392 /* Unknown. */
393 ULONG CommitCharge; /* 0B4 */
394 /* Unknown. */
395 ULONG PeakPagefileUsage; /* 0B8 */
396 /* Unknown. */
397 ULONG PeakVirtualSize; /* 0BC */
398 /* Unknown. */
399 LARGE_INTEGER VirtualSize; /* 0C0 */
400 struct
401 {
402 ULONG LastTrimTime;
403 ULONG LastTrimFaultCount;
404 ULONG PageFaultCount;
405 ULONG PeakWorkingSetSize;
406 ULONG WorkingSetSize;
407 ULONG MinimumWorkingSetSize;
408 ULONG MaximumWorkingSetSize;
409 ULONG VmWorkingSetList;
410 LIST_ENTRY WorkingSetExpansionList;
411 UCHAR AllowWorkingSetAdjustment;
412 UCHAR AddressSpaceBeingDeleted;
413 UCHAR ForegroundPrioritySwitch;
414 UCHAR MemoryPriority;
415 } Vm;
416 PVOID LastProtoPteFault;
417 struct _EPORT* DebugPort;
418 struct _EPORT* ExceptionPort;
419 PVOID ObjectTable;
420 PVOID Token;
421 // FAST_MUTEX WorkingSetLock;
422 KMUTEX WorkingSetLock;
423 PVOID WorkingSetPage;
424 UCHAR ProcessOutswapEnabled;
425 UCHAR ProcessOutswapped;
426 UCHAR AddressSpaceInitialized;
427 UCHAR AddressSpaceDeleted;
428 FAST_MUTEX AddressCreationLock;
429 KSPIN_LOCK HyperSpaceLock;
430 PETHREAD ForkInProgress;
431 USHORT VmOperation;
432 UCHAR ForkWasSuccessful;
433 UCHAR MmAgressiveWsTrimMask;
434 PKEVENT VmOperationEvent;
435 PVOID PageDirectoryPte;
436 ULONG LastFaultCount;
437 PVOID VadRoot;
438 PVOID VadHint;
439 PVOID CloneRoot;
440 ULONG NumberOfPrivatePages;
441 ULONG NumberOfLockedPages;
442 USHORT NextProcessColour;
443 UCHAR ExitProcessCalled;
444 UCHAR CreateProcessReported;
445 HANDLE SectionHandle;
446 PPEB Peb;
447 PVOID SectionBaseAddress;
448 PVOID QuotaBlock;
449 NTSTATUS LastThreadExitStatus;
450 PVOID WorkingSetWatch;
451 HANDLE InheritedFromUniqueProcessId;
452 ACCESS_MASK GrantedAccess;
453 ULONG DefaultHardErrorProcessing;
454 PVOID LdtInformation;
455 ULONG VadFreeHint;
456 PVOID VdmObjects;
457 KMUTANT ProcessMutant;
458 CHAR ImageFileName[16];
459 ULONG VmTrimFaultValue;
460 UCHAR SetTimerResolution;
461 UCHAR PriorityClass;
462 UCHAR SubSystemMinorVersion;
463 UCHAR SubSystemMajorVersion;
464 USHORT SubSystemVersion;
465 PW32PROCESS Win32Process;
466 HANDLE Win32WindowStation;
467
468 /*
469 * Added by David Welch (welch@mcmail.com)
470 */
471 MADDRESS_SPACE AddressSpace;
472 HANDLE_TABLE HandleTable;
473 LIST_ENTRY ProcessListEntry;
474
475 /*
476 * Added by Philip Susi for list of threads in process
477 */
478 LIST_ENTRY ThreadListHead;
479 };
480
481 #define PROCESS_STATE_TERMINATED (1)
482 #define PROCESS_STATE_ACTIVE (2)
483
484 VOID PiInitDefaultLocale(VOID);
485 VOID PiInitProcessManager(VOID);
486 VOID PiShutdownProcessManager(VOID);
487 VOID PsInitThreadManagment(VOID);
488 VOID PsInitProcessManagment(VOID);
489 VOID PsInitIdleThread(VOID);
490 VOID PsDispatchThreadNoLock(ULONG NewThreadStatus);
491 VOID PiTerminateProcessThreads(PEPROCESS Process, NTSTATUS ExitStatus);
492 VOID PsTerminateOtherThread(PETHREAD Thread, NTSTATUS ExitStatus);
493 VOID PsReleaseThread(PETHREAD Thread);
494 VOID PsBeginThread(PKSTART_ROUTINE StartRoutine, PVOID StartContext);
495 VOID PsBeginThreadWithContextInternal(VOID);
496 VOID PiKillMostProcesses(VOID);
497 NTSTATUS STDCALL PiTerminateProcess(PEPROCESS Process, NTSTATUS ExitStatus);
498 ULONG PsUnfreezeThread(PETHREAD Thread, PNTSTATUS WaitStatus);
499 ULONG PsFreezeThread(PETHREAD Thread, PNTSTATUS WaitStatus,
500 UCHAR Alertable, ULONG WaitMode);
501 VOID PiInitApcManagement(VOID);
502 VOID PiDeleteThread(PVOID ObjectBody);
503 VOID PiCloseThread(PVOID ObjectBody, ULONG HandleCount);
504 VOID PsReapThreads(VOID);
505 NTSTATUS
506 PsInitializeThread(HANDLE ProcessHandle,
507 PETHREAD* ThreadPtr,
508 PHANDLE ThreadHandle,
509 ACCESS_MASK DesiredAccess,
510 POBJECT_ATTRIBUTES ObjectAttributes,
511 BOOLEAN First);
512
513 PACCESS_TOKEN PsReferenceEffectiveToken(PETHREAD Thread,
514 PTOKEN_TYPE TokenType,
515 PUCHAR b,
516 PSECURITY_IMPERSONATION_LEVEL Level);
517
518 NTSTATUS PsOpenTokenOfProcess(HANDLE ProcessHandle,
519 PACCESS_TOKEN* Token);
520
521 NTSTATUS PsSuspendThread(PETHREAD Thread, PULONG PreviousCount);
522 NTSTATUS PsResumeThread(PETHREAD Thread, PULONG PreviousCount);
523
524
525 #define THREAD_STATE_INVALID (0)
526 #define THREAD_STATE_RUNNABLE (1)
527 #define THREAD_STATE_RUNNING (2)
528 #define THREAD_STATE_SUSPENDED (3)
529 #define THREAD_STATE_FROZEN (4)
530 #define THREAD_STATE_TERMINATED_1 (5)
531 #define THREAD_STATE_TERMINATED_2 (6)
532 #define THREAD_STATE_BLOCKED (7)
533 #define THREAD_STATE_MAX (8)
534
535
536 /*
537 * Internal thread priorities, added by Phillip Susi
538 * TODO: rebalence these to make use of all priorities... the ones above 16 can not all be used right now
539 */
540
541 #define PROCESS_PRIO_IDLE 3
542 #define PROCESS_PRIO_NORMAL 8
543 #define PROCESS_PRIO_HIGH 13
544 #define PROCESS_PRIO_RT 18
545
546
547 VOID
548 KeInitializeThread(PKPROCESS Process, PKTHREAD Thread, BOOLEAN First);
549
550 VOID HalInitFirstTask(PETHREAD thread);
551 NTSTATUS
552 Ke386InitThread(PKTHREAD thread, PKSTART_ROUTINE fn, PVOID StartContext);
553 VOID HalTaskSwitch(PKTHREAD thread);
554 NTSTATUS
555 Ke386InitThreadWithContext(PKTHREAD Thread, PCONTEXT Context);
556 NTSTATUS HalReleaseTask(PETHREAD Thread);
557 VOID PiDeleteProcess(PVOID ObjectBody);
558 VOID PsReapThreads(VOID);
559 VOID PsUnfreezeOtherThread(PETHREAD Thread);
560 VOID PsFreezeOtherThread(PETHREAD Thread);
561 VOID PsFreezeProcessThreads(PEPROCESS Process);
562 VOID PsUnfreezeProcessThreads(PEPROCESS Process);
563 PEPROCESS PsGetNextProcess(PEPROCESS OldProcess);
564 VOID
565 Ki386ContextSwitch(PKTHREAD NewThread, PKTHREAD OldThread);
566 VOID
567 PsBlockThread(PNTSTATUS Status, UCHAR Alertable, ULONG WaitMode,
568 BOOLEAN DispatcherLock, KIRQL WaitIrql);
569 VOID
570 PsUnblockThread(PETHREAD Thread, PNTSTATUS WaitStatus);
571 VOID
572 PsApplicationProcessorInit(VOID);
573 VOID
574 PsPrepareForApplicationProcessorInit(ULONG Id);
575 NTSTATUS
576 PsIdleThreadMain(PVOID Context);
577
578 #endif /* ASSEMBLER */
579
580 #endif /* __INCLUDE_INTERNAL_PS_H */