https://zhuanlan.zhihu.com/p/428984423
https://blog.csdn.net/weixin_43914272/article/details/108317212
https://blog.csdn.net/qq_44177918/article/details/130491653
我现在的理解:类似于java里的wait与notify函数
sem_wait:信号量减1,会导致绑定信号量的子进程等待
sem_post:信号量加1,会唤醒正在等待的绑定信号量的子进程
0 条评论