1*50728e78Schristos /* $NetBSD: mqueue.h,v 1.4 2009/01/11 03:04:12 christos Exp $ */ 22cecf9bbSrmind 32cecf9bbSrmind /* 42cecf9bbSrmind * Copyright (c) 2007, Mindaugas Rasiukevicius <rmind at NetBSD org> 5c75dc327Srmind * All rights reserved. 62cecf9bbSrmind * 72cecf9bbSrmind * Redistribution and use in source and binary forms, with or without 82cecf9bbSrmind * modification, are permitted provided that the following conditions 92cecf9bbSrmind * are met: 102cecf9bbSrmind * 1. Redistributions of source code must retain the above copyright 112cecf9bbSrmind * notice, this list of conditions and the following disclaimer. 122cecf9bbSrmind * 2. Redistributions in binary form must reproduce the above copyright 132cecf9bbSrmind * notice, this list of conditions and the following disclaimer in the 142cecf9bbSrmind * documentation and/or other materials provided with the distribution. 152cecf9bbSrmind * 1606171502Srmind * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1706171502Srmind * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1806171502Srmind * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1906171502Srmind * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2006171502Srmind * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2106171502Srmind * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2206171502Srmind * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2306171502Srmind * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2406171502Srmind * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2506171502Srmind * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2606171502Srmind * SUCH DAMAGE. 272cecf9bbSrmind */ 282cecf9bbSrmind 292cecf9bbSrmind #ifndef _MQUEUE_H_ 302cecf9bbSrmind #define _MQUEUE_H_ 312cecf9bbSrmind 322cecf9bbSrmind #include <fcntl.h> 332cecf9bbSrmind #include <signal.h> 342cecf9bbSrmind #include <time.h> 352cecf9bbSrmind 362cecf9bbSrmind #include <sys/cdefs.h> 372cecf9bbSrmind #include <sys/types.h> 382cecf9bbSrmind 392cecf9bbSrmind #include <sys/mqueue.h> 402cecf9bbSrmind 412cecf9bbSrmind __BEGIN_DECLS 422cecf9bbSrmind int mq_close(mqd_t); 432cecf9bbSrmind int mq_getattr(mqd_t, struct mq_attr *); 442cecf9bbSrmind int mq_notify(mqd_t, const struct sigevent *); 452cecf9bbSrmind mqd_t mq_open(const char *, int, ...); 462cecf9bbSrmind ssize_t mq_receive(mqd_t, char *, size_t, unsigned *); 472cecf9bbSrmind int mq_send(mqd_t, const char *, size_t, unsigned); 482cecf9bbSrmind int mq_setattr(mqd_t, const struct mq_attr * __restrict, 492cecf9bbSrmind struct mq_attr * __restrict); 50*50728e78Schristos #ifndef __LIBC12_SOURCE__ 512cecf9bbSrmind ssize_t mq_timedreceive(mqd_t, char * __restrict, size_t, 52*50728e78Schristos unsigned * __restrict, const struct timespec * __restrict) 53*50728e78Schristos __RENAME(__mq_timedreceive50); 542cecf9bbSrmind int mq_timedsend(mqd_t, const char *, size_t, unsigned, 55*50728e78Schristos const struct timespec *) __RENAME(__mq_timedsend50); 56*50728e78Schristos #endif 572cecf9bbSrmind int mq_unlink(const char *); 582cecf9bbSrmind __END_DECLS 592cecf9bbSrmind 602cecf9bbSrmind #endif /* _MQUEUE_H_ */ 61