摘要:
#include #include #include #include #include #include #include #include union semun { int val; /* Value for SETVAL */ struct semid_ds *buf; /* Buffer... 阅读全文
摘要:
/* *删除 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... 阅读全文
摘要:
线程间通过 pthread_kill(thid,signo)给指定的thid线程发送signo信号。 创建线程与线程屏蔽字顺序 1. pthread_create(); pthread_sigmask(); 线程创建在前。所以子线程没有继承主线程的接下来设置的屏蔽字。子线程依然可以响应主线程接下来要 阅读全文