doc: update function naming convention

This patch updates coding guidelines about naming convention.

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
Shiqing Gao 2019-05-24 11:05:32 +08:00 committed by David Kinder
parent b833e2f90c
commit b27360fd69
1 changed files with 7 additions and 1 deletions

View File

@ -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 enough with prior rules, it shall be named with the module name as prefix, such
as 'vie_read_mmio'. as 'vie_read_mmio'.
5) If the function is a wrapper of inline Assembly codes, it shall be named with 5) If the function is a wrapper of inline Assembly codes, it shall be named with
the format 'asm_<Assembly instruction mnemonic>', such as 'asm_pause'. one of the following formats:
a) asm_<Assembly instruction mnemonic>, 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) <nouns> mentioned in prior rules may either be one noun or multiple nouns, as 6) <nouns> mentioned in prior rules may either be one noun or multiple nouns, as
long as it could clearly illustrate the object. long as it could clearly illustrate the object.