From b27360fd69a577b03ffe824bec28778006a83209 Mon Sep 17 00:00:00 2001 From: Shiqing Gao Date: Fri, 24 May 2019 11:05:32 +0800 Subject: [PATCH] doc: update function naming convention This patch updates coding guidelines about naming convention. Signed-off-by: Shiqing Gao --- doc/developer-guides/c_coding_guidelines.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/developer-guides/c_coding_guidelines.rst b/doc/developer-guides/c_coding_guidelines.rst index eb589ee89..88d001c00 100644 --- a/doc/developer-guides/c_coding_guidelines.rst +++ b/doc/developer-guides/c_coding_guidelines.rst @@ -3501,7 +3501,13 @@ function. Some detailed rules are listed below: enough with prior rules, it shall be named with the module name as prefix, such as 'vie_read_mmio'. 5) If the function is a wrapper of inline Assembly codes, it shall be named with - the format 'asm_', such as 'asm_pause'. + one of the following formats: + + a) asm_, such as 'asm_pause'. + b) If the Assembly instruction mnemonic does not clearly indicate the + purpose of the function or the function includes multiple Assembly + instruction statements, the function shall be named with 'asm\_' as + prefix and apply the other non-assembly function naming rules. 6) mentioned in prior rules may either be one noun or multiple nouns, as long as it could clearly illustrate the object.