]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/DivU64x32Remainder.c
MdeModulePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseLib / DivU64x32Remainder.c
CommitLineData
e1f414b6 1/** @file\r
2 Math worker functions.\r
3\r
bb817c56 4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
9344f092 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
e1f414b6 6\r
7**/\r
8\r
1efcc4ae 9\r
f734a10a 10\r
e1f414b6 11\r
12#include "BaseLibInternals.h"\r
13\r
14/**\r
15 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates\r
16 a 64-bit unsigned result and an optional 32-bit unsigned remainder.\r
17\r
18 This function divides the 64-bit unsigned value Dividend by the 32-bit\r
19 unsigned value Divisor and generates a 64-bit unsigned quotient. If Remainder\r
20 is not NULL, then the 32-bit unsigned remainder is returned in Remainder.\r
21 This function returns the 64-bit unsigned quotient.\r
22\r
23 If Divisor is 0, then ASSERT().\r
24\r
25 @param Dividend A 64-bit unsigned value.\r
26 @param Divisor A 32-bit unsigned value.\r
27 @param Remainder A pointer to a 32-bit unsigned value. This parameter is\r
28 optional and may be NULL.\r
29\r
30 @return Dividend / Divisor\r
31\r
32**/\r
33UINT64\r
34EFIAPI\r
35DivU64x32Remainder (\r
36 IN UINT64 Dividend,\r
37 IN UINT32 Divisor,\r
38 OUT UINT32 *Remainder OPTIONAL\r
39 )\r
40{\r
41 ASSERT (Divisor != 0);\r
42 return InternalMathDivRemU64x32 (Dividend, Divisor, Remainder);\r
43}\r