-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable dynamic reent for multicore/multithread
Dynamic_reent enables each core or thread to have its own local store. W/o it, crashes can happen if two cores are running newlib code at the same time. printf_float, for instance. Also completely remove the fake locking routines and supply them in the core directly.
- Loading branch information
1 parent
f38fa5a
commit cb31b54
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h | ||
index 4bc8d29bf..23d465407 100644 | ||
--- a/newlib/libc/include/sys/config.h | ||
+++ b/newlib/libc/include/sys/config.h | ||
@@ -4,6 +4,10 @@ | ||
#include <machine/ieeefp.h> /* floating point macros */ | ||
#include <sys/features.h> /* POSIX defs */ | ||
|
||
+#ifndef __DYNAMIC_REENT__ | ||
+#define __DYNAMIC_REENT__ | ||
+#endif | ||
+ | ||
#ifdef __aarch64__ | ||
#define MALLOC_ALIGNMENT 16 | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters