摘要: #include #include #include #include #include #include #include #include union semun { int val; /* Value for SETVAL */ struct semid_ds *buf; /* Buffer... 阅读全文
posted @ 2019-02-26 21:11 ForMeDream 阅读(163) 评论(0) 推荐(0) 编辑
摘要: /* *删除 msgctl(msgid,IPC_RMID,0); ipcrm -q id ipcs -q 查看 *创建 msgqueue 时指定 key 为 IPC_PRIVATE 读取时将不能获得key指定的队列,所以需要自己定key */ #include #include #include #include #include #include #include char path... 阅读全文
posted @ 2019-02-26 16:29 ForMeDream 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 线程间通过 pthread_kill(thid,signo)给指定的thid线程发送signo信号。 创建线程与线程屏蔽字顺序 1. pthread_create(); pthread_sigmask(); 线程创建在前。所以子线程没有继承主线程的接下来设置的屏蔽字。子线程依然可以响应主线程接下来要 阅读全文
posted @ 2019-02-26 02:49 ForMeDream 阅读(1843) 评论(0) 推荐(0) 编辑