mqueue.h revision 152830
1193326Sed/*-
2193326Sed * Copyright (c) 2005 David Xu <davidxu@freebsd.org>
3193326Sed * All rights reserved.
4193326Sed *
5193326Sed * Redistribution and use in source and binary forms, with or without
6193326Sed * modification, are permitted provided that the following conditions
7193326Sed * are met:
8193326Sed * 1. Redistributions of source code must retain the above copyright
9193326Sed *    notice, this list of conditions and the following disclaimer.
10193326Sed * 2. Redistributions in binary form must reproduce the above copyright
11193326Sed *    notice, this list of conditions and the following disclaimer in the
12193326Sed *    documentation and/or other materials provided with the distribution.
13193326Sed *
14193326Sed * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15193326Sed * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16249423Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17249423Sdim * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18193326Sed * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19193326Sed * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20234353Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21249423Sdim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22249423Sdim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23263508Sdim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24193326Sed * SUCH DAMAGE.
25193326Sed *
26194179Sed * $FreeBSD: head/include/mqueue.h 152830 2005-11-26 12:55:36Z davidxu $
27249423Sdim */
28218893Sdim
29193326Sed#ifndef _MQUEUE_H_
30249423Sdim#define _MQUEUE_H_
31249423Sdim
32249423Sdim#include <sys/types.h>
33198893Srdivacky#include <sys/mqueue.h>
34198092Srdivacky
35193326Sedstruct sigevent;
36234353Sdimstruct timespec;
37193326Sed
38193326Sedint	mq_close(mqd_t);
39239462Sdimint	mq_getattr(mqd_t, struct mq_attr *);
40239462Sdimint	mq_notify(mqd_t, const struct sigevent *);
41239462Sdimmqd_t	mq_open(const char *, int, ...);
42239462Sdimssize_t	mq_receive(mqd_t, char *, size_t, unsigned *);
43239462Sdimint	mq_send(mqd_t, const char *, size_t, unsigned);
44239462Sdimint	mq_setattr(mqd_t, const struct mq_attr *__restrict,
45239462Sdim		struct mq_attr *__restrict);
46239462Sdimssize_t	mq_timedreceive(mqd_t, char *__restrict, size_t,
47239462Sdim		unsigned *__restrict, const struct timespec *__restrict);
48239462Sdimint	mq_timedsend(mqd_t, const char *, size_t, unsigned,
49239462Sdim		const struct timespec *);
50239462Sdimint	mq_unlink(const char *);
51239462Sdim#endif
52239462Sdim