File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
en/migration-guides/release-6.x/6.0
zh_CN/migration-guides/release-6.x/6.0 Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ Add driver component from `IDF Component Manager <https://components.espressif.c
7272ESP-NETIF
7373*********
7474
75- Removal of deprecated :cpp:func: `esp_netif_next `
75+ Removed Deprecated :cpp:func: `esp_netif_next `
7676------------------------------------------------
7777
7878The deprecated iteration helper :cpp:func: `esp_netif_next ` has been removed from :doc: `/api-reference/network/esp_netif `. This API was inherently unsafe because it did not lock the interface list or the TCP/IP context during iteration.
Original file line number Diff line number Diff line change @@ -75,17 +75,17 @@ ESP-NETIF
7575移除弃用的 :cpp:func: `esp_netif_next `
7676-------------------------------------
7777
78- 已从 :doc: `/api-reference/network/esp_netif ` 中移除弃用的迭代辅助函数 :cpp:func: `esp_netif_next `。该 API 在迭代过程中不会对接口列表或 TCP/IP 上下文进行加锁,因而并不安全 。
78+ 已从 :doc: `/api-reference/network/esp_netif ` 中移除弃用的迭代辅助函数 :cpp:func: `esp_netif_next `。该 API 本质上不安全,因为在迭代过程中它既不锁定接口列表,也不锁定 TCP/IP 上下文 。
7979
80- 请使用以下替代方案 :
80+ 请使用以下替代方案之一 :
8181
82- - 仅在完全可控的上下文中直接调用 :cpp:func: `esp_netif_next_unsafe `,或在 :cpp:func: `esp_netif_tcpip_exec ` 中执行以保证在 TCP/IP 上下文内安全运行 。
83- - 使用 :cpp:func: `esp_netif_find_if ` 并配合谓词查找特定接口,从而避免手动迭代 。
82+ - 仅在完全控制的上下文中直接调用 :cpp:func: `esp_netif_next_unsafe `,或在 :cpp:func: `esp_netif_tcpip_exec ` 函数内部调用该函数,以便在 TCP/IP 上下文中安全运行 。
83+ - 使用 :cpp:func: `esp_netif_find_if ` 并配合谓词函数查找特定接口,无需手动迭代 。
8484
8585迁移方式
8686~~~~~~~~~
8787
88- 之前 :
88+ 之前用法 :
8989
9090.. code-block :: c
9191
@@ -94,7 +94,7 @@ ESP-NETIF
9494 // 使用 "it"
9595 }
9696
97- 之后(在可控上下文中进行不加锁迭代 ):
97+ 之后用法(在受控上下文中非安全迭代 ):
9898
9999.. code-block :: c
100100
@@ -103,7 +103,7 @@ ESP-NETIF
103103 // 使用 "it"
104104 }
105105
106- 推荐方式 (在 TCP/IP 上下文中迭代):
106+ 推荐用法 (在 TCP/IP 上下文中迭代):
107107
108108.. code-block :: c
109109
@@ -119,7 +119,7 @@ ESP-NETIF
119119 // 在 TCP/IP 上下文中安全执行迭代
120120 ESP_ERROR_CHECK(esp_netif_tcpip_exec(iterate_netifs, NULL));
121121
122- 替代方式 (使用谓词查找):
122+ 替代方案 (使用谓词查找):
123123
124124.. code-block :: c
125125
You can’t perform that action at this time.
0 commit comments