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,
47void __stdout_hook_install(
int (*hook)(
int));
49#ifdef CONFIG_USERSPACE
50#ifdef CONFIG_COMMON_LIBC_MALLOC
56#if CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE != 0 && \
57(defined(CONFIG_MPU) || defined(CONFIG_MMU))
58#define Z_MALLOC_PARTITION_EXISTS 1
61#elif defined(CONFIG_NEWLIB_LIBC) && !defined(CONFIG_NEWLIB_LIBC_CUSTOM_SBRK)
69#if (!defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) || \
70 (defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) && \
71 CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE))
72#define Z_MALLOC_PARTITION_EXISTS 1
77#ifdef Z_MALLOC_PARTITION_EXISTS
84#ifdef CONFIG_NEED_LIBC_MEM_PARTITION
94#define Z_LIBC_PARTITION_EXISTS 1
101#include <zephyr/syscalls/libc-hooks.h>
104#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