-.\" $OpenBSD: msgctl.2,v 1.18 2019/07/18 13:32:40 schwarze Exp $
+.\" $OpenBSD: msgctl.2,v 1.19 2024/04/30 17:03:14 op Exp $
.\" $NetBSD: msgctl.2,v 1.2 1997/03/27 08:20:35 mikel Exp $
.\"
.\" Copyright (c) 1995 Frank van der Linden
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"/
-.Dd $Mdocdate: July 18 2019 $
+.Dd $Mdocdate: April 30 2024 $
.Dt MSGCTL 2
.Os
.Sh NAME
.Bd -literal
struct msqid_ds {
struct ipc_perm msg_perm; /* msg queue permission bits */
- u_long msg_cbytes; /* # of bytes in use on the queue */
- u_long msg_qnum; /* # of msgs in the queue */
- u_long msg_qbytes; /* max # of bytes on the queue */
+ msglen_t msg_cbytes; /* # of bytes in use on the queue */
+ msgqnum_t msg_qnum; /* # of msgs in the queue */
+ msglen_t msg_qbytes; /* max # of bytes on the queue */
pid_t msg_lspid; /* pid of last msgsnd() */
pid_t msg_lrpid; /* pid of last msgrcv() */
time_t msg_stime; /* time of last msgsnd() */
-/* $OpenBSD: msg.h,v 1.20 2022/09/16 15:57:23 mbuhl Exp $ */
+/* $OpenBSD: msg.h,v 1.21 2024/04/30 17:03:05 op Exp $ */
/* $NetBSD: msg.h,v 1.9 1996/02/09 18:25:18 christos Exp $ */
/*
#define MSG_NOERROR 010000 /* don't complain about too long msgs */
+typedef unsigned long msgqnum_t;
+typedef unsigned long msglen_t;
+
struct msqid_ds {
struct ipc_perm msg_perm; /* msg queue permission bits */
struct msg *msg_first; /* first message in the queue */
struct msg *msg_last; /* last message in the queue */
- unsigned long msg_cbytes; /* number of bytes in use on the queue */
- unsigned long msg_qnum; /* number of msgs in the queue */
- unsigned long msg_qbytes; /* max # of bytes on the queue */
+ msglen_t msg_cbytes; /* number of bytes in use on the queue */
+ msgqnum_t msg_qnum; /* number of msgs in the queue */
+ msglen_t msg_qbytes; /* max # of bytes on the queue */
pid_t msg_lspid; /* pid of last msgsnd() */
pid_t msg_lrpid; /* pid of last msgrcv() */
time_t msg_stime; /* time of last msgsnd() */