fx_utility_64_unsigned_write.c
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*************************************************************************** | ||
| 2 | * Copyright (c) 2024 Microsoft Corporation | ||
| 3 | * Copyright (c) 2026-present Eclipse ThreadX contributors | ||
| 4 | * | ||
| 5 | * This program and the accompanying materials are made available under the | ||
| 6 | * terms of the MIT License which is available at | ||
| 7 | * https://opensource.org/licenses/MIT. | ||
| 8 | * | ||
| 9 | * SPDX-License-Identifier: MIT | ||
| 10 | **************************************************************************/ | ||
| 11 | |||
| 12 | |||
| 13 | /**************************************************************************/ | ||
| 14 | /**************************************************************************/ | ||
| 15 | /** */ | ||
| 16 | /** FileX Component */ | ||
| 17 | /** */ | ||
| 18 | /** Utility */ | ||
| 19 | /** */ | ||
| 20 | /**************************************************************************/ | ||
| 21 | /**************************************************************************/ | ||
| 22 | |||
| 23 | #define FX_SOURCE_CODE | ||
| 24 | |||
| 25 | |||
| 26 | /* Include necessary system files. */ | ||
| 27 | |||
| 28 | #include "fx_api.h" | ||
| 29 | #include "fx_system.h" | ||
| 30 | #include "fx_utility.h" | ||
| 31 | |||
| 32 | |||
| 33 | /**************************************************************************/ | ||
| 34 | /* */ | ||
| 35 | /* FUNCTION RELEASE */ | ||
| 36 | /* */ | ||
| 37 | /* _fx_utility_64_unsigned_write PORTABLE C */ | ||
| 38 | /* 6.1 */ | ||
| 39 | /* AUTHOR */ | ||
| 40 | /* */ | ||
| 41 | /* William E. Lamie, Microsoft Corporation */ | ||
| 42 | /* */ | ||
| 43 | /* DESCRIPTION */ | ||
| 44 | /* */ | ||
| 45 | /* This function writes (with endian awareness) a 64-bit unsigned data */ | ||
| 46 | /* type to the specified destination. */ | ||
| 47 | /* */ | ||
| 48 | /* INPUT */ | ||
| 49 | /* */ | ||
| 50 | /* dest_ptr Destination memory pointer */ | ||
| 51 | /* value Value to write to memory */ | ||
| 52 | /* */ | ||
| 53 | /* OUTPUT */ | ||
| 54 | /* */ | ||
| 55 | /* None */ | ||
| 56 | /* */ | ||
| 57 | /* CALLS */ | ||
| 58 | /* */ | ||
| 59 | /* None */ | ||
| 60 | /* */ | ||
| 61 | /* CALLED BY */ | ||
| 62 | /* */ | ||
| 63 | /* FileX System Functions */ | ||
| 64 | /* */ | ||
| 65 | /**************************************************************************/ | ||
| 66 | 163560219 | VOID _fx_utility_64_unsigned_write(UCHAR *dest_ptr, ULONG64 value) | |
| 67 | { | ||
| 68 | |||
| 69 | /* Store the ULONG64 into the destination with endian-awareness. */ | ||
| 70 | 163560219 | _fx_utility_32_unsigned_write(dest_ptr, (ULONG)value); | |
| 71 | 163560219 | _fx_utility_32_unsigned_write(dest_ptr + sizeof(ULONG), (ULONG)(value >> 32)); | |
| 72 | 163560219 | } | |
| 73 | |||
| 74 |