app_shmem: create generic libc partition
We need a generic name for the partition containing essential C library globals. We're going to need to add the stack canary guard to this area so user mode can read it. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
80e3a2c246
commit
17ce822ed9
5 changed files with 12 additions and 23 deletions
|
@ -27,13 +27,6 @@ __syscall int _zephyr_read(char *buf, int nbytes);
|
|||
|
||||
__syscall int _zephyr_write(const void *buf, int nbytes);
|
||||
|
||||
#ifdef CONFIG_APP_SHARED_MEM
|
||||
/* Memory partition containing newlib's globals. This includes all the globals
|
||||
* within libc.a and the supporting zephyr hooks, but not the malloc arena.
|
||||
*/
|
||||
extern struct k_mem_partition z_newlib_partition;
|
||||
#endif /* CONFIG_APP_SHARED_MEM */
|
||||
|
||||
#else
|
||||
/* Minimal libc */
|
||||
|
||||
|
@ -46,6 +39,9 @@ __syscall size_t _zephyr_fwrite(const void *_MLIBC_RESTRICT ptr, size_t size,
|
|||
#ifdef CONFIG_APP_SHARED_MEM
|
||||
/* Memory partition containing the libc malloc arena */
|
||||
extern struct k_mem_partition z_malloc_partition;
|
||||
|
||||
/* C library globals, except the malloc arena */
|
||||
extern struct k_mem_partition z_libc_partition;
|
||||
#endif
|
||||
|
||||
#include <syscalls/libc-hooks.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue