上一页 1 2 3 4 5 6 ··· 19 下一页
摘要: #include <stdio.h> #include <stdlib.h> #include <pthread.h> #define min(a,b) ((a)<(b)?(a):(b)) #define MAXNITEMS 1000000 #define MAXNTHREADS 10 int ni 阅读全文
posted @ 2022-10-11 23:20 东宫得臣 阅读(17) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <fcntl.h> #include <semaphore.h> const int 阅读全文
posted @ 2022-10-11 14:22 东宫得臣 阅读(26) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <mqueue.h> int main(int argc, char **argv) { mqd_t mqd; void *ptr; size_t len, prio; if(argc!=4) { fpr 阅读全文
posted @ 2022-10-11 12:21 东宫得臣 阅读(18) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <pthread.h> #define min(a,b) ((a)<(b)?(a):(b)) #define MAXNITEMS 1000000 #define MAXNTHREADS 10 int ni 阅读全文
posted @ 2022-10-10 11:00 东宫得臣 阅读(11) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <fcntl.h> #include <errno.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <mqueue.h> struct mq_att 阅读全文
posted @ 2022-10-09 12:51 东宫得臣 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 每个消息队列有一个保存其当前打开着描述符数的引用计数器; Posix消息队列至少具备随内核的持续性,这就是说,即使当前没有进程打开着某个消息队列, 该队列及其上的各个消息也将一直存在,直到调用mq_unlink并让它的引用计数到0以删除该队列为止。 每个消息队列有四个属性: struct mq_at 阅读全文
posted @ 2022-10-09 10:41 东宫得臣 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 每个记录前冠以它的长度 PIPE_BUF可原子地写往一个管道或FIFO的最大数据量 把字节流分隔成各个记录由应用程序来实现 #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include 阅读全文
posted @ 2022-10-09 09:42 东宫得臣 阅读(16) 评论(0) 推荐(0) 编辑
摘要: #include <unistd.h> #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <sys/wait.h> #include <s 阅读全文
posted @ 2022-10-04 00:25 东宫得臣 阅读(31) 评论(0) 推荐(0) 编辑
摘要: struct ipc_perm { uid_t uid; /*owner's user id*/ gid_t gid; /*owner's group id*/ uid_t cuid; /*creator's user id*/ gid_t cgid; /*creator's group id*/ 阅读全文
posted @ 2022-10-03 13:05 东宫得臣 阅读(21) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <errno.h> #include <string.h> # 阅读全文
posted @ 2022-09-30 12:55 东宫得臣 阅读(21) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 19 下一页