diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-04-11 22:54:03 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-11 22:54:03 -0700 |
| commit | c50142a5433ed504fff2b1af152f8f7628830dfb (patch) | |
| tree | 640d146ccdfa2b15592062e6f0cbed67eac37bc5 /include/linux/mqueue.h | |
| parent | c334f752d8e9d3847d4459d06f7544dea9a49923 (diff) | |
[PATCH] posix message queues: syscall stubs
From: Manfred Spraul <manfred@colorfullife.com>
Add -ENOSYS stubs for the posix message queue syscalls. The API is a direct
mapping of the api from the unix spec, with two exceptions:
- mq_close() doesn't exist. Message queue file descriptors can be closed
with close().
- mq_notify(SIGEV_THREAD) cannot be implemented in the kernel. The kernel
returns a pollable file descriptor . User space must poll (or read) this
descriptor and call the notifier function if the file descriptor is
signaled.
Diffstat (limited to 'include/linux/mqueue.h')
| -rw-r--r-- | include/linux/mqueue.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/mqueue.h b/include/linux/mqueue.h new file mode 100644 index 000000000000..c0c5fcc89f0e --- /dev/null +++ b/include/linux/mqueue.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2003 Krzysztof Benedyczak & Michal Wronski + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + It is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this software; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _LINUX_MQUEUE_H +#define _LINUX_MQUEUE_H + +#define MQ_PRIO_MAX 32768 + +typedef int mqd_t; + +struct mq_attr { + long mq_flags; /* message queue flags */ + long mq_maxmsg; /* maximum number of messages */ + long mq_msgsize; /* maximum message size */ + long mq_curmsgs; /* number of messages currently queued */ +}; + +#define NOTIFY_NONE 0 +#define NOTIFY_WOKENUP 1 +#define NOTIFY_REMOVED 2 + +#endif |
