blob: b154e2c640db662fdf158fd75bc87b0c9e32d78d [file] [log] [blame]
Imre Kisf55f2aa2024-05-28 15:55:19 +02001/*
2 * Copyright (c) 2012-2021 Roberto E. Vargas Caballero
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6/*
Imre Kis0619e152024-05-28 16:03:09 +02007 * Portions copyright (c) 2018-2024, Arm Limited and Contributors.
Imre Kisf55f2aa2024-05-28 15:55:19 +02008 * All rights reserved.
9 */
10
11#ifndef STDLIB_H
12#define STDLIB_H
13
14#include <stddef.h>
15
16#define EXIT_FAILURE 1
17#define EXIT_SUCCESS 0
18
19#define _ATEXIT_MAX 1
20
Imre Kisf55f2aa2024-05-28 15:55:19 +020021extern void abort(void);
22extern int atexit(void (*func)(void));
23extern void exit(int status);
24
25long strtol(const char *nptr, char **endptr, int base);
26unsigned long strtoul(const char *nptr, char **endptr, int base);
27long long strtoll(const char *nptr, char **endptr, int base);
28unsigned long long strtoull(const char *nptr, char **endptr, int base);
Imre Kis0619e152024-05-28 16:03:09 +020029
30/*
31 * The declaration of these functions is part of libc but they are implemented
32 * in the allocator.
33 */
34void *malloc(size_t size);
35void free(void *ptr);
36void *calloc(size_t nmemb, size_t size);
37void *realloc(void *ptr, size_t size);
38
Imre Kisf55f2aa2024-05-28 15:55:19 +020039#endif /* STDLIB_H */