summaryrefslogtreecommitdiff
path: root/gcc/ada/s-osinte-mingw.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/s-osinte-mingw.ads')
-rw-r--r--gcc/ada/s-osinte-mingw.ads34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/ada/s-osinte-mingw.ads b/gcc/ada/s-osinte-mingw.ads
index af5a8fc20c9..0fc713f774f 100644
--- a/gcc/ada/s-osinte-mingw.ads
+++ b/gcc/ada/s-osinte-mingw.ads
@@ -95,6 +95,25 @@ package System.OS_Interface is
NO_ERROR : constant := 0;
FUNC_ERR : constant := -1;
+ ------------------------
+ -- System Information --
+ ------------------------
+
+ type SYSTEM_INFO is record
+ dwOemId : DWORD;
+ dwPageSize : DWORD;
+ lpMinimumApplicationAddress : PVOID;
+ lpMaximumApplicationAddress : PVOID;
+ dwActiveProcessorMask : DWORD;
+ dwNumberOfProcessors : DWORD;
+ dwProcessorType : DWORD;
+ dwAllocationGranularity : DWORD;
+ dwReserved : DWORD;
+ end record;
+
+ procedure GetSystemInfo (SI : access SYSTEM_INFO);
+ pragma Import (Stdcall, GetSystemInfo, "GetSystemInfo");
+
-------------
-- Signals --
-------------
@@ -194,6 +213,14 @@ package System.OS_Interface is
procedure SwitchToThread;
pragma Import (Stdcall, SwitchToThread, "SwitchToThread");
+ function GetThreadTimes
+ (hThread : HANDLE;
+ lpCreationTime : access Long_Long_Integer;
+ lpExitTime : access Long_Long_Integer;
+ lpKernelTime : access Long_Long_Integer;
+ lpUserTime : access Long_Long_Integer) return BOOL;
+ pragma Import (Stdcall, GetThreadTimes, "GetThreadTimes");
+
-----------------------
-- Critical sections --
-----------------------
@@ -221,6 +248,8 @@ package System.OS_Interface is
-- Thread Creation, Activation, Suspension And Termination --
-------------------------------------------------------------
+ subtype ProcessorId is DWORD;
+
type PTHREAD_START_ROUTINE is access function
(pThreadParameter : PVOID) return DWORD;
pragma Convention (Stdcall, PTHREAD_START_ROUTINE);
@@ -329,6 +358,11 @@ package System.OS_Interface is
fAlertable : BOOL) return DWORD;
pragma Import (Stdcall, WaitForSingleObjectEx, "WaitForSingleObjectEx");
+ function SetThreadIdealProcessor
+ (hThread : HANDLE;
+ dwIdealProcessor : ProcessorId) return DWORD;
+ pragma Import (Stdcall, SetThreadIdealProcessor, "SetThreadIdealProcessor");
+
Wait_Infinite : constant := DWORD'Last;
WAIT_TIMEOUT : constant := 16#0000_0102#;
WAIT_FAILED : constant := 16#FFFF_FFFF#;