sem_func.h
来自「这是自己写的一个关于经典ipc问题-读者写者的实现。(用信号量实现)」· C头文件 代码 · 共 21 行
H
21 行
#include <sys/types.h>#include <sys/ipc.h>#include <sys/sem.h>#include <sys/stat.h>#include <errno.h>#include <unistd.h>#include <stdlib.h>#include <fcntl.h>#include <stdio.h>union semun { int val; struct semid_ds *buf; ushort *array; };#define LOCKFILE_DB "/tmp/b02006_db"#define LOCKFILE_RC "/tmp/b02006_rc"#define LOCKFILE_MUTEX "/tmp/b02006_mutex"#define SVSEM_MODE (S_IRUSR | S_IWUSR | S_IRUSR>>3 | S_IRUSR>>6)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?