move tlsf_min, tlsf_max, tlsf_cast to the tlsf_common.h header file

This commit is contained in:
Ivan Grokhotkov
2021-12-13 21:54:40 +01:00
committed by Guillaume Souchere
parent 6723d4fc98
commit bfd855894d
2 changed files with 7 additions and 8 deletions

8
tlsf.c
View File

@@ -199,14 +199,6 @@ tlsf_decl int tlsf_fls_sizet(size_t size)
#undef tlsf_decl
/*
** Cast and min/max macros.
*/
#define tlsf_cast(t, exp) ((t) (exp))
#define tlsf_min(a, b) ((a) < (b) ? (a) : (b))
#define tlsf_max(a, b) ((a) > (b) ? (a) : (b))
/*
** Set assert macro, if it has not been provided by the user.
*/

View File

@@ -14,6 +14,13 @@
extern "C" {
#endif
/*
** Cast and min/max macros.
*/
#define tlsf_cast(t, exp) ((t) (exp))
#define tlsf_min(a, b) ((a) < (b) ? (a) : (b))
#define tlsf_max(a, b) ((a) > (b) ? (a) : (b))
enum tlsf_config
{
/* log2 of number of linear subdivisions of block sizes. Larger