mqueue.h revision 1.4
11.4Schristos/* $NetBSD: mqueue.h,v 1.4 2009/01/11 03:04:12 christos 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.3Srmind * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 171.3Srmind * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 181.3Srmind * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 191.3Srmind * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 201.3Srmind * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 211.3Srmind * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 221.3Srmind * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 231.3Srmind * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 241.3Srmind * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 251.3Srmind * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 261.3Srmind * 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.4Schristos#ifndef __LIBC12_SOURCE__ 511.1Srmindssize_t mq_timedreceive(mqd_t, char * __restrict, size_t, 521.4Schristos unsigned * __restrict, const struct timespec * __restrict) 531.4Schristos __RENAME(__mq_timedreceive50); 541.1Srmindint mq_timedsend(mqd_t, const char *, size_t, unsigned, 551.4Schristos const struct timespec *) __RENAME(__mq_timedsend50); 561.4Schristos#endif 571.1Srmindint mq_unlink(const char *); 581.1Srmind__END_DECLS 591.1Srmind 601.1Srmind#endif /* _MQUEUE_H_ */ 61