2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: lib/ntdll/csr/api.c
5 * PURPOSE: CSR APIs exported through NTDLL
6 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
9 /* INCLUDES *****************************************************************/
15 /* GLOBALS *******************************************************************/
16 extern HANDLE CsrApiPort
;
18 /* FUNCTIONS *****************************************************************/
27 /* Register the termination port to CSR's */
28 return NtRegisterThreadTerminatePort(CsrApiPort
);
36 CsrSetPriorityClass(HANDLE hProcess
,
40 CSR_API_MESSAGE2 ApiMessage
; /* <- Remove the "2" when CSR is commited */
41 PCSR_SET_PRIORITY_CLASS SetPriorityClass
= &ApiMessage
.SetPriorityClass
;
43 /* Set up the data for CSR */
45 SetPriorityClass
->hProcess
= hProcess
;
46 SetPriorityClass
->PriorityClass
= *PriorityClass
;
49 Status
= CsrClientCallServer((PCSR_API_MESSAGE
)&ApiMessage
,
51 CSR_MAKE_OPCODE(CsrSrvSetPriorityClass
,
53 sizeof(CSR_SET_PRIORITY_CLASS
));
55 /* Return what we got, if requested */
56 if (*PriorityClass
) *PriorityClass
= SetPriorityClass
->PriorityClass
;
58 /* Return to caller */
67 CsrIdentifyAlertableThread (VOID
)
70 CSR_API_MESSAGE2 ApiMessage
; /* <- Remove the "2" when CSR is commited */
71 PCSR_IDENTIFY_ALTERTABLE_THREAD IdentifyAlertableThread
;
73 /* Set up the data for CSR */
75 IdentifyAlertableThread
= &ApiMessage
.IdentifyAlertableThread
;
76 IdentifyAlertableThread
->Cid
= NtCurrentTeb()->ClientId
;
79 Status
= CsrClientCallServer((PCSR_API_MESSAGE
)&ApiMessage
,
81 CSR_MAKE_OPCODE(CsrSrvIdentifyAlertableThread
,
83 sizeof(CSR_SET_PRIORITY_CLASS
));
85 /* Return to caller */