[riot-notifications] [RIOT-OS/RIOT] newlib: add thread safe implementation (#8619)

Vincent Dupont notifications at github.com
Thu Feb 22 18:32:45 CET 2018

### Contribution description

Inspired by #4529, but using `rmutex`, this implements `__malloc_lock`/`__malloc_unlock` and `__env_lock`/`__env_unlock` syscalls to make newlib trhead-safe.

I guess it should be improved to check whether `_REENT_SMALL` is defined, and maybe disabled by default...

### Issues/PRs references

#4519, fixes #4488
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * newlib: add thread safe syscalls

-- File Changes --

    M core/include/thread.h (7)
    M core/sched.c (4)
    M core/thread.c (5)
    M cpu/cortexm_common/include/cpu_conf_common.h (8)
    M makefiles/arch/cortexm.inc.mk (1)
    M sys/Makefile.include (4)
    A sys/newlib_thread_safe/Makefile (1)
    A sys/newlib_thread_safe/Makefile.include (1)
    A sys/newlib_thread_safe/syscalls.c (54)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180222/6993933e/attachment-0001.html>

More information about the notifications mailing list