Newlib: implement locks

* Dynamically allocate arc4random data. Saves about 1k off the bss.
This commit is contained in:
Our Air Quality 2017-12-09 00:45:57 +11:00
parent 89c6c410ff
commit e9d9201527
24 changed files with 3442 additions and 44 deletions

View file

@ -21,20 +21,6 @@ MEMORY
pvPortMalloc = malloc;
vPortFree = free;
/* FreeRTOS lock functions.
Rely on a patch to libc that produces weak linked versions of the
below symbols. Currently treating locking primitives like universal
global critical section rather than individual locks, but this seems
OK from the use cases in newlib.
*/
_lock_acquire = vPortEnterCritical;
_lock_acquire_recursive = vPortEnterCritical;
_lock_try_acquire = vPortEnterCritical;
_lock_try_acquire_recursive = vPortEnterCritical;
_lock_release = vPortExitCritical;
_lock_release_recursive = vPortExitCritical;
/* SDK compatibility */
ets_printf = printf;