fx_utility_memory_copy.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 | #include "string.h" | ||
| 32 | |||
| 33 | |||
| 34 | /* Remove any previous remapping for memory copy when compiling this | ||
| 35 | module. */ | ||
| 36 | |||
| 37 | #undef _fx_utility_memory_copy | ||
| 38 | |||
| 39 | |||
| 40 | /**************************************************************************/ | ||
| 41 | /* */ | ||
| 42 | /* FUNCTION RELEASE */ | ||
| 43 | /* */ | ||
| 44 | /* _fx_utility_memory_copy PORTABLE C */ | ||
| 45 | /* 6.1 */ | ||
| 46 | /* AUTHOR */ | ||
| 47 | /* */ | ||
| 48 | /* William E. Lamie, Microsoft Corporation */ | ||
| 49 | /* */ | ||
| 50 | /* DESCRIPTION */ | ||
| 51 | /* */ | ||
| 52 | /* This function copies the specified number of bytes from the source */ | ||
| 53 | /* to the destination. */ | ||
| 54 | /* */ | ||
| 55 | /* INPUT */ | ||
| 56 | /* */ | ||
| 57 | /* source_ptr Source memory pointer */ | ||
| 58 | /* dest_ptr Destination memory pointer */ | ||
| 59 | /* size number of bytes to copy */ | ||
| 60 | /* */ | ||
| 61 | /* OUTPUT */ | ||
| 62 | /* */ | ||
| 63 | /* None */ | ||
| 64 | /* */ | ||
| 65 | /* CALLS */ | ||
| 66 | /* */ | ||
| 67 | /* None */ | ||
| 68 | /* */ | ||
| 69 | /* CALLED BY */ | ||
| 70 | /* */ | ||
| 71 | /* FileX System Functions */ | ||
| 72 | /* */ | ||
| 73 | /**************************************************************************/ | ||
| 74 | 1294399618 | VOID _fx_utility_memory_copy(UCHAR *source_ptr, UCHAR *dest_ptr, ULONG size) | |
| 75 | { | ||
| 76 | |||
| 77 | /* Copy the memory. */ | ||
| 78 | 1294399618 | memcpy(dest_ptr, source_ptr, size); /* Use case of memcpy is verified. */ | |
| 79 | 1294399618 | } | |
| 80 | |||
| 81 |