We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e66896 commit 4522ca6Copy full SHA for 4522ca6
portable/MemMang/heap_useNewlib.c
@@ -109,8 +109,13 @@ char * sbrk(int incr) {
109
//! Synonym for sbrk.
110
char * _sbrk(int incr) { return sbrk(incr); };
111
112
+#if (__NEWLIB__ >= 3)
113
+void __malloc_lock(struct _reent *ptr __attribute__((__unused__))) { vTaskSuspendAll(); };
114
+void __malloc_unlock(struct _reent *ptr __attribute__((__unused__))) { (void)xTaskResumeAll(); };
115
+#else
116
void __malloc_lock() { vTaskSuspendAll(); };
117
void __malloc_unlock() { (void)xTaskResumeAll(); };
118
+#endif
119
120
// newlib also requires implementing locks for the application's environment memory space,
121
// accessed by newlib's setenv() and getenv() functions.
0 commit comments