99a4993d928e060118ce114cac57dab7f9a32acf
[reactos.git] / lib / ntdll / csr / thread.c
1 /* $Id$
2  *
3  * COPYRIGHT:       See COPYING in the top level directory
4  * PROJECT:         ReactOS kernel
5  * FILE:            lib/ntdll/csr/propvar.c
6  * PURPOSE:         CSRSS threads API
7  */
8 #define NTOS_MODE_USER
9 #include <ntos.h>
10
11 #include <ntdll/csr.h>
12 #include <string.h>
13
14 #include <csrss/csrss.h>
15
16 #define NDEBUG
17 #include <ntdll/ntdll.h>
18
19 /*
20  * @implemented
21  */
22 NTSTATUS STDCALL
23 CsrNewThread(VOID)
24 {
25    return (NtRegisterThreadTerminatePort(WindowsApiPort));
26 }
27
28 /*
29  * @unimplemented
30  */
31 NTSTATUS STDCALL
32 CsrSetPriorityClass(HANDLE Process,
33                     PULONG PriorityClass)
34 {
35    /* FIXME: call csrss to get hProcess' priority */
36    *PriorityClass = CSR_PRIORITY_CLASS_NORMAL;
37
38    return (STATUS_NOT_IMPLEMENTED);
39 }
40
41 /*
42  * @unimplemented
43  */
44 NTSTATUS
45 STDCALL
46 CsrIdentifyAlertableThread (VOID)
47 {
48   /* FIXME: notify csrss that current thread is alertable */
49 #if 0
50    CSRSS_IDENTIFY_ALERTABLE_THREAD_REPLY        Reply;
51    CSRSS_IDENTIFY_ALERTABLE_THREAD_REQUEST      Request = (PCSRSS_IDENTIFY_ALERTABLE_THREAD_REQUEST) & Reply;
52    PNT_TEB                                      Teb;
53
54    Request->UniqueThread = NtCurrentTeb()->Cid.UniqueThread;
55    /* FIXME: this is written the NT way, NOT the ROS way! */
56    return CsrClientCallServer (
57                 Request,
58                 NULL, /* use Request storage for reply */
59                 CSRSS_IDENTIFY_ALERTABLE_THREAD,
60                 sizeof (CSRSS_IDENTIFY_ALERTABLE_THREAD_REPLY)
61                 );
62 #endif
63    return (STATUS_NOT_IMPLEMENTED);
64 }
65
66 /* EOF */