|
Next: Kernel ipc_perm structure Up: Internal and User Data Previous: Kernel msg structure
Kernel msqid_ds structureEach of the three types of IPC objects has an internal data structure which is maintained by the kernel. For message queues, this is the msqid_ds structure. The kernel creates, stores, and maintains an instance of this structure for every message queue created on the system. It is defined in linux/msg.h as follows:
/* one msqid structure for each queue on the system */ struct msqid_ds { struct ipc_perm msg_perm; struct msg *msg_first; /* first message on queue */ struct msg *msg_last; /* last message in queue */ time_t msg_stime; /* last msgsnd time */ time_t msg_rtime; /* last msgrcv time */ time_t msg_ctime; /* last change time */ struct wait_queue *wwait; struct wait_queue *rwait; ushort msg_cbytes; ushort msg_qnum; ushort msg_qbytes; /* max number of bytes on queue */ ushort msg_lspid; /* pid of last msgsnd */ ushort msg_lrpid; /* last receive pid */ }; While you will rarely have to concern yourself with most of the members of this structure, a brief description of each is in order to complete our tour:
next up previous contents Next: Kernel ipc_perm structure Up: Internal and User Data Previous: Kernel msg structure Converted on: Fri Mar 29 14:43:04 EST 1996 |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |