@
sudoz @
qiayue 确实可以理解为一种“标记”用来标识 **boolean**
实在需要的时候我一般是用 bRunning , js 里用驼峰, c 里不喜欢,所以就 b_running 或者就直接 running 了。
@
coderluan 其实我也是工作中才注意到的,以前当同学的时候编译通过就万事大吉了
@
ytmsdy 天下之大,哈哈哈...
@
loading 感谢分享
@
letitbesqzr @
learnshare @
basefas @
chairuosen 可能是因为以前在 linux kernel 里面转悠多了,再加上自己写习惯了,所以就有了条件反射的生理反应。
举个栗子,譬如:
http://lxr.free-electrons.com/source/include/linux/sched.h#L1465```
1456 /* Track pages that require TLB flushes */
1457 struct tlbflush_unmap_batch {
1458 /*
1459 * Each bit set is a CPU that potentially has a TLB entry for one of
1460 * the PFNs being flushed. See set_tlb_ubc_flush_pending().
1461 */
1462 struct cpumask cpumask;
1463
1464 /* True if any bit in cpumask is set */
1465 bool flush_required;
1466
1467 /*
1468 * If true then the PTE was dirty when unmapped. The entry must be
1469 * flushed before IO is initiated or a stale TLB entry potentially
1470 * allows an update without redirtying the page.
1471 */
1472 bool writable;
1473 };
```
这里有两个 **bool**
`bool flush_required;`
`bool writable;`
为什么前面不带 be 动词呢?
因为 `flush_required` 和 `writable` 本身就已经能表达是非两种状态了,带 be 的话感觉多余。
总而言之,习惯性使然,主要想了解下除了自己以外,别人是否也关注过这些其实没卵用的点。