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$
27152830Sdavidxu */
28152830Sdavidxu
29152830Sdavidxu#ifndef _MQUEUE_H_
30152830Sdavidxu#define _MQUEUE_H_
31152830Sdavidxu
32152950Sdavidxu#include <sys/cdefs.h>
33152830Sdavidxu#include <sys/types.h>
34152830Sdavidxu#include <sys/mqueue.h>
35240297Sdavidxu#include <sys/signal.h>
36152830Sdavidxu
37152830Sdavidxustruct timespec;
38152830Sdavidxu
39152950Sdavidxu__BEGIN_DECLS
40152830Sdavidxuint	mq_close(mqd_t);
41152830Sdavidxuint	mq_getattr(mqd_t, struct mq_attr *);
42152830Sdavidxuint	mq_notify(mqd_t, const struct sigevent *);
43152830Sdavidxumqd_t	mq_open(const char *, int, ...);
44152830Sdavidxussize_t	mq_receive(mqd_t, char *, size_t, unsigned *);
45152830Sdavidxuint	mq_send(mqd_t, const char *, size_t, unsigned);
46152830Sdavidxuint	mq_setattr(mqd_t, const struct mq_attr *__restrict,
47152830Sdavidxu		struct mq_attr *__restrict);
48152830Sdavidxussize_t	mq_timedreceive(mqd_t, char *__restrict, size_t,
49152830Sdavidxu		unsigned *__restrict, const struct timespec *__restrict);
50152830Sdavidxuint	mq_timedsend(mqd_t, const char *, size_t, unsigned,
51152830Sdavidxu		const struct timespec *);
52152830Sdavidxuint	mq_unlink(const char *);
53165828Sdavidxuint	__mq_oshandle(mqd_t mqd);
54165828Sdavidxu
55152950Sdavidxu__END_DECLS
56152830Sdavidxu#endif
57