TianoCore EDK2 master
Loading...
Searching...
No Matches
SetMemWrapper.c
Go to the documentation of this file.
1
20#include "MemLibInternals.h"
21
36VOID *
37EFIAPI
39 OUT VOID *Buffer,
40 IN UINTN Length,
41 IN UINT8 Value
42 )
43{
44 if (Length == 0) {
45 return Buffer;
46 }
47
48 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
49
50 return InternalMemSetMem (Buffer, Length, Value);
51}
52
72VOID *
73EFIAPI
75 OUT VOID *Buffer,
76 IN UINTN Length,
77 IN UINTN Value
78 )
79{
80 if (sizeof (UINTN) == sizeof (UINT64)) {
81 return SetMem64 (Buffer, Length, (UINT64)Value);
82 } else {
83 return SetMem32 (Buffer, Length, (UINT32)Value);
84 }
85}
UINT64 UINTN
#define MAX_ADDRESS
VOID *EFIAPI InternalMemSetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
Definition: SetMem.c:29
VOID *EFIAPI SetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
Definition: SetMemWrapper.c:38
VOID *EFIAPI SetMem64(OUT VOID *Buffer, IN UINTN Length, IN UINT64 Value)
VOID *EFIAPI SetMem32(OUT VOID *Buffer, IN UINTN Length, IN UINT32 Value)
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
VOID *EFIAPI SetMemN(OUT VOID *Buffer, IN UINTN Length, IN UINTN Value)
Definition: SetMemWrapper.c:74