1 | /*
|
---|
2 | * avrt definitions
|
---|
3 | *
|
---|
4 | * Copyright 2009 Maarten Lankhorst
|
---|
5 | *
|
---|
6 | * This library is free software; you can redistribute it and/or
|
---|
7 | * modify it under the terms of the GNU Lesser General Public
|
---|
8 | * License as published by the Free Software Foundation; either
|
---|
9 | * version 2.1 of the License, or (at your option) any later version.
|
---|
10 | *
|
---|
11 | * This library is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
14 | * Lesser General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU Lesser General Public
|
---|
17 | * License along with this library; if not, write to the Free Software
|
---|
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
19 | *
|
---|
20 | */
|
---|
21 |
|
---|
22 | /*
|
---|
23 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
24 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
25 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
26 | * a choice of LGPL license versions is made available with the language indicating
|
---|
27 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
28 | * of the LGPL is applied is otherwise unspecified.
|
---|
29 | */
|
---|
30 |
|
---|
31 | #ifndef _AVRT_
|
---|
32 | #define _AVRT_
|
---|
33 |
|
---|
34 | #ifdef __cplusplus
|
---|
35 | extern "C" {
|
---|
36 | #endif
|
---|
37 |
|
---|
38 | typedef enum _AVRT_PRIORITY
|
---|
39 | {
|
---|
40 | AVRT_PRIORITY_LOW = -1,
|
---|
41 | AVRT_PRIORITY_NORMAL,
|
---|
42 | AVRT_PRIORITY_HIGH,
|
---|
43 | AVRT_PRIORITY_CRITICAL
|
---|
44 | } AVRT_PRIORITY, *PAVRT_PRIORITY;
|
---|
45 |
|
---|
46 | /* Windows compiler is more lax */
|
---|
47 | #define THREAD_ORDER_GROUP_INFINITE_TIMEOUT ((void*)((LONG_PTR)-1))
|
---|
48 |
|
---|
49 | HANDLE WINAPI AvSetMmThreadCharacteristicsA(LPCSTR TaskName, LPDWORD TaskIndex);
|
---|
50 | HANDLE WINAPI AvSetMmThreadCharacteristicsW(LPCWSTR TaskName, LPDWORD TaskIndex);
|
---|
51 | #define AvSetMmThreadCharacteristics WINELIB_NAME_AW(AvSetMmThreadCharacteristics)
|
---|
52 |
|
---|
53 | HANDLE WINAPI AvSetMmMaxThreadCharacteristicsA(LPCSTR FirstTask, LPCSTR SecondTask, LPDWORD TaskIndex);
|
---|
54 | HANDLE WINAPI AvSetMmMaxThreadCharacteristicsW(LPCSTR FirstTask, LPCSTR SecondTask, LPDWORD TaskIndex);
|
---|
55 | #define AvSetMmMaxThreadCharacteristics WINELIB_NAME_AW(AvSetMmMaxThreadCharacteristics)
|
---|
56 |
|
---|
57 | BOOL WINAPI AvRevertMmThreadCharacteristics(HANDLE AvrtHandle);
|
---|
58 | BOOL WINAPI AvSetMmThreadPriority(HANDLE AvrtHandle, AVRT_PRIORITY Priority);
|
---|
59 | BOOL WINAPI AvRtCreateThreadOrderingGroup(
|
---|
60 | PHANDLE Context, PLARGE_INTEGER Period,
|
---|
61 | GUID *ThreadOrderingGuid, PLARGE_INTEGER Timeout);
|
---|
62 |
|
---|
63 | BOOL WINAPI AvRtCreateThreadOrderingGroupExA(
|
---|
64 | PHANDLE Context, PLARGE_INTEGER Period,
|
---|
65 | GUID *ThreadOrderingGuid, PLARGE_INTEGER Timeout,
|
---|
66 | LPCSTR TaskName);
|
---|
67 | BOOL WINAPI AvRtCreateThreadOrderingGroupExW(
|
---|
68 | PHANDLE Context, PLARGE_INTEGER Period,
|
---|
69 | GUID *ThreadOrderingGuid, PLARGE_INTEGER Timeout,
|
---|
70 | LPCSTR TaskName);
|
---|
71 | #define AvRtCreateThreadOrderingGroupEx WINELIB_NAME_AW(AvRtCreateThreadOrderingGroupEx)
|
---|
72 |
|
---|
73 | BOOL WINAPI AvRtJoinThreadOrderingGroup(PHANDLE Context, GUID *ThreadOrderingGuid, BOOL Before);
|
---|
74 | BOOL WINAPI AvRtWaitOnThreadOrderingGroup(HANDLE Context);
|
---|
75 | BOOL WINAPI AvRtLeaveThreadOrderingGroup(HANDLE Context);
|
---|
76 | BOOL WINAPI AvRtDeleteThreadOrderingGroup(HANDLE Context);
|
---|
77 | BOOL WINAPI AvQuerySystemResponsiveness(HANDLE AvrtHandle, PULONG SystemResponsivenessValue);
|
---|
78 |
|
---|
79 | #ifdef __cplusplus
|
---|
80 | }
|
---|
81 | #endif
|
---|
82 |
|
---|
83 | #endif /*_AVRT_*/
|
---|