[STORPORT] Fix x64 build
[reactos.git] / ntoskrnl / kdbg / kdb_serial.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: ntoskrnl/kdbg/kdb_serial.c
5 * PURPOSE: Serial driver
6 *
7 * PROGRAMMERS: Victor Kirhenshtein (sauros@iname.com)
8 * Jason Filby (jasonfilby@yahoo.com)
9 * arty
10 */
11
12 /* INCLUDES ****************************************************************/
13
14 #include <ntoskrnl.h>
15 #define NDEBUG
16 #include <debug.h>
17
18 CHAR
19 KdbpTryGetCharSerial(ULONG Retry)
20 {
21 CHAR Result = -1;
22
23 if (Retry == 0)
24 while (!KdPortGetByteEx(&SerialPortInfo, (PUCHAR)&Result));
25 else
26 while (!KdPortGetByteEx(&SerialPortInfo, (PUCHAR)&Result) && Retry-- > 0);
27
28 return Result;
29 }