mqueue.h revision 152830
1152830Sdavidxu/*-
2152830Sdavidxu * Copyright (c) 2005 David Xu <davidxu@freebsd.org>
3152830Sdavidxu * All rights reserved.
4152830Sdavidxu *
5152830Sdavidxu * Redistribution and use in source and binary forms, with or without
6152830Sdavidxu * modification, are permitted provided that the following conditions
7152830Sdavidxu * are met:
8152830Sdavidxu * 1. Redistributions of source code must retain the above copyright
9152830Sdavidxu *    notice, this list of conditions and the following disclaimer.
10152830Sdavidxu * 2. Redistributions in binary form must reproduce the above copyright
11152830Sdavidxu *    notice, this list of conditions and the following disclaimer in the
12152830Sdavidxu *    documentation and/or other materials provided with the distribution.
13152830Sdavidxu *
14152830Sdavidxu * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15152830Sdavidxu * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16152830Sdavidxu * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17152830Sdavidxu * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18152830Sdavidxu * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19152830Sdavidxu * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20152830Sdavidxu * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21152830Sdavidxu * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22152830Sdavidxu * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23152830Sdavidxu * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24152830Sdavidxu * SUCH DAMAGE.
25152830Sdavidxu *
26152830Sdavidxu * $FreeBSD: head/include/mqueue.h 152830 2005-11-26 12:55:36Z davidxu $
27152830Sdavidxu */
28152830Sdavidxu
29152830Sdavidxu#ifndef _MQUEUE_H_
30152830Sdavidxu#define _MQUEUE_H_
31152830Sdavidxu
32152830Sdavidxu#include <sys/types.h>
33152830Sdavidxu#include <sys/mqueue.h>
34152830Sdavidxu
35152830Sdavidxustruct sigevent;
36152830Sdavidxustruct timespec;
37152830Sdavidxu
38152830Sdavidxuint	mq_close(mqd_t);
39152830Sdavidxuint	mq_getattr(mqd_t, struct mq_attr *);
40152830Sdavidxuint	mq_notify(mqd_t, const struct sigevent *);
41152830Sdavidxumqd_t	mq_open(const char *, int, ...);
42152830Sdavidxussize_t	mq_receive(mqd_t, char *, size_t, unsigned *);
43152830Sdavidxuint	mq_send(mqd_t, const char *, size_t, unsigned);
44152830Sdavidxuint	mq_setattr(mqd_t, const struct mq_attr *__restrict,
45152830Sdavidxu		struct mq_attr *__restrict);
46152830Sdavidxussize_t	mq_timedreceive(mqd_t, char *__restrict, size_t,
47152830Sdavidxu		unsigned *__restrict, const struct timespec *__restrict);
48152830Sdavidxuint	mq_timedsend(mqd_t, const char *, size_t, unsigned,
49152830Sdavidxu		const struct timespec *);
50152830Sdavidxuint	mq_unlink(const char *);
51152830Sdavidxu#endif
52