summaryrefslogtreecommitdiffstats
path: root/src/include/stdlib.h
blob: d6e7fafb25c917936ca5ea0159e4f0c578f2e358 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef STDLIB_H
#define STDLIB_H

#include <stddef.h>

#define min(a,b) MIN((a),(b))
#define max(a,b) MAX((a),(b))

void *memalign(size_t boundary, size_t size);
void *malloc(size_t size);
/* We never free memory */
static inline void free(void *ptr) {}

#ifndef __ROMCC__
static inline unsigned long div_round_up(unsigned int n, unsigned int d)
{
	return (n + d - 1) / d;
}
#endif


#endif /* STDLIB_H */