// lock_stubs.c -- no-op retargetable-lock stubs for newlib. // // The Pico SDK expects a *non-retargetable* newlib (lock calls compile to // nothing). The toolchain we build with ships a *retargetable* newlib, whose // stdio/malloc/exit code references __lock___* objects and __retarget_lock_* // functions that the SDK does not provide. c2probe is strictly single // threaded, so all of these are no-ops. The named objects are the complete set // enumerated from newlib's libc/libg (thumb) with `nm -u`. #include /* Backing mutex objects newlib declares extern via __LOCK_INIT(). */ struct __lock __lock___sfp_recursive_mutex; struct __lock __lock___sinit_recursive_mutex; struct __lock __lock___malloc_recursive_mutex; struct __lock __lock___env_recursive_mutex; struct __lock __lock___atexit_recursive_mutex; struct __lock __lock___at_quick_exit_mutex; struct __lock __lock___tz_mutex; struct __lock __lock___arc4random_mutex; struct __lock __lock___dd_hash_mutex; void __retarget_lock_init(_LOCK_T l) { (void)l; } void __retarget_lock_init_recursive(_LOCK_T l) { (void)l; } void __retarget_lock_close(_LOCK_T l) { (void)l; } void __retarget_lock_close_recursive(_LOCK_T l) { (void)l; } void __retarget_lock_acquire(_LOCK_T l) { (void)l; } void __retarget_lock_acquire_recursive(_LOCK_T l) { (void)l; } int __retarget_lock_try_acquire(_LOCK_T l) { (void)l; return 1; } int __retarget_lock_try_acquire_recursive(_LOCK_T l) { (void)l; return 1; } void __retarget_lock_release(_LOCK_T l) { (void)l; } void __retarget_lock_release_recursive(_LOCK_T l) { (void)l; }