Linux kernel now recommends politically correct terms

栏目: IT技术 · 发布时间: 4年前

内容简介:Merge tag 'inclusive-terminology' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/linuxPull coding style terminology documentation from Dan Williams: "The discussion has tapered off as well as the incoming ack, review, and sign-off tags. I did not

Merge tag 'inclusive-terminology' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/linux

Pull coding style terminology documentation from Dan Williams: "The discussion has tapered off as well as the incoming ack, review, and sign-off tags. I did not see a reason to wait for the next merge window" * tag 'inclusive-terminology' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/linux: CodingStyle: Inclusive Terminology

Diffstat

-rw-r--r-- Documentation/process/coding-style.rst 20

1 files changed, 20 insertions, 0 deletions

diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst

index 2657a55c6f12..1bee6f8affdb 100644

--- a/ Documentation/process/coding-style.rst

+++ b/ Documentation/process/coding-style.rst

@@ -319,6 +319,26 @@ If you are afraid to mix up your local variable names, you have another

problem, which is called the function-growth-hormone-imbalance syndrome.

See chapter 6 (Functions).

+For symbol names and documentation, avoid introducing new usage of

+'master / slave' (or 'slave' independent of 'master') and 'blacklist /

+whitelist'.

+

+Recommended replacements for 'master / slave' are:

+ '{primary,main} / {secondary,replica,subordinate}'

+ '{initiator,requester} / {target,responder}'

+ '{controller,host} / {device,worker,proxy}'

+ 'leader / follower'

+ 'director / performer'

+

+Recommended replacements for 'blacklist/whitelist' are:

+ 'denylist / allowlist'

+ 'blocklist / passlist'

+

+Exceptions for introducing new usage is to maintain a userspace ABI/API,

+or when updating code for an existing (as of 2020) hardware or protocol

+specification that mandates those terms. For new specifications

+translate specification usage of the terminology to the kernel coding

+standard where possible.

5) Typedefs

-----------


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

万万没想到

万万没想到

万维钢(同人于野) / 电子工业出版社 / 2014-10-1 / 39.80元

本书精选了万维钢老师的文章和书评,以“用理工科思维理解世界”为导向。作者常用有趣的实验、数据来解读感性的事物,其理工科思维涉及行为经济学、认知心理学、社会学、统计学、物理等许多学科,以前沿的科学视角解读生活,为人们提供了认知的新方法。读完本书相当于精读了十几本经过筛选 、再创作及通俗化处理的巨著,不仅有趣还十分有营养。一起来看看 《万万没想到》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器