7#ifndef ZEPHYR_INCLUDE_SYS_LIBC_HOOKS_H_
8#define ZEPHYR_INCLUDE_SYS_LIBC_HOOKS_H_
19#if defined(CONFIG_NEWLIB_LIBC) || defined(CONFIG_ARCMWDT_LIBC)
24#define _MLIBC_RESTRICT
26__syscall
int zephyr_read_stdin(
char *buf,
int nbytes);
28__syscall
int zephyr_write_stdout(
const void *buf,
int nbytes);
36 size_t nitems,
FILE *_MLIBC_RESTRICT stream);
39#ifdef CONFIG_USERSPACE
40#if defined(CONFIG_NEWLIB_LIBC)
48#if (!defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) || \
49 (defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) && \
50 CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE))
51#define Z_MALLOC_PARTITION_EXISTS 1
54#elif defined(CONFIG_MINIMAL_LIBC)
55#if (CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE > 0)
59#define Z_MALLOC_PARTITION_EXISTS 1
63#ifdef Z_MALLOC_PARTITION_EXISTS
70#if defined(CONFIG_NEWLIB_LIBC) || defined(CONFIG_STACK_CANARIES) || \
71 defined(CONFIG_NEED_LIBC_MEM_PARTITION)
81#define Z_LIBC_PARTITION_EXISTS 1
88#include <syscalls/libc-hooks.h>
size_t zephyr_fwrite(const void *_MLIBC_RESTRICT ptr, size_t size, size_t nitems, FILE *_MLIBC_RESTRICT stream)
int zephyr_fputc(int c, FILE *stream)
char c
Definition: printk.c:71
void * ptr
Definition: printk.c:79
int FILE
Definition: stdio.h:23
Memory Partition.
Definition: mem_domain.h:55