cliserv2.h

来自「unix网络编程的源码」· C头文件 代码 · 共 16 行

H
16
字号
#include	"unpipc.h"

#define	MESGSIZE	256		/* max #bytes per message, incl. null at end */
#define	NMESG		 16		/* max #messages */

struct shmstruct {		/* struct stored in shared memory */
  sem_t	mutex;			/* three Posix memory-based semaphores */
  sem_t	nempty;
  sem_t	nstored;
  int	nput;			/* index into msgoff[] for next put */
  long	noverflow;		/* #overflows by senders */
  sem_t	noverflowmutex;	/* mutex for noverflow counter */
  long	msgoff[NMESG];	/* offset in shared memory of each message */
  char	msgdata[NMESG * MESGSIZE];	/* the actual messages */
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?