Skip to content

Commit b27360f

Browse files
shiqinggdbkinder
authored andcommitted
doc: update function naming convention
This patch updates coding guidelines about naming convention. Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
1 parent b833e2f commit b27360f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/developer-guides/c_coding_guidelines.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3501,7 +3501,13 @@ function. Some detailed rules are listed below:
35013501
enough with prior rules, it shall be named with the module name as prefix, such
35023502
as 'vie_read_mmio'.
35033503
5) If the function is a wrapper of inline Assembly codes, it shall be named with
3504-
the format 'asm_<Assembly instruction mnemonic>', such as 'asm_pause'.
3504+
one of the following formats:
3505+
3506+
a) asm_<Assembly instruction mnemonic>, such as 'asm_pause'.
3507+
b) If the Assembly instruction mnemonic does not clearly indicate the
3508+
purpose of the function or the function includes multiple Assembly
3509+
instruction statements, the function shall be named with 'asm\_' as
3510+
prefix and apply the other non-assembly function naming rules.
35053511
6) <nouns> mentioned in prior rules may either be one noun or multiple nouns, as
35063512
long as it could clearly illustrate the object.
35073513

0 commit comments

Comments
 (0)