1 /* Linux/PowerPC implementation of the SysV message struct msqid_ds. 2 Copyright (C) 2020-2022 Free Software Foundation, Inc. 3 This file is part of the GNU C Library. 4 5 The GNU C Library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 The GNU C Library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with the GNU C Library; if not, see 17 <https://www.gnu.org/licenses/>. */ 18 19 #ifndef _SYS_MSG_H 20 # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." 21 #endif 22 23 #include <bits/types/time_t.h> 24 25 /* Structure of record for one message inside the kernel. 26 The type `struct msg' is opaque. */ 27 struct msqid_ds 28 { 29 #ifdef __USE_TIME_BITS64 30 # include <bits/types/struct_msqid64_ds_helper.h> 31 #else 32 struct ipc_perm msg_perm; /* structure describing operation permission */ 33 # if __TIMESIZE == 32 34 unsigned long int __msg_stime_high; 35 __time_t msg_stime; /* time of last msgsnd command */ 36 unsigned long int __msg_rtime_high; 37 __time_t msg_rtime; /* time of last msgsnd command */ 38 unsigned long int __msg_ctime_high; 39 __time_t msg_ctime; /* time of last change */ 40 # else 41 __time_t msg_stime; /* time of last msgsnd command */ 42 __time_t msg_rtime; /* time of last msgsnd command */ 43 __time_t msg_ctime; /* time of last change */ 44 # endif 45 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ 46 msgqnum_t msg_qnum; /* number of messages currently on queue */ 47 msglen_t msg_qbytes; /* max number of bytes allowed on queue */ 48 __pid_t msg_lspid; /* pid of last msgsnd() */ 49 __pid_t msg_lrpid; /* pid of last msgrcv() */ 50 __syscall_ulong_t __glibc_reserved4; 51 __syscall_ulong_t __glibc_reserved5; 52 #endif 53 }; 54