Skip to content

Commit dbb50ed

Browse files
committed
docs: Update translation for esp_netif
1 parent bdd8d25 commit dbb50ed

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/en/migration-guides/release-6.x/6.0/networking.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Removed the following RMII clock Kconfig options from `components/esp_eth`. Cloc
4646
ESP-NETIF
4747
*********
4848

49-
Removal of deprecated :cpp:func:`esp_netif_next`
49+
Removed Deprecated :cpp:func:`esp_netif_next`
5050
------------------------------------------------
5151

5252
The 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.

docs/zh_CN/migration-guides/release-6.x/6.0/networking.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ ESP-NETIF
4949
移除弃用的 :cpp:func:`esp_netif_next`
5050
-------------------------------------
5151

52-
已从 :doc:`/api-reference/network/esp_netif` 中移除弃用的迭代辅助函数 :cpp:func:`esp_netif_next`。该 API 在迭代过程中不会对接口列表或 TCP/IP 上下文进行加锁,因而并不安全
52+
已从 :doc:`/api-reference/network/esp_netif` 中移除弃用的迭代辅助函数 :cpp:func:`esp_netif_next`。该 API 本质上不安全,因为在迭代过程中它既不锁定接口列表,也不锁定 TCP/IP 上下文
5353

54-
请使用以下替代方案
54+
请使用以下替代方案之一
5555

56-
- 仅在完全可控的上下文中直接调用 :cpp:func:`esp_netif_next_unsafe`,或在 :cpp:func:`esp_netif_tcpip_exec` 中执行以保证在 TCP/IP 上下文内安全运行
57-
- 使用 :cpp:func:`esp_netif_find_if` 并配合谓词查找特定接口,从而避免手动迭代
56+
- 仅在完全控制的上下文中直接调用 :cpp:func:`esp_netif_next_unsafe`,或在 :cpp:func:`esp_netif_tcpip_exec` 函数内部调用该函数,以便在 TCP/IP 上下文中安全运行
57+
- 使用 :cpp:func:`esp_netif_find_if` 并配合谓词函数查找特定接口,无需手动迭代
5858

5959
迁移方式
6060
~~~~~~~~~
6161

62-
之前
62+
之前用法
6363

6464
.. code-block:: c
6565
@@ -68,7 +68,7 @@ ESP-NETIF
6868
// 使用 "it"
6969
}
7070
71-
之后(在可控上下文中进行不加锁迭代):
71+
之后用法(在受控上下文中非安全迭代):
7272

7373
.. code-block:: c
7474
@@ -77,7 +77,7 @@ ESP-NETIF
7777
// 使用 "it"
7878
}
7979
80-
推荐方式(在 TCP/IP 上下文中迭代):
80+
推荐用法(在 TCP/IP 上下文中迭代):
8181

8282
.. code-block:: c
8383
@@ -93,7 +93,7 @@ ESP-NETIF
9393
// 在 TCP/IP 上下文中安全执行迭代
9494
ESP_ERROR_CHECK(esp_netif_tcpip_exec(iterate_netifs, NULL));
9595
96-
替代方式(使用谓词查找):
96+
替代方案(使用谓词查找):
9797

9898
.. code-block:: c
9999

0 commit comments

Comments
 (0)