??Linux??????????????
???????????? ???????[ 2015/7/17 13:22:24 ] ??????????????
?????Щ???????Coding Style
????????
????1???????????????Kconfig??????Tab??????????????????Tab?????8???????
????2??switch … case …????У?switch??case????????????????ο????????
??????????
????3???????????òο?K&R???
??????????????????????????У?
????int function(int x)
????{
????body of function
????}
???????????????????????
????if (x is true) {
????we do y
????}
?????????????????????????????
????if (condition)
????action();
??????????????????????????????????????????????????????У????????????£??????????
????if (condition) {
????do_this();
????do_that();
????} else {
????otherwise();
????}
???????
????4????????“if?? switch?? case?? for?? do?? while”?????????????磺
????if (something)
????5????????“sizeof?? typeof?? alignof?? or __attribute__”?????????磺
????sizeof(struct file)
????6???????????????????????????磬???????????????????
????sizeof( struct file )
????7????????????????????????????????“= + – < > * / % | & ^ <= >= == != ? :”??
????8????????????治??????“& * + – ~ ! sizeof typeof alignof __attribute__ defined”??
????9??????????????????????????????????????????????“++”??“–”????
????10??????????????“.”??“->”???????????????
????11????β????????
???????
????12?????C89??“/* … */”????????C99??“// …”???
????13?????????????????ο???????
????/*
????* This is the preferred style for multi-line
????* comments in the Linux kernel source code.
????* Please use it consistently.
????*
????* Description: A column of asterisks on the left side??
????* with beginning and ending almost-blank lines.
????*/
????Kconfig
????14??“config”??????????????Tab??????help?????????????????????????磺
????config AUDIT
????bool "Auditing support"
????depends on NET
????help
????Enable auditing infrastructure that can be used with another
????kernel subsystem?? such as SELinux (which requires this for
????logging of avc messages output). Does not do system-call
????auditing without CONFIG_AUDITSYSCALL.
??????
????15?????е?????????“do .. while”??????磺
????#define macrofun(a?? b?? c)
????do {
????if (a == 5)
????do_this(b?? c);
????} while (0)
?????????????
????16????????????????????????????·???
????????????????????????????????????????????????????????????????0????????-Exxx??????????????????????磺
????do_something()
????????????????????ж??????????????????????????1????????0??????????磺
????something_is_present()
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Linux??????DDR????????????Linux?????????????????豸??????????linux???в???????????м??????????????????????????Linux????Linux??DNS????????????γ???????????Linux?????????????Linux????(???)????????Linux ????????????????????????????????Windows???У?Linux???????Linux????????????????Linux iommu??vfio???????Linux????ε???TCP???????Linux?????????????СLinux?·???????????Linux???Jexus?й?Asp.Net Core??ó???Linux?????????Щ??
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????