Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
mock-free.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
6
#ifndef __MOCK_FREE_H__
7
#define __MOCK_FREE_H__
8
9
#include <stdbool.h>
10
19
void
__wrap_free
(
void
*ptr);
// NOLINT(readability-identifier-naming)
20
// Rationale: Naming scheme fixed due to linker wrapping.
21
/*
22
* Prototype for the genuine free function provided by the linker
23
*/
24
void
__real_free
(
void
*ptr);
// NOLINT(readability-identifier-naming)
25
// Rationale: Naming scheme fixed due to linker wrapping.
26
/*
27
* Define if free is used as mock or if free forwards to __real_free.
28
* true - mocking enabled , no real free is called
29
* false - all calls are forwarded to __real_free aka `free`
30
*/
31
extern
bool
crinitMockFreeEnabled
;
32
#endif
/* __MOCK_FREE_H__ */
__real_free
void __real_free(void *ptr)
crinitMockFreeEnabled
bool crinitMockFreeEnabled
Definition
mock-free.c:12
__wrap_free
void __wrap_free(void *ptr)
Definition
mock-free.c:15
test
utest
mocks
mock-free.h
Generated by
1.9.8