摘要:
``` include include include include include std::once_flag g_flag; class Singleton { private: Singleton(){} static void CreateInstance() { pToSelf = n 阅读全文
摘要:
用信号量解决生产者、消费者问题 实现shmfifo ip.h ip.c shmfifo.h shmfifo.c shmfifo_send.c include "shmfifo.h" typedef struct stu { int name[32]; int age; }STU; int main( 阅读全文
摘要:
信号量 信号量和P、V原语由Dijkstra(迪杰斯特拉)提出 信号量: 互斥: P、V在同一进程中 同步: P、V在不同进程中 信号量值含义 S 0 : S表示可用资源个数 S=0 : 表示无可用资源,无等待进程 S include include include include include 阅读全文
摘要:
消息队列实现回射客户/服务器 msg_srv.c include include include include include include define ERR_EXIT(m) \ do \ { \ perror(m); \ exit(EXIT_FAILURE); \ } while (0) 阅读全文