migrate substitution keywords to SVN
[reactos.git] / reactos / lib / rosrtl / thread / exit.c
1 /* $Id$
2 */
3 /*
4 */
5
6 #define NTOS_MODE_USER
7 #include <ntos.h>
8
9 #define NDEBUG
10 #include <ntdll/ntdll.h>
11
12 #include <rosrtl/thread.h>
13
14 static VOID NTAPI RtlRosExitUserThread_Stage2
15 (
16 IN ULONG_PTR Status
17 )
18 {
19 RtlRosFreeUserThreadStack(NtCurrentProcess(), NtCurrentThread());
20 NtTerminateThread(NtCurrentThread(), Status);
21 }
22
23 __declspec(noreturn) VOID NTAPI RtlRosExitUserThread
24 (
25 IN NTSTATUS Status
26 )
27 {
28 RtlRosSwitchStackForExit
29 (
30 NtCurrentTeb()->StaticUnicodeBuffer,
31 sizeof(NtCurrentTeb()->StaticUnicodeBuffer),
32 RtlRosExitUserThread_Stage2,
33 Status
34 );
35
36 for(;;);
37 }
38
39 /* EOF */