如何理解《Intel#IA-32》文档中的 assert?

2022-06-25 11:33:56 +08:00
 simbaCheng

最近在翻阅《 Intel® 64 and IA-32 Architectures Software Developer’s Manual 》文档,查 LOCK 指令的介绍。

其中一段内容,尝试用好几个翻译软件翻译都感觉有些别扭(腾讯、DeepL 、有道、google )。

原文在文档中的位置:
<Volume 2 : Instruction Set Reference>
<Chapter 3 Instruction Set Reference>
<3.2 INSTRUCTIONS>
<LOCK—Assert LOCK# Signal Prefix>

原文:

Causes the processor’s LOCK# signal to be asserted during execution of the accompanying instruction (turns the instruction into an atomic instruction). In a multiprocessor environment, the LOCK# signal ensures that the processor has exclusive use of any shared memory while the signal is asserted.

译文:

使处理器的 LOCK#信号在伴随的指令执行期间被断言(将指令转换为原子指令)。在多处理器环境中,lock#信号确保在断言该信号时处理器独占使用任何共享内存。

想请教下各位,如何翻译、理解assert 、asserted?感觉不应该翻译成断言?(思考.jpg )

1166 次点击
所在节点    问与答
6 条回复
dahakawang
2022-06-25 12:12:16 +08:00
feather12315
2022-06-25 12:38:20 +08:00
assert 我理解成“判断”的意思。

整句话的含义是:
如果某个时间间隔内 CPU core 存在 lock 信号,那么在这个期间执行的指令是原子性的
secondwtq
2022-06-25 13:23:06 +08:00
为什么非要纠结于把一个句子逐词翻译成另一个语言呢 ...

我的理解是“在指令执行时设置 LOCK#信号”
ivan_wl
2022-06-25 13:48:24 +08:00
assert 在这种语境下,意思是使拉起信号,使信号有效,反义词是 deassert
simbaCheng
2022-06-25 14:13:47 +08:00
@dahakawang 感谢,学习到了
@feather12315 嗯嗯,这样理解也没有问题。通过后面查阅资料,理解为:"发送信号" 更让我信服。
@ivan_wl 嗯嗯,感谢,后续查阅资料,也觉得应该理解为:“发送信号”、"拉起信号" 。
feather12315
2022-06-25 18:25:19 +08:00
@simbaCheng #5 你这提醒了我,这发送信号、拉起信号就是那种高低电平的意思吧

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/862086

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX