GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: fx_utility_memory_set.c Lines: 4 4 100.0 %
Date: 2024-01-10 21:53:23 Branches: 2 2 100.0 %

Line Branch Exec Source
1
/**************************************************************************/
2
/*                                                                        */
3
/*       Copyright (c) Microsoft Corporation. All rights reserved.        */
4
/*                                                                        */
5
/*       This software is licensed under the Microsoft Software License   */
6
/*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
7
/*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
8
/*       and in the root directory of this software.                      */
9
/*                                                                        */
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_set
38
39
40
/**************************************************************************/
41
/*                                                                        */
42
/*  FUNCTION                                               RELEASE        */
43
/*                                                                        */
44
/*    _fx_utility_memory_set                              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
/*    dest_ptr                              Destination memory pointer    */
58
/*    value                                 Value to fill                 */
59
/*    size                                  Number of bytes to set        */
60
/*                                                                        */
61
/*  OUTPUT                                                                */
62
/*                                                                        */
63
/*    None                                                                */
64
/*                                                                        */
65
/*  CALLS                                                                 */
66
/*                                                                        */
67
/*    None                                                                */
68
/*                                                                        */
69
/*  CALLED BY                                                             */
70
/*                                                                        */
71
/*    FileX System Functions                                              */
72
/*                                                                        */
73
/*  RELEASE HISTORY                                                       */
74
/*                                                                        */
75
/*    DATE              NAME                      DESCRIPTION             */
76
/*                                                                        */
77
/*  05-19-2020     William E. Lamie         Initial Version 6.0           */
78
/*  09-30-2020     William E. Lamie         Modified comment(s),          */
79
/*                                            resulting in version 6.1    */
80
/*                                                                        */
81
/**************************************************************************/
82
4
VOID  _fx_utility_memory_set(UCHAR *dest_ptr, UCHAR value, ULONG size)
83
{
84
85
    /* Loop to set memory.  */
86
52
    while (size--)
87
    {
88
89
        /* Set byte.  */
90
48
        *dest_ptr++ =  value;
91
    }
92
4
}
93