![]() |
|
|||
0001 /* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */ 0002 /* Copyright (C) 2003 Krzysztof Benedyczak & Michal Wronski 0003 0004 This program is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Lesser General Public 0006 License as published by the Free Software Foundation; either 0007 version 2.1 of the License, or (at your option) any later version. 0008 0009 It is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Lesser General Public License for more details. 0013 0014 You should have received a copy of the GNU Lesser General Public 0015 License along with this software; if not, write to the Free 0016 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 0017 02111-1307 USA. */ 0018 0019 #ifndef _LINUX_MQUEUE_H 0020 #define _LINUX_MQUEUE_H 0021 0022 #include <linux/types.h> 0023 0024 #define MQ_PRIO_MAX 32768 0025 /* per-uid limit of kernel memory used by mqueue, in bytes */ 0026 #define MQ_BYTES_MAX 819200 0027 0028 struct mq_attr { 0029 __kernel_long_t mq_flags; /* message queue flags */ 0030 __kernel_long_t mq_maxmsg; /* maximum number of messages */ 0031 __kernel_long_t mq_msgsize; /* maximum message size */ 0032 __kernel_long_t mq_curmsgs; /* number of messages currently queued */ 0033 __kernel_long_t __reserved[4]; /* ignored for input, zeroed for output */ 0034 }; 0035 0036 /* 0037 * SIGEV_THREAD implementation: 0038 * SIGEV_THREAD must be implemented in user space. If SIGEV_THREAD is passed 0039 * to mq_notify, then 0040 * - sigev_signo must be the file descriptor of an AF_NETLINK socket. It's not 0041 * necessary that the socket is bound. 0042 * - sigev_value.sival_ptr must point to a cookie that is NOTIFY_COOKIE_LEN 0043 * bytes long. 0044 * If the notification is triggered, then the cookie is sent to the netlink 0045 * socket. The last byte of the cookie is replaced with the NOTIFY_?? codes: 0046 * NOTIFY_WOKENUP if the notification got triggered, NOTIFY_REMOVED if it was 0047 * removed, either due to a close() on the message queue fd or due to a 0048 * mq_notify() that removed the notification. 0049 */ 0050 #define NOTIFY_NONE 0 0051 #define NOTIFY_WOKENUP 1 0052 #define NOTIFY_REMOVED 2 0053 0054 #define NOTIFY_COOKIE_LEN 32 0055 0056 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |