mqueue.h revision 330897
190075Sobrien/*-
290075Sobrien * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
390075Sobrien *
490075Sobrien * Copyright (c) 2005 David Xu <davidxu@freebsd.org>
590075Sobrien * All rights reserved.
690075Sobrien *
790075Sobrien * Redistribution and use in source and binary forms, with or without
890075Sobrien * modification, are permitted provided that the following conditions
990075Sobrien * are met:
1090075Sobrien * 1. Redistributions of source code must retain the above copyright
1190075Sobrien *    notice, this list of conditions and the following disclaimer.
1290075Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1390075Sobrien *    notice, this list of conditions and the following disclaimer in the
1490075Sobrien *    documentation and/or other materials provided with the distribution.
1590075Sobrien *
1690075Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1790075Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1890075Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1990075Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2090075Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2190075Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2290075Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2390075Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2490075Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2590075Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2690075Sobrien * SUCH DAMAGE.
2790075Sobrien *
2890075Sobrien * $FreeBSD: stable/11/include/mqueue.h 330897 2018-03-14 03:19:51Z eadler $
2990075Sobrien */
3090075Sobrien
3190075Sobrien#ifndef _MQUEUE_H_
3290075Sobrien#define _MQUEUE_H_
3390075Sobrien
3490075Sobrien#include <sys/cdefs.h>
3590075Sobrien#include <sys/types.h>
3690075Sobrien#include <sys/mqueue.h>
3790075Sobrien#include <sys/signal.h>
3890075Sobrien
3990075Sobrienstruct timespec;
4090075Sobrien
4190075Sobrien__BEGIN_DECLS
4290075Sobrienint	mq_close(mqd_t);
4390075Sobrienint	mq_getattr(mqd_t, struct mq_attr *);
4490075Sobrienint	mq_notify(mqd_t, const struct sigevent *);
4590075Sobrienmqd_t	mq_open(const char *, int, ...);
4690075Sobrienssize_t	mq_receive(mqd_t, char *, size_t, unsigned *);
4790075Sobrienint	mq_send(mqd_t, const char *, size_t, unsigned);
4890075Sobrienint	mq_setattr(mqd_t, const struct mq_attr *__restrict,
4990075Sobrien		struct mq_attr *__restrict);
5090075Sobrienssize_t	mq_timedreceive(mqd_t, char *__restrict, size_t,
5190075Sobrien		unsigned *__restrict, const struct timespec *__restrict);
5290075Sobrienint	mq_timedsend(mqd_t, const char *, size_t, unsigned,
5390075Sobrien		const struct timespec *);
5490075Sobrienint	mq_unlink(const char *);
5590075Sobrien#if __BSD_VISIBLE
5690075Sobrienint	mq_getfd_np(mqd_t mqd);
5790075Sobrien#endif /* __BSD_VISIBLE */
5890075Sobrien
5990075Sobrien__END_DECLS
6090075Sobrien#endif
6190075Sobrien