1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* |
4 |
|
|
* This program and the accompanying materials are made available under the |
5 |
|
|
* terms of the MIT License which is available at |
6 |
|
|
* https://opensource.org/licenses/MIT. |
7 |
|
|
* |
8 |
|
|
* SPDX-License-Identifier: MIT |
9 |
|
|
**************************************************************************/ |
10 |
|
|
|
11 |
|
|
|
12 |
|
|
/**************************************************************************/ |
13 |
|
|
/**************************************************************************/ |
14 |
|
|
/** */ |
15 |
|
|
/** FileX Component */ |
16 |
|
|
/** */ |
17 |
|
|
/** Utility */ |
18 |
|
|
/** */ |
19 |
|
|
/**************************************************************************/ |
20 |
|
|
/**************************************************************************/ |
21 |
|
|
|
22 |
|
|
#define FX_SOURCE_CODE |
23 |
|
|
|
24 |
|
|
|
25 |
|
|
/* Include necessary system files. */ |
26 |
|
|
|
27 |
|
|
#include "fx_api.h" |
28 |
|
|
#include "fx_system.h" |
29 |
|
|
#include "fx_utility.h" |
30 |
|
|
#include "string.h" |
31 |
|
|
|
32 |
|
|
|
33 |
|
|
/* Remove any previous remapping for memory copy when compiling this |
34 |
|
|
module. */ |
35 |
|
|
|
36 |
|
|
#undef _fx_utility_memory_copy |
37 |
|
|
|
38 |
|
|
|
39 |
|
|
/**************************************************************************/ |
40 |
|
|
/* */ |
41 |
|
|
/* FUNCTION RELEASE */ |
42 |
|
|
/* */ |
43 |
|
|
/* _fx_utility_memory_copy PORTABLE C */ |
44 |
|
|
/* 6.1 */ |
45 |
|
|
/* AUTHOR */ |
46 |
|
|
/* */ |
47 |
|
|
/* William E. Lamie, Microsoft Corporation */ |
48 |
|
|
/* */ |
49 |
|
|
/* DESCRIPTION */ |
50 |
|
|
/* */ |
51 |
|
|
/* This function copies the specified number of bytes from the source */ |
52 |
|
|
/* to the destination. */ |
53 |
|
|
/* */ |
54 |
|
|
/* INPUT */ |
55 |
|
|
/* */ |
56 |
|
|
/* source_ptr Source memory pointer */ |
57 |
|
|
/* dest_ptr Destination memory pointer */ |
58 |
|
|
/* size number of bytes to copy */ |
59 |
|
|
/* */ |
60 |
|
|
/* OUTPUT */ |
61 |
|
|
/* */ |
62 |
|
|
/* None */ |
63 |
|
|
/* */ |
64 |
|
|
/* CALLS */ |
65 |
|
|
/* */ |
66 |
|
|
/* None */ |
67 |
|
|
/* */ |
68 |
|
|
/* CALLED BY */ |
69 |
|
|
/* */ |
70 |
|
|
/* FileX System Functions */ |
71 |
|
|
/* */ |
72 |
|
|
/* RELEASE HISTORY */ |
73 |
|
|
/* */ |
74 |
|
|
/* DATE NAME DESCRIPTION */ |
75 |
|
|
/* */ |
76 |
|
|
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ |
77 |
|
|
/* 09-30-2020 William E. Lamie Modified comment(s), verified */ |
78 |
|
|
/* memcpy usage, */ |
79 |
|
|
/* resulting in version 6.1 */ |
80 |
|
|
/* */ |
81 |
|
|
/**************************************************************************/ |
82 |
|
11199980 |
VOID _fx_utility_memory_copy(UCHAR *source_ptr, UCHAR *dest_ptr, ULONG size) |
83 |
|
|
{ |
84 |
|
|
|
85 |
|
|
/* Copy the memory. */ |
86 |
|
11199980 |
memcpy(dest_ptr, source_ptr, size); /* Use case of memcpy is verified. */ |
87 |
|
11199980 |
} |
88 |
|
|
|