瀏覽代碼

Merge branch 'bugfix/newlib_tz_env_mutex' into 'master'

newlib: Use correct recursive mutex for env and regular mutex for tz

Closes IDFGH-9266

See merge request espressif/esp-idf!22200
Marius Vikhammer 3 年之前
父節點
當前提交
2e55775f95
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      components/newlib/locks.c

+ 2 - 2
components/newlib/locks.c

@@ -375,9 +375,9 @@ void esp_newlib_locks_init(void)
     extern _lock_t __sinit_lock;
     __sinit_lock = (_lock_t) &s_common_recursive_mutex;
     extern _lock_t __env_lock_object;
-    __env_lock_object = (_lock_t) &s_common_mutex;
+    __env_lock_object = (_lock_t) &s_common_recursive_mutex;
     extern _lock_t __tz_lock_object;
-    __tz_lock_object = (_lock_t) &s_common_recursive_mutex;
+    __tz_lock_object = (_lock_t) &s_common_mutex;
 #elif defined(CONFIG_IDF_TARGET_ESP32S2)
     /* Newlib 3.0.0 is used in ROM, the following lock symbols are defined: */
     extern _lock_t __sinit_recursive_mutex;