1.socket中shutdown和close的区别
https://blog.csdn.net/bestboyxie/article/details/53065932
cnblogs.com/kex1n/p/7146054.html
https://blog.csdn.net/u011391629/article/details/71939248
2.evenfd
https://blog.csdn.net/qq_28114615/article/details/97929524 (很详细)
https://www.cnblogs.com/haiyonghao/p/14440737.html
https://www.cnblogs.com/zhengchunhao/p/5335914.html
// 若flag置为0, 那么write进来的值会进行累加,每次read之后count会被清0;
// 如果read读到0, 如果flag非EFD_NONBLOCK,那么read会阻塞
int eventfd (int __count, int __flags)
__flag | __count(计数器初值) | read | write |
0 | 20 |
| 1.写入的值会与当前计数器的值累加 |
EFD_SEMAPHORE | 10 |
| 1.如果写入的值为0,计数器的值清0 2.如果写入的值非0,计数器的值加1
|