Re: [RFC][PATCH] 2/6 POSIX message queues
From: Christoph Hellwig
Date: Thu Feb 19 2004 - 09:57:38 EST
> +#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
> +
> +#ifdef __KERNEL__
> +#include <linux/types.h>
> +#include <linux/time.h>
This looks like you want glibc to include it, please don't - add a copy
without the kernel part to glibc instead.
> +asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr);
> +asmlinkage long sys_mq_unlink(const char __user *name);
> +asmlinkage long mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout);
> +asmlinkage ssize_t mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout);
> +asmlinkage long mq_notify(mqd_t mqdes, const struct sigevent __user *notification);
> +asmlinkage long mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat);
this probably fits better into randy's new syscall.h now in -mm. Also
what do you need the prototypes for?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/