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,
47#ifdef CONFIG_USERSPACE
48#ifdef CONFIG_COMMON_LIBC_MALLOC
54#if CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE != 0 && \
55(defined(CONFIG_MPU) || defined(CONFIG_MMU))
56#define Z_MALLOC_PARTITION_EXISTS 1
59#elif defined(CONFIG_NEWLIB_LIBC)
67#if (!defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) || \
68 (defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) && \
69 CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE))
70#define Z_MALLOC_PARTITION_EXISTS 1
75#ifdef Z_MALLOC_PARTITION_EXISTS
82#ifdef CONFIG_NEED_LIBC_MEM_PARTITION
92#define Z_LIBC_PARTITION_EXISTS 1
99#include <zephyr/syscalls/libc-hooks.h>
102#define Z_LIBC_DATA K_APP_DMEM(z_libc_partition)
#define ZRESTRICT
Definition common.h:36
int zephyr_fputc(int c, FILE *stream)
char c
Definition printk.c:169
void * ptr
Definition printk.c:177
int FILE
Definition stdio.h:22
Memory Partition.
Definition mem_domain.h:55