7#ifndef ZEPHYR_INCLUDE_SYS_LIBC_HOOKS_H_
8#define ZEPHYR_INCLUDE_SYS_LIBC_HOOKS_H_
24#if defined(CONFIG_NEWLIB_LIBC) || defined(CONFIG_ARCMWDT_LIBC)
29__syscall
int zephyr_read_stdin(
char *buf,
int nbytes);
31__syscall
int zephyr_write_stdout(
const void *buf,
int nbytes);
38#ifdef CONFIG_MINIMAL_LIBC
41__syscall
size_t zephyr_fwrite(
const void *
ZRESTRICT ptr,
size_t size,
48#ifdef CONFIG_COMMON_LIBC_MALLOC
49# if defined(CONFIG_MINIMAL_LIBC) && (CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE != -2)
50# undef CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE
51# define CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE
52# warning Using deprecated setting CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE
53# elif defined(CONFIG_PICOLIBC) && (CONFIG_PICOLIBC_HEAP_SIZE != -2)
54# undef CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE
55# define CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE CONFIG_PICOLIBC_HEAP_SIZE
56# warning Using deprecated setting CONFIG_PICOLIBC_HEAP_SIZE
60#ifdef CONFIG_USERSPACE
61#ifdef CONFIG_COMMON_LIBC_MALLOC
67#if CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE != 0 && \
68(defined(CONFIG_MPU) || defined(CONFIG_MMU))
69#define Z_MALLOC_PARTITION_EXISTS 1
72#elif defined(CONFIG_NEWLIB_LIBC)
80#if (!defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) || \
81 (defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) && \
82 CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE))
83#define Z_MALLOC_PARTITION_EXISTS 1
88#ifdef Z_MALLOC_PARTITION_EXISTS
95#ifdef CONFIG_NEED_LIBC_MEM_PARTITION
105#define Z_LIBC_PARTITION_EXISTS 1
112#include <syscalls/libc-hooks.h>
115#define Z_LIBC_DATA K_APP_DMEM(z_libc_partition)
#define ZRESTRICT
Definition: common.h:36
int zephyr_fputc(int c, FILE *stream)
int FILE
Definition: stdio.h:22
Memory Partition.
Definition: mem_domain.h:55