mqueue.h revision 1.2
11.2Srmind/*	$NetBSD: mqueue.h,v 1.2 2007/11/28 19:30:55 rmind Exp $	*/
21.1Srmind
31.1Srmind/*
41.1Srmind * Copyright (c) 2007, Mindaugas Rasiukevicius <rmind at NetBSD org>
51.2Srmind * All rights reserved.
61.1Srmind *
71.1Srmind * Redistribution and use in source and binary forms, with or without
81.1Srmind * modification, are permitted provided that the following conditions
91.1Srmind * are met:
101.1Srmind * 1. Redistributions of source code must retain the above copyright
111.1Srmind *    notice, this list of conditions and the following disclaimer.
121.1Srmind * 2. Redistributions in binary form must reproduce the above copyright
131.1Srmind *    notice, this list of conditions and the following disclaimer in the
141.1Srmind *    documentation and/or other materials provided with the distribution.
151.1Srmind *
161.1Srmind * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
171.1Srmind * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
181.1Srmind * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
191.1Srmind * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
201.1Srmind * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
211.1Srmind * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
221.1Srmind * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
231.1Srmind * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
241.1Srmind * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
251.1Srmind * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
261.1Srmind * POSSIBILITY OF SUCH DAMAGE.
271.1Srmind */
281.1Srmind
291.1Srmind#ifndef _MQUEUE_H_
301.1Srmind#define _MQUEUE_H_
311.1Srmind
321.1Srmind#include <fcntl.h>
331.1Srmind#include <signal.h>
341.1Srmind#include <time.h>
351.1Srmind
361.1Srmind#include <sys/cdefs.h>
371.1Srmind#include <sys/types.h>
381.1Srmind
391.1Srmind#include <sys/mqueue.h>
401.1Srmind
411.1Srmind__BEGIN_DECLS
421.1Srmindint	mq_close(mqd_t);
431.1Srmindint	mq_getattr(mqd_t, struct mq_attr *);
441.1Srmindint	mq_notify(mqd_t, const struct sigevent *);
451.1Srmindmqd_t	mq_open(const char *, int, ...);
461.1Srmindssize_t	mq_receive(mqd_t, char *, size_t, unsigned *);
471.1Srmindint	mq_send(mqd_t, const char *, size_t, unsigned);
481.1Srmindint	mq_setattr(mqd_t, const struct mq_attr * __restrict,
491.1Srmind		    struct mq_attr * __restrict);
501.1Srmindssize_t	mq_timedreceive(mqd_t, char * __restrict, size_t,
511.1Srmind		    unsigned * __restrict,
521.1Srmind		    const struct timespec * __restrict);
531.1Srmindint	mq_timedsend(mqd_t, const char *, size_t, unsigned,
541.1Srmind		    const struct timespec *);
551.1Srmindint	mq_unlink(const char *);
561.1Srmind__END_DECLS
571.1Srmind
581.1Srmind#endif	/* _MQUEUE_H_ */
59