1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- S Y S T E M . W I N 3 2 . E X T --
9 -- Copyright (C) 2009-2011, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 -- This package provides the part of the low level Win32 interface which is
33 -- not supported by RTX (but supported by regular Windows platforms).
35 package System
.Win32
.Ext
is
42 function QueryPerformanceFrequency
43 (lpFrequency
: access LARGE_INTEGER
) return Win32
.BOOL
;
45 (Stdcall
, QueryPerformanceFrequency
, "QueryPerformanceFrequency");
51 function SetThreadIdealProcessor
53 dwIdealProcessor
: ProcessorId
) return DWORD
;
54 pragma Import
(Stdcall
, SetThreadIdealProcessor
, "SetThreadIdealProcessor");
56 function SetThreadAffinityMask
58 dwThreadAffinityMask
: DWORD
) return DWORD
;
59 pragma Import
(Stdcall
, SetThreadAffinityMask
, "SetThreadAffinityMask");
65 DTR_CONTROL_DISABLE
: constant := 16#
0#
;
66 RTS_CONTROL_DISABLE
: constant := 16#
0#
;
67 NOPARITY
: constant := 0;
68 ODDPARITY
: constant := 1;
69 EVENPARITY
: constant := 2;
70 ONESTOPBIT
: constant := 0;
71 TWOSTOPBITS
: constant := 2;
81 fDsrSensitivity
: Bits1
;
82 fTXContinueOnXoff
: Bits1
;
88 fAbortOnError
: Bits1
;
103 pragma Convention
(C
, DCB
);
106 type COMMTIMEOUTS
is record
107 ReadIntervalTimeout
: DWORD
;
108 ReadTotalTimeoutMultiplier
: DWORD
;
109 ReadTotalTimeoutConstant
: DWORD
;
110 WriteTotalTimeoutMultiplier
: DWORD
;
111 WriteTotalTimeoutConstant
: DWORD
;
113 pragma Convention
(C
, COMMTIMEOUTS
);
115 function GetCommState
117 lpDCB
: access DCB
) return BOOL
;
118 pragma Import
(Stdcall
, GetCommState
, "GetCommState");
120 function SetCommState
122 lpDCB
: access DCB
) return BOOL
;
123 pragma Import
(Stdcall
, SetCommState
, "SetCommState");
125 function SetCommTimeouts
127 lpCommTimeouts
: access COMMTIMEOUTS
) return BOOL
;
128 pragma Import
(Stdcall
, SetCommTimeouts
, "SetCommTimeouts");
130 end System
.Win32
.Ext
;